nastra commented on code in PR #18310:
URL: https://github.com/apache/iceberg/pull/18310#discussion_r4227996284


##########
core/src/main/java/org/apache/iceberg/FieldStats.java:
##########
@@ -61,11 +61,35 @@ public interface FieldStats<T> {
   /** The total NaN value count, defined only when {@link 
#hasNanValueCount()}. */
   long nanValueCount();
 
+  /** Whether total bytes are tracked for this field. */
+  default boolean hasTotalBytes() {
+    return false;
+  }
+
+  /**
+   * The total uncompressed size in memory in bytes of non-null values, for 
variable-length types
+   * (string, binary, variant, geometry, geography).
+   */
+  default long totalBytes() {
+    return 0L;
+  }
+
   /**
    * The avg value size in memory (uncompressed) in bytes for variable-length 
types (string, binary,
    * variant, geometry, geography)
+   *
+   * @deprecated since 1.13.0, will be removed in 1.14.0; use {@link 
#totalBytes()} instead.
    */
-  Integer avgValueSizeInBytes();
+  @Deprecated

Review Comment:
   I would also be ok dropping it in all places, but I think just deprecating 
it and dropping it after the next release is just aligning better with our 
general strategy of maintaining APIs. Therefore I probably wouldn't want to 
include another `hasAvgValueSizeInBytes` just to mark it deprecated 



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