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


##########
core/src/main/java/org/apache/iceberg/util/ContentFileUtil.java:
##########
@@ -175,7 +175,9 @@ private static Metrics metricsWithoutPathBounds(DeleteFile 
file) {
         file.nullValueCounts(),
         file.nanValueCounts(),
         lowerBounds == null ? null : Collections.unmodifiableMap(lowerBounds),
-        upperBounds == null ? null : Collections.unmodifiableMap(upperBounds));
+        upperBounds == null ? null : Collections.unmodifiableMap(upperBounds),
+        file.avgValueSizes(),

Review Comment:
   Please remove PATH_ID from avgValueSizes in both path-rewrite helpers and 
normalize an empty result to null. The action rewrites the position-delete 
file_path values, so preserving the old average produces stale statistics 
whenever the source and target prefixes have different byte lengths. Removing 
only PATH_ID preserves any unrelated statistics.



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