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


##########
api/src/main/java/org/apache/iceberg/ContentFile.java:
##########
@@ -99,6 +99,17 @@ default String location() {
   /** Returns if collected, map from column ID to value upper bounds, null 
otherwise. */
   Map<Integer, ByteBuffer> upperBounds();
 
+  /**
+   * Returns if collected, map from column ID to its average value size in 
memory (uncompressed) in
+   * bytes over non-null values, null otherwise.
+   *
+   * <p>This statistic is not persisted in manifests prior to v4, so it is 
generally only present

Review Comment:
   Please apply the Spotless wrapping here. The latest build-checks job fails 
:iceberg-api:spotlessJavaCheck on this Javadoc, so required CI remains red.



##########
core/src/main/java/org/apache/iceberg/BaseFile.java:
##########
@@ -217,13 +220,15 @@ abstract class BaseFile<F> extends SupportsIndexProjection
       this.nanValueCounts = copyMap(toCopy.nanValueCounts, requestedColumnIds);
       this.lowerBounds = copyByteBufferMap(toCopy.lowerBounds, 
requestedColumnIds);
       this.upperBounds = copyByteBufferMap(toCopy.upperBounds, 
requestedColumnIds);
+      this.avgValueSizes = copyMap(toCopy.avgValueSizes, requestedColumnIds);

Review Comment:
   Please normalize this to null when filtering removes every average-size 
entry. copyMap returns a non-null empty SerializableMap, so copyWithStats with 
a nonmatching field ID differs from the accessor contract and from the 
tracked-file adapter. Could we also add a nonmatching-column test?



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