Skip to content

Conversation

@uros-db
Copy link
Contributor

@uros-db uros-db commented Oct 29, 2025

What changes were proposed in this pull request?

This PR implements rudimentary WKB read/write capabilities for Geography and Geometry, introduces a minimal set of ST expressions for WKB handling in Catalyst, and registers the new SQL functions under the new st_funcs group.

Note that full standard geospatial format parsing support (as well as other specialized ST expressions) will be properly implemented and fully tested in the upcoming separate tasks.

Why are the changes needed?

Establish a minimal ST expression framework, laying the groundwork for proper WKB handling support, and the foundations for expanding spatial function support in the near future.

Does this PR introduce any user-facing change?

Yes, this PR introduces 3 new Catalyst expressions and corresponding SQL functions: ST_AsBinary, ST_GeogFromWKB, ST_GeomFromWKB.

How was this patch tested?

Added new Scala unit test suites:

  • StUtilsSuite.java
  • StExpressionsSuite.java

Added a new E2E SQL test file:

  • st-functions.sql

Added appropriate test cases to:

  • GeographyExecutionSuite.java
  • GeometryExecutionSuite.java

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the SQL label Oct 29, 2025
Copy link
Contributor Author

@uros-db uros-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cloud-fan
Copy link
Contributor

the last commit is just indentation fix, no need to wait for tests. thanks, merging to master!

@cloud-fan cloud-fan closed this in 56eaa8d Oct 30, 2025
cloud-fan pushed a commit that referenced this pull request Oct 31, 2025
…ns in Scala

### What changes were proposed in this pull request?
This PR adds rudimentary WKB read/write ST geospatial functions in Scala API, and registers the new Scala functions under the new `st_funcs` group.

Note that a similar framework was already implemented in Catalyst, as part of: #52784.

### Why are the changes needed?
Establish a minimal ST function framework in Scala API, setting the foundations for expanding geospatial function support in the near future.

### Does this PR introduce _any_ user-facing change?
Yes, this PR introduces 3 new Scala functions: `st_asbinary`, `st_geogfromwkb`, `st_geomfromwkb`.

### How was this patch tested?
Added new Scala unit test suites:
- `STFunctionsSuite.scala`

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes #52803 from uros-db/geo-scala-functions.

Authored-by: Uros Bojanic <uros.bojanic@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
zhengruifeng pushed a commit that referenced this pull request Nov 3, 2025
… and imports

### What changes were proposed in this pull request?
Following up on the original PR (#52784), this PR fixes catalyst expressions ST package and imports.

### Why are the changes needed?
Use proper package and referencing.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Existing tests suffice.

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes #52807 from uros-db/geo-st-expressions-package.

Authored-by: Uros Bojanic <uros.bojanic@databricks.com>
Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
cloud-fan pushed a commit that referenced this pull request Nov 3, 2025
…tions in PySpark

### What changes were proposed in this pull request?
This PR adds rudimentary WKB read/write ST geospatial functions in PySpark API, and registers the new Python functions in both PySpark and PySpark Connect.

Note that a similar framework was already implemented in Catalyst, as part of: #52784.

### Why are the changes needed?
Establish a minimal ST function framework in PySpark API, setting the foundations for expanding geospatial function support in the near future.

### Does this PR introduce _any_ user-facing change?
Yes, this PR introduces 3 new Python functions: `st_asbinary`, `st_geogfromwkb`, `st_geomfromwkb`.

### How was this patch tested?
Added new PySpark unit test suites:
- `test_functions`

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes #52849 from uros-db/geo-python-functions.

Authored-by: Uros Bojanic <uros.bojanic@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
cloud-fan pushed a commit that referenced this pull request Nov 3, 2025
…tions in PySpark

### What changes were proposed in this pull request?
This PR adds rudimentary WKB read/write ST geospatial functions in PySpark API, and registers the new Python functions in both PySpark and PySpark Connect.

Note that a similar framework was already implemented in Catalyst, as part of: #52784.

### Why are the changes needed?
Establish a minimal ST function framework in PySpark API, setting the foundations for expanding geospatial function support in the near future.

### Does this PR introduce _any_ user-facing change?
Yes, this PR introduces 3 new Python functions: `st_asbinary`, `st_geogfromwkb`, `st_geomfromwkb`.

### How was this patch tested?
Added new PySpark unit test suites:
- `test_functions`

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes #52849 from uros-db/geo-python-functions.

Authored-by: Uros Bojanic <uros.bojanic@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit 24110b6)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
cloud-fan pushed a commit that referenced this pull request Nov 5, 2025
… and imports

### What changes were proposed in this pull request?
Following up on the original PR (#52784), this PR fixes catalyst expressions ST package and imports.

### Why are the changes needed?
Use proper package and referencing.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Existing tests suffice.

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes #52807 from uros-db/geo-st-expressions-package.

Authored-by: Uros Bojanic <uros.bojanic@databricks.com>
Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
huangxiaopingRD pushed a commit to huangxiaopingRD/spark that referenced this pull request Nov 25, 2025
…ions in Catalyst

### What changes were proposed in this pull request?
This PR implements rudimentary `WKB` read/write capabilities for `Geography` and `Geometry`, introduces a minimal set of ST expressions for WKB handling in Catalyst, and registers the new SQL functions under the new `st_funcs` group.

Note that full standard geospatial format parsing support (as well as other specialized ST expressions) will be properly implemented and fully tested in the upcoming separate tasks.

### Why are the changes needed?
Establish a minimal ST expression framework, laying the groundwork for proper WKB handling support, and the foundations for expanding spatial function support in the near future.

### Does this PR introduce _any_ user-facing change?
Yes, this PR introduces 3 new Catalyst expressions and corresponding SQL functions: `ST_AsBinary`, `ST_GeogFromWKB`, `ST_GeomFromWKB`.

### How was this patch tested?
Added new Scala unit test suites:
- `StUtilsSuite.java`
- `StExpressionsSuite.java`

Added a new E2E SQL test file:
- `st-functions.sql`

Added appropriate test cases to:
- `GeographyExecutionSuite.java`
- `GeometryExecutionSuite.java`

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#52784 from uros-db/geo-st-expressions.

Lead-authored-by: Uros Bojanic <uros.bojanic@databricks.com>
Co-authored-by: Wenchen Fan <cloud0fan@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
huangxiaopingRD pushed a commit to huangxiaopingRD/spark that referenced this pull request Nov 25, 2025
…ns in Scala

### What changes were proposed in this pull request?
This PR adds rudimentary WKB read/write ST geospatial functions in Scala API, and registers the new Scala functions under the new `st_funcs` group.

Note that a similar framework was already implemented in Catalyst, as part of: apache#52784.

### Why are the changes needed?
Establish a minimal ST function framework in Scala API, setting the foundations for expanding geospatial function support in the near future.

### Does this PR introduce _any_ user-facing change?
Yes, this PR introduces 3 new Scala functions: `st_asbinary`, `st_geogfromwkb`, `st_geomfromwkb`.

### How was this patch tested?
Added new Scala unit test suites:
- `STFunctionsSuite.scala`

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#52803 from uros-db/geo-scala-functions.

Authored-by: Uros Bojanic <uros.bojanic@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
huangxiaopingRD pushed a commit to huangxiaopingRD/spark that referenced this pull request Nov 25, 2025
… and imports

### What changes were proposed in this pull request?
Following up on the original PR (apache#52784), this PR fixes catalyst expressions ST package and imports.

### Why are the changes needed?
Use proper package and referencing.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Existing tests suffice.

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#52807 from uros-db/geo-st-expressions-package.

Authored-by: Uros Bojanic <uros.bojanic@databricks.com>
Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
huangxiaopingRD pushed a commit to huangxiaopingRD/spark that referenced this pull request Nov 25, 2025
…tions in PySpark

### What changes were proposed in this pull request?
This PR adds rudimentary WKB read/write ST geospatial functions in PySpark API, and registers the new Python functions in both PySpark and PySpark Connect.

Note that a similar framework was already implemented in Catalyst, as part of: apache#52784.

### Why are the changes needed?
Establish a minimal ST function framework in PySpark API, setting the foundations for expanding geospatial function support in the near future.

### Does this PR introduce _any_ user-facing change?
Yes, this PR introduces 3 new Python functions: `st_asbinary`, `st_geogfromwkb`, `st_geomfromwkb`.

### How was this patch tested?
Added new PySpark unit test suites:
- `test_functions`

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#52849 from uros-db/geo-python-functions.

Authored-by: Uros Bojanic <uros.bojanic@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants