jiayuasu opened a new pull request, #2904: URL: https://github.com/apache/sedona/pull/2904
## Did you read the Contributor Guide? - Yes, I have read the [Contributor Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor Development Guide](https://sedona.apache.org/latest/community/develop/) ## Is this PR related to a ticket? - Yes, and the PR name follows the format `[GH-XXX] my subject`. Closes #2887 ## What changes were proposed in this PR? Mirrors the Phase 1 Box2D SQL surface in PySpark Column wrappers: | Function | Module | |---|---| | `ST_Box2D(geom)` | `sedona.spark.sql.st_functions` | | `ST_MakeBox2D(p1, p2)` | `sedona.spark.sql.st_constructors` | | `ST_GeomFromBox2D(box)` | `sedona.spark.sql.st_constructors` | | `ST_Extent(geom)` | `sedona.spark.sql.st_aggregates` | The accessor overloads (`ST_XMin`, `ST_XMax`, `ST_YMin`, `ST_YMax`) and `ST_AsText` already accept Box2D inputs through their existing PySpark wrappers — the JVM-side overload resolution doesn't require Python-side changes. The Python `Box2DType` UDT and `Box2D` value class were added in #2878. Collected results materialize as `Box2D` Python objects with `xmin/ymin/xmax/ymax` attributes. ## How was this patch tested? - `python/tests/sql/test_function.py` — `test_st_box_2d` (happy path + NULL/empty propagation), `test_st_as_text_box_2d` (PostGIS BOX format). - `python/tests/sql/test_constructor_test.py` — `test_st_make_box_2d` (happy path + NULL propagation), `test_st_geom_from_box_2d` (POLYGON/POINT/LINESTRING dispatch matching #2899). - `python/tests/sql/test_aggregate_functions.py` — `test_st_extent` (happy path), `test_st_extent_returns_null_for_empty_input` (NULL/empty input → NULL). ## Did this PR include necessary documentation updates? - No, this PR does not affect any public SQL API documentation surface in isolation. Documentation for the Phase 1 Box2D surface (#2877) lands as a single coherent docs update once the Flink bindings (#2888) and GeoParquet writer (#2886) are in. Scala DataFrame API wrappers tracked separately in #2891. -- 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]
