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:
Here we are selecting everything. Should we add check here if global
deletes is false & partition deletes flag is set but there are no deletes for
given file?
--
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]