rdblue commented on a change in pull request #351: Extend Iceberg with a way to
overwrite files for eager updates/deletes
URL: https://github.com/apache/incubator-iceberg/pull/351#discussion_r315464625
##########
File path: core/src/main/java/org/apache/iceberg/OverwriteData.java
##########
@@ -56,14 +67,34 @@ public OverwriteFiles addFile(DataFile file) {
}
@Override
- public OverwriteFiles validateAddedFiles() {
- this.validateAddedFiles = true;
+ public OverwriteFiles deleteFile(DataFile file) {
+ Preconditions.checkState(!overwriteByRowFilter,
+ "Either overwriteByRowFilter or deleteFile should be used, not both");
+ this.deleteFilesByPath = true;
+ delete(file.path());
+ return this;
+ }
+
+ @Override
+ public OverwriteFiles validateAddedFilesMatchOverwriteFilter() {
+ Preconditions.checkState(!deleteFilesByPath,
+ "Added files can be validated only if overwriteByRowFilter is used");
Review comment:
I don't think these are mutually exclusive. I could still delete by filter
and want to validate no files matching a filter (probably the same one) have
been added.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]