Skip to content

Conversation

@uros-db
Copy link
Contributor

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

What changes were proposed in this pull request?

This PR follows up on #52627, and fixes an issue with GeographyType JSON parsing in PySpark. Also, this PR adds appropriate tests for JSON parsing, both for GeographyType and GeometryType.

Why are the changes needed?

Fixing a wrong error class thrown in the JSON parsing method for GeographyType.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Added new test cases to:

  • pyspark.sql.tests.test_geographytype
  • pyspark.sql.tests.test_geometrytype

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

No.

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.

@zhengruifeng
Copy link
Contributor

merged to master

huangxiaopingRD pushed a commit to huangxiaopingRD/spark that referenced this pull request Nov 25, 2025
…Geography JSON parsing

### What changes were proposed in this pull request?
This PR follows up on apache#52627, and fixes an issue with `GeographyType` JSON parsing in PySpark. Also, this PR adds appropriate tests for JSON parsing, both for `GeographyType` and `GeometryType`.

### Why are the changes needed?
Fixing a wrong error class thrown in the JSON parsing method for `GeographyType`.

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

### How was this patch tested?
Added new test cases to:
- `pyspark.sql.tests.test_geographytype`
- `pyspark.sql.tests.test_geometrytype`

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

Closes apache#52772 from uros-db/geo-python-types-tests.

Authored-by: Uros Bojanic <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants