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


##########
api/src/main/java/org/apache/iceberg/Metrics.java:
##########
@@ -244,14 +244,50 @@ public Map<Integer, ByteBuffer> upperBounds() {
     return upperBounds;
   }
 
+  /**
+   * Get the total uncompressed size in memory in bytes of non-null values, 
for all fields where it
+   * was collected.
+   *
+   * @return a Map of fieldId to total uncompressed size in bytes
+   */
+  public Map<Integer, Long> totalBytes() {
+    return totalBytes;
+  }
+
   /**
    * Get the average value size in memory (uncompressed) in bytes over 
non-null values, for all
    * fields where it was collected.
    *
    * @return a Map of fieldId to average value size in bytes
+   * @deprecated since 1.13.0, will be removed in 2.0.0; use {@link 
#totalBytes()} instead.
    */
+  @Deprecated
   public Map<Integer, Integer> avgValueSizes() {
-    return avgValueSizes;
+    return avgValueSizes(totalBytes, valueCounts, nullValueCounts);

Review Comment:
   I'm ok either way but I think if we want to be consistent with how we 
typically deal with APIs, it's probably fine to deprecate it and then remove it 
in the next release, regardless of whether this calculation is expensive or not.



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