vishnuprakaz commented on code in PR #17493:
URL: https://github.com/apache/iceberg/pull/17493#discussion_r3718164295
##########
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:
Thanks for the review @szehon-ho, Added StatsUtil.isGeoBoundType which
checks the bounding-box shape explicitly with a direct test in TestStatsUtil.
So, a non-geo struct bound now falls through to Conversions.toByteBuffer and
fails loudly instead of silently encoding as geo.
--
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]