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


##########
core/src/main/java/org/apache/iceberg/ContentStatsBackedMap.java:
##########
@@ -165,7 +166,39 @@ private static <V> V statValue(FieldStats<?> fieldStats, 
Kind kind) {
 
   private static ByteBuffer bound(FieldStats<?> fieldStats, Object bound, 
String boundFieldName) {
     Type boundType = fieldStats.type().fieldType(boundFieldName);
+    if (boundType == null) {
+      return null;
+    }
+
+    if (boundType.isStructType()) {

Review Comment:
   Nit: rather than treating any struct bound as geo via `isStructType()`, can 
we check that this is a geometry/geography bound explicitly? That works today 
only because `StatsUtil` uses struct bounds solely for geo types, and an 
explicit check would avoid silently taking this path if another type ever gains 
struct bounds.



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