jiayuasu opened a new issue, #2881: URL: https://github.com/apache/sedona/issues/2881
Sub-task of #2877. ## Scope Add the `ST_Box2D(geom) -> Box2D` scalar function. PostGIS calls this `Box2D(geometry)`; we use the `ST_` prefix for consistency with the rest of the Sedona surface. Returns the planar bounding box of the input geometry, or SQL NULL for null/empty input (PostGIS-compatible). Backed by `Box2D.fromGeometry(Geometry)` (already merged in #2878). ## Implementation - New `ST_Box2D` case class in `spark/common/.../expressions/Functions.scala` extending `InferredExpression`. - Add `Box2D` mappings in `InferredExpression.scala` (`InferrableType[Box2D]` instance, output serializer that turns a `Box2D` into a struct InternalRow, and `Box2DUDT` in the Spark return-type mapping). - Register the function in `spark/common/.../UDF/Catalog.scala`. - Test coverage: scalar over point/linestring/polygon, null input, empty geometry input, schema check. ## Out of scope `ST_MakeBox2D`, `ST_Extent`, accessor overloads, casts — separate child issues under #2877. -- 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]
