stevenzwu commented on code in PR #18394:
URL: https://github.com/apache/iceberg/pull/18394#discussion_r4192226353
##########
core/src/main/java/org/apache/iceberg/FieldStatsStruct.java:
##########
@@ -231,6 +232,9 @@ private static int[] posToOffset(Types.StructType struct) {
private static Object copyBound(Object bound) {
if (bound instanceof byte[] bytes) {
return copyOf(bytes);
+ } else if (bound instanceof GeospatialBound geo) {
+ // readers reuse one bound instance
+ return geo.copy();
} else if (bound instanceof StructLike struct) {
return StructLikeUtil.copy(struct);
Review Comment:
kept this StructLike copy because geo bounds are not always GeospatialBound.
TestFieldStatsStruct.geoSerialization still builds lower and upper bounds as
PartitionData.
We can explore removing this branch if desired.
--
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]