rdblue commented on code in PR #12956: URL: https://github.com/apache/iceberg/pull/12956#discussion_r2075699103
########## format/spec.md: ########## @@ -649,6 +649,8 @@ Notes: For `geometry` and `geography` types, `lower_bounds` and `upper_bounds` are both points of the following coordinates X, Y, Z, and M (see [Appendix G](#appendix-g-geospatial-notes)) which are the lower / upper bound of all objects in the file. For the X values only, xmin may be greater than xmax, in which case an object in this bounding box may match if it contains an X such that `x >= xmin` OR`x <= xmax`. In geographic terminology, the concepts of `xmin`, `xmax`, `ymin`, and `ymax` are also known as `westernmost`, `easternmost`, `southernmost` and `northernmost`, respectively. For `geography` types, these points are further restricted to the canonical ranges of [-180 180] for X and [-90 90] for Y. +Like for other types, null or invalid `geometry` and `geography` objects are skipped when calculating the upper and lower bounds. In contrast, null or invalid (NaN) coordinate values within a `geometry` or `geography` do not lead to the entire object being skipped, instead only that coordinate value itself is omitted for calculation. Note, no bounding box is produced if all x values or all y values in the file are invalid. Review Comment: For other types, only `null` and `NaN` values are omitted from the calculation, so I would rephrase this. It doesn't quite work to replace "invalid" with "NaN" though since I think you're talking about objects without coordinates. I think I'd just call out the two cases directly: > When calculating upper and lower bounds for `geometry` and `geography`, null and NaN values in a coordinate dimension are skipped; for example, `POINT (1 NaN)`contributes no value to the Y, Z, or M dimension bounds. If a dimension has no non-null or non-NaN values, that dimension is omitted from the bounding box. If either the X or Y dimension is missing then the bounding box itself is not produced. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org