[GH-2830] Add python / scala tests and add SRID-preservation tests for geography functions#2870
Merged
Merged
Conversation
…on tests for geography functions
Contributor
There was a problem hiding this comment.
Pull request overview
Adds missing DataFrame API coverage for Geography in both Scala and Python, and introduces a new suite to ensure SRID is preserved across key Geography expression chains (including through InferredExpression).
Changes:
- Added
PreserveSRIDGeographySuiteto validate SRID preservation for Geography→Geography, cross-type conversions, and wrapped scalar/predicate cases. - Expanded Scala Geography DataFrame API tests to cover additional functions/predicates and filled constructor gaps (
ST_GeogFromText,ST_GeogCollFromText). - Implemented Python
st_constructorswrappers for missing Geography constructors/conversions and replaced placeholder Python geography tests with real DataFrame API coverage.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| spark/common/src/test/scala/org/apache/sedona/sql/geography/PreserveSRIDGeographySuite.scala | New SRID-preservation test suite for Geography expression chains and conversions. |
| spark/common/src/test/scala/org/apache/sedona/sql/geography/FunctionsDataFrameAPITest.scala | Adds DataFrame API tests for geography functions and a predicate (ST_Intersects). |
| spark/common/src/test/scala/org/apache/sedona/sql/geography/ConstructorsDataFrameAPITest.scala | Adds DataFrame API tests for ST_GeogFromText and ST_GeogCollFromText SRID handling. |
| python/tests/sql/test_geography.py | Replaces placeholders with comprehensive Python wrapper/DataFrame API tests for geography constructors, functions, and predicates. |
| python/sedona/spark/sql/st_constructors.py | Adds Python wrappers for missing Geography constructors and geometry↔geography conversion functions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
We also have DataFrame APIs in Scala. Please add those as well |
Member
Author
Sure, I have added the scala dataframe tests for these new st functions - spark/common/src/test/scala/org/apache/sedona/sql/geography/FunctionsDataFrameAPITest.scala |
jiayuasu
approved these changes
May 3, 2026
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
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.
Did you read the Contributor Guide?
Is this PR related to a ticket?
[GH-XXX] my subject. Closes #<issue_number>What changes were proposed in this PR?
This PR add the following tests for the st geography functions.
How was this patch tested?
new tests should all pass
Did this PR include necessary documentation updates?