findinpath commented on code in PR #18338:
URL: https://github.com/apache/iceberg/pull/18338#discussion_r4211809488


##########
api/src/main/java/org/apache/iceberg/expressions/InclusiveMetricsEvaluator.java:
##########
@@ -87,11 +112,11 @@ private boolean eval(ContentFile<?> file) {
         return ROWS_MIGHT_MATCH;
       }
 
-      this.valueCounts = file.valueCounts();
-      this.nullCounts = file.nullValueCounts();
-      this.nanCounts = file.nanValueCounts();
-      this.lowerBounds = file.lowerBounds();
-      this.upperBounds = file.upperBounds();
+      this.valueCounts = statsForColumns(file, ContentFile::valueCounts);

Review Comment:
   > Maybe even we should filter out stats when reading the equality deletes?
   
   
   This changes what `DeleteFile.lowerBounds()/valueCounts()/nullValueCounts()` 
return, not just how they're used for predicate matching. Any other consumer of 
those stats (metadata tables like `FilesTable`/`ManifestsTable`, 
size/compaction heuristics, future planning code) would silently lose real 
stats for non-key columns that the Iceberg spec explicitly says may 
legitimately be present in the 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]

Reply via email to