singhpk234 commented on code in PR #15748:
URL: https://github.com/apache/iceberg/pull/15748#discussion_r2978891019


##########
core/src/test/java/org/apache/iceberg/FileGenerationUtil.java:
##########
@@ -280,6 +280,10 @@ private static long generateContentLength() {
   }
 
   private static Pair<ByteBuffer, ByteBuffer> generateBounds(PrimitiveType 
type, MetricsMode mode) {
+    if (mode instanceof None || mode instanceof Counts) {
+      return Pair.of(null, null);
+    }
+
     Comparator<Object> cmp = Comparators.forType(type);
     Object value1 = generateBound(type, mode);
     Object value2 = generateBound(type, mode);

Review Comment:
   optional: 
   ```suggestion
     Object value1 = generateBound(type, mode);
     Object value2 = generateBound(type, mode);
     if (value1 = null || value2 = null) {
        return Pair.of(null, null) 
     }
     Comparator<Object> cmp = Comparators.forType(type);
     .....
   ```
   
   This way generateBound() is single place where we define null for these, we 
already have this handling there. 



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