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


##########
core/src/main/java/org/apache/iceberg/DeleteFileIndex.java:
##########
@@ -160,6 +173,20 @@ DeleteFile[] forDataFile(long sequenceNumber, DataFile 
file) {
         .toArray(DeleteFile[]::new);
   }
 
+  private DeleteFile[] limitWithoutColumnStatsFiltering(

Review Comment:
   Nice find, maybe worth a comment



##########
core/src/main/java/org/apache/iceberg/DeleteFileIndex.java:
##########
@@ -148,7 +152,15 @@ DeleteFile[] forDataFile(long sequenceNumber, DataFile 
file) {
 
     if (globalDeletes == null && partitionDeletes == null) {
       return NO_DELETES;
+    } else if (useColumnStatsFiltering) {
+      return limitWithColumnStatsFiltering(sequenceNumber, file, 
partitionDeletes);

Review Comment:
   How about filterWithColumnStats, filterWithoutColumnStats ?
   
   Slightly shorter, and not sure if word 'limit' has any different 
significance than `filter` worth calling out?



##########
core/src/main/java/org/apache/iceberg/DeleteFileIndex.java:
##########
@@ -494,7 +522,13 @@ DeleteFileIndex build() {
             wrappersBySpecId
                 .computeIfAbsent(specId, id -> 
StructLikeWrapper.forType(spec.partitionType()))
                 .copyFor(file.partition());
-        deleteFilesByPartition.put(Pair.of(specId, wrapper), new 
IndexedDeleteFile(spec, file));
+        IndexedDeleteFile indexedFile = new IndexedDeleteFile(spec, file);
+        deleteFilesByPartition.put(Pair.of(specId, wrapper), indexedFile);
+
+        if (!useColumnStatsFiltering) {

Review Comment:
   `useColumnStatsFiltering |= indexedFile.hasLowerAndUpperBounds()` also 
works,  but optional as its just style perference



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