aokolnychyi commented on a change in pull request #3661:
URL: https://github.com/apache/iceberg/pull/3661#discussion_r770761313
##########
File path:
spark/v3.2/spark/src/test/java/org/apache/iceberg/spark/TestSparkDistributionAndOrderingUtil.java
##########
@@ -296,6 +299,285 @@ public void testRangeWritePartitionedSortedTable() {
checkWriteDistributionAndOrdering(table, expectedDistribution,
expectedOrdering);
}
+ @Test
+ public void testDefaultCopyOnWriteDeleteUnpartitionedUnsortedTable() {
+ sql("CREATE TABLE %s (id bigint, data string) USING iceberg", tableName);
+
+ Table table = validationCatalog.loadTable(tableIdent);
+
+ Distribution expectedDistribution = Distributions.unspecified();
+ SortOrder[] expectedOrdering = new SortOrder[]{};
+ checkCopyOnWriteDeleteDistributionAndOrdering(table, expectedDistribution,
expectedOrdering);
Review comment:
I matched the existing logic we had in 3.0. I guess we previously looked
at the write distribution and if the table had no sort, was unpartitioned and
the write distribution wasn't set, we assumed there is no reasonable
distribution and ordering in the table so there was no reason trying to keep it.
There are some benefits of using `hash` (assuming the user distributed and
ordered the data manually) so I can change the default value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]