Commit 2d8397e
authored
feat: Add
## Summary
- Added `snapshot_properties` parameter to `Transaction.upsert()` and
`Table.upsert()` methods
- The properties are passed to both underlying `overwrite()` and
`append()` operations, so they are applied to all snapshots created by
the upsert
- Added test to verify snapshot properties are correctly applied
## Background
Currently, the `upsert()` operation doesn't support
`snapshot_properties`, while other operations like `append()`,
`overwrite()`, and `delete()` do.
Since upsert creates multiple snapshots (one from `overwrite()` for
updates and one from `append()` for inserts), the `snapshot_properties`
are applied to all of them, which is consistent with how `overwrite()`
handles properties internally.
Closes #2659
## Test plan
- [x] Added `test_upsert_snapshot_properties` test that verifies
properties are applied to all snapshots created by upsert
- [x] All existing upsert tests pass (22 tests)
- [x] All lint checks pass
Co-authored-by: Somasundaram Sekar <somasundaramsekar.1986@gmail.com>snapshot_properties to upsert operation (#2829)1 parent 4ef55d3 commit 2d8397e
2 files changed
+58
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
| 737 | + | |
737 | 738 | | |
738 | 739 | | |
739 | 740 | | |
| |||
745 | 746 | | |
746 | 747 | | |
747 | 748 | | |
| 749 | + | |
748 | 750 | | |
749 | 751 | | |
750 | 752 | | |
| |||
861 | 863 | | |
862 | 864 | | |
863 | 865 | | |
| 866 | + | |
864 | 867 | | |
865 | 868 | | |
866 | 869 | | |
867 | 870 | | |
868 | 871 | | |
869 | | - | |
| 872 | + | |
870 | 873 | | |
871 | 874 | | |
872 | 875 | | |
| |||
1327 | 1330 | | |
1328 | 1331 | | |
1329 | 1332 | | |
| 1333 | + | |
1330 | 1334 | | |
1331 | 1335 | | |
1332 | 1336 | | |
| |||
1338 | 1342 | | |
1339 | 1343 | | |
1340 | 1344 | | |
| 1345 | + | |
1341 | 1346 | | |
1342 | 1347 | | |
1343 | 1348 | | |
| |||
1371 | 1376 | | |
1372 | 1377 | | |
1373 | 1378 | | |
| 1379 | + | |
1374 | 1380 | | |
1375 | 1381 | | |
1376 | 1382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
0 commit comments