wgtmac commented on code in PR #3222:
URL: https://github.com/apache/parquet-java/pull/3222#discussion_r2103642267
##########
parquet-column/src/main/java/org/apache/parquet/column/statistics/geospatial/BoundingBox.java:
##########
@@ -218,16 +233,27 @@ public void merge(BoundingBox other) {
return;
}
- this.xMin = Math.min(this.xMin, other.xMin);
- this.xMax = Math.max(this.xMax, other.xMax);
+ // We don't yet support merging wraparound bounds.
+ // Rather than throw, we mark the X bounds as invalid.
+ if (isXWraparound() || other.isXWraparound()) {
+ // Mark X dimension as invalid by setting to NaN
+ xMin = Double.NaN;
+ xMax = Double.NaN;
Review Comment:
I'm good with the current one because they are equivalent because setting x
to NaN will finally discard the bbox from the file.
##########
parquet-column/src/main/java/org/apache/parquet/column/statistics/geospatial/BoundingBox.java:
##########
@@ -218,16 +233,27 @@ public void merge(BoundingBox other) {
return;
}
- this.xMin = Math.min(this.xMin, other.xMin);
- this.xMax = Math.max(this.xMax, other.xMax);
+ // We don't yet support merging wraparound bounds.
+ // Rather than throw, we mark the X bounds as invalid.
+ if (isXWraparound() || other.isXWraparound()) {
+ // Mark X dimension as invalid by setting to NaN
+ xMin = Double.NaN;
+ xMax = Double.NaN;
Review Comment:
I'm good with the current one because they are equivalent as setting x to
NaN will finally discard the bbox from the file.
--
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]