RussellSpitzer commented on a change in pull request #2829:
URL: https://github.com/apache/iceberg/pull/2829#discussion_r706502816
##########
File path:
spark/src/test/java/org/apache/iceberg/spark/actions/TestNewRewriteDataFilesAction.java
##########
@@ -590,6 +595,156 @@ public void testInvalidOptions() {
.execute());
}
+ @Test
+ public void testSortMultipleGroups() {
+ Table table = createTable(20);
+ shouldHaveFiles(table, 20);
+ table.replaceSortOrder().asc("c2").commit();
+ int fileSize = averageFileSize(table);
+
+ List<Object[]> originalData = currentData();
+
+ // Perform a rewrite but only allow 2 files to be compacted at a time
+ RewriteDataFiles.Result result =
+ basicRewrite(table)
+ .sort()
+ .option(SortStrategy.REWRITE_ALL, "true")
+ .option(RewriteDataFiles.MAX_FILE_GROUP_SIZE_BYTES,
Integer.toString(fileSize * 2 + 100))
+ .option(BinPackStrategy.MIN_INPUT_FILES, "1")
Review comment:
I forgot I set REWRITE ALL to only apply to filtering and not to the
group limits, I should make it apply to both
--
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]