ovj commented on a change in pull request #3207:
URL: https://github.com/apache/iceberg/pull/3207#discussion_r747897629
##########
File path: core/src/main/java/org/apache/iceberg/actions/BinPackStrategy.java
##########
@@ -120,14 +125,19 @@ public RewriteStrategy options(Map<String, String>
options) {
MIN_INPUT_FILES,
MIN_INPUT_FILES_DEFAULT);
+ removeDeletes = PropertyUtil.propertyAsBoolean(
+ options, RewriteDataFiles.REMOVE_GLOBAL_DELETES,
RewriteDataFiles.REMOVE_GLOBAL_DELETES_DEFAULT) ||
+ PropertyUtil.propertyAsBoolean(options,
RewriteDataFiles.REMOVE_PARTITION_DELETES,
+ RewriteDataFiles.REMOVE_PARTITION_DELETES_DEFAULT);
+
validateOptions();
return this;
}
@Override
public Iterable<FileScanTask> selectFilesToRewrite(Iterable<FileScanTask>
dataFiles) {
return FluentIterable.from(dataFiles)
- .filter(scanTask -> scanTask.length() < minFileSize ||
scanTask.length() > maxFileSize);
+ .filter(scanTask -> removeDeletes || scanTask.length() < minFileSize
|| scanTask.length() > maxFileSize);
Review comment:
If global_deletes is false and partition_deletes is true, and there are
no partition_delete_files for that partition, we can fall back to the original
filter where we only check the file size to qualify the data file for rewriting.
--
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]