MergingDataSpec:
Data
- should be merged
+ Given a table with 20 rows
+ When we use 'replaceWhere' to write 20 new rows that have partition keys {0} and where the merge condition is 'partitionKey = 0'
+ And the distribution of partition keys to row counts looks like:
Partition Key Count
------------- -----
0 4
1 4
2 4
3 4
4 4
+ Then the partition IDs that are not 0 will not change but partition 0 will have the new rows
+ And the distribution of partition keys to row counts looks like:
Partition Key Count
------------- -----
0 20
1 4
2 4
3 4
4 4
where the data with partition key '0' has been upserted
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- should not be merged if the partition key is not defined
+ Given a table with partition keys 0, 1, 2, 3, 4
+ When we use 'replaceWhere' to write 20 new rows that have partition keys {0, 1, 2, 3, 4} and where the merge condition is 'partitionKey = 0'
+ Then a DeltaInvariantViolationException$ is thrown
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +