szehon-ho commented on code in PR #8172:
URL: https://github.com/apache/iceberg/pull/8172#discussion_r1278178785


##########
core/src/main/java/org/apache/iceberg/DeleteFileIndex.java:
##########
@@ -423,7 +445,13 @@ Builder scanMetrics(ScanMetrics newScanMetrics) {
       return this;
     }
 
-    DeleteFileIndex build() {
+    private Collection<DeleteFile> filterDeleteFiles() {
+      return Streams.stream(deleteFiles)
+          .filter(file -> file.dataSequenceNumber() > minSequenceNumber)
+          .collect(Collectors.toList());

Review Comment:
   Question: does it make sense to keep this iterable instead of materializing 
to a List?  (looks like we just do a for: each here)  



##########
core/src/main/java/org/apache/iceberg/DeleteFileIndex.java:
##########
@@ -394,16 +410,22 @@ Builder specsById(Map<Integer, PartitionSpec> 
newSpecsById) {
     }
 
     Builder filterData(Expression newDataFilter) {
+      Preconditions.checkArgument(
+          deleteFiles == null, "Index constructed from files does not support 
data filters");
       this.dataFilter = Expressions.and(dataFilter, newDataFilter);
       return this;
     }
 
     Builder filterPartitions(Expression newPartitionFilter) {
+      Preconditions.checkArgument(

Review Comment:
   Question, we can probably support partition filters easier than row filters, 
if i understand correctly?  (Even with this current code)



-- 
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]

Reply via email to