jiayuasu opened a new issue, #2926: URL: https://github.com/apache/sedona/issues/2926
Follow-up to the Phase 1 Box2D epic (#2877). ## Scope Add planar bbox predicates that operate on `Box2D` arguments: - `ST_BoxIntersects(a: Box2D, b: Box2D) -> boolean` — true if the two bboxes overlap (closed intervals). - `ST_BoxContains(a: Box2D, b: Box2D) -> boolean` — true if `a` fully contains `b`. These are the user-facing equivalents of PostGIS's `&&` and `~` operators on `box2d`. Spark SQL has no operator overloading, so we expose them as named functions. NULL propagates from either argument. ## Implementation - `boxIntersects(Box2D, Box2D)` and `boxContains(Box2D, Box2D)` helpers in `common/.../Predicates.java` (or `Functions.java` — pick whatever fits the existing convention). - New `ST_BoxIntersects` and `ST_BoxContains` case classes in `spark/common/.../expressions/Predicates.scala`. - Catalog registration. - Mirror in Scala DataFrame API, Python wrappers, Flink wrappers. - Tests covering: full overlap, partial overlap, edge-touching, disjoint, containment, NULL inputs. ## Out of scope - Mixed Box2D / Geometry predicates. Users can wrap geometry inputs with `ST_Box2D(geom)` first. - 3D predicates (waits for `Box3D`). - Spatial join planner integration that would use Box2D predicates for partitioning. That's a separate optimizer change. -- 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]
