Skip to content

Scala/Python DataFrame API wrappers for Box2D Phase 1 functions #2891

@jiayuasu

Description

@jiayuasu

Sub-task of #2877.

Scope

Each SQL function added under #2877 (`ST_Box2D`, `ST_MakeBox2D`, `ST_Extent`, accessor overloads, `CAST(box2d AS geometry)`, `ST_AsText(box2d)`) needs a corresponding Scala DataFrame API wrapper in `org.apache.spark.sql.sedona_sql.expressions.st_functions` so users can call them via Column expressions instead of dropping to `expr("ST_Box2D(...)")`.

The Python equivalents live under #2887 — this issue tracks the JVM-side Scala DataFrame API specifically.

Why split out

The first SQL-only PR (#2890, `ST_Box2D`) was kept narrow to land the new return-type plumbing in `InferredExpression` cleanly. Layering on the DataFrame API for one function in isolation reads awkwardly; doing the whole Phase 1 surface in one wrapper PR (or co-located with each SQL function PR, batched after the SQL functions land) gives a coherent surface.

Implementation

For each Box2D-returning or Box2D-consuming function in Phase 1, add a Scala wrapper in `st_functions` that takes `Column` arguments and returns a `Column`, mirroring the pattern used by `ST_Envelope`, `ST_XMin` etc.

Depends on

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions