-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-54079][Geo][SQL] Introduce the framework for adding ST expressions in Catalyst #52784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uros-db
commented
Oct 29, 2025
Contributor
Author
uros-db
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review @cloud-fan @mkaravel @szehon-ho.
cloud-fan
reviewed
Oct 30, 2025
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/st/stExpressions.scala
Outdated
Show resolved
Hide resolved
cloud-fan
reviewed
Oct 30, 2025
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/st/stExpressions.scala
Outdated
Show resolved
Hide resolved
cloud-fan
approved these changes
Oct 30, 2025
Contributor
|
the last commit is just indentation fix, no need to wait for tests. thanks, merging to master! |
This was referenced 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR implements rudimentary
WKBread/write capabilities forGeographyandGeometry, introduces a minimal set of ST expressions for WKB handling in Catalyst, and registers the new SQL functions under the newst_funcsgroup.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.javaStExpressionsSuite.javaAdded a new E2E SQL test file:
st-functions.sqlAdded appropriate test cases to:
GeographyExecutionSuite.javaGeometryExecutionSuite.javaWas this patch authored or co-authored using generative AI tooling?
No.