Skip to content

Conversation

uros-db
Copy link
Contributor

@uros-db uros-db commented Sep 30, 2025

What changes were proposed in this pull request?

Introduce two new logical types to Spark:

  • GeographyType
  • GeometryType

This PR also adds appropriate SQL parsing and JSON serialization logic for the new types.

Why are the changes needed?

Kicking off https://issues.apache.org/jira/browse/SPARK-51658 by adding GEOMETRY and GEOGRAPHY types to Spark.

Does this PR introduce any user-facing change?

Yes, two new logical data types are added as Experimental.

How was this patch tested?

Added new tests to:

  • GeographyTypeSuite
  • GeometryTypeSuite

Also, added appropriate test cases to:

  • DataTypeSuite

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

No.

@github-actions github-actions bot added the SQL label Sep 30, 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.

@mkaravel Please review.

Copy link
Member

@szehon-ho szehon-ho left a comment

Choose a reason for hiding this comment

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

Thanks @uros-db for kicking it off! left some comments/questions as i read it

@uros-db uros-db requested a review from szehon-ho October 6, 2025 11:08
@github-actions github-actions bot added the DOCS label Oct 6, 2025
@uros-db
Copy link
Contributor Author

uros-db commented Oct 7, 2025

Hi folks, please re-review. @szehon-ho @mkaravel

Copy link
Contributor

@mkaravel mkaravel left a comment

Choose a reason for hiding this comment

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

Generally LGTM. Please take a look at the comments I posted.
Thank you for this PR!

@uros-db uros-db requested a review from mkaravel October 9, 2025 17:51
Copy link
Contributor

@mkaravel mkaravel left a comment

Choose a reason for hiding this comment

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

@uros-db Thank you for addressing the comments!

LGTM.

@uros-db
Copy link
Contributor Author

uros-db commented Oct 9, 2025

@cloud-fan @szehon-ho Please review. Also cc @srielau (we have some new error classes here).

Copy link
Member

@szehon-ho szehon-ho left a comment

Choose a reason for hiding this comment

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

lgtm, be nice to document the expectation of the GeographyType and GeometryType argument (what is expected, not expected and only internal), as its a user facing API: ref: #52491 (comment)

@jiayuasu
Copy link
Member

jiayuasu commented Oct 10, 2025

Great work. The Apache Sedona team was not aware of or informed by this PR. We are now looking into this.

@jiayuasu
Copy link
Member

We will review and comment on this PR. This is to ensure it does not create incompatibility with Apache Sedona.

@uros-db
Copy link
Contributor Author

uros-db commented Oct 10, 2025

Thank you @jiayuasu. We will hold the merge until you have enough time to review. Please feel free to let me know if you have any questions or concerns.

Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

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

Very cool! Just a few notes from the GeoArrow/Parquet compatibility angle where most CRSes are written by spatial tools with a PROJJSON or authority:code CRS.

@uros-db uros-db requested a review from paleolimbot October 10, 2025 17:21
@uros-db
Copy link
Contributor Author

uros-db commented Oct 13, 2025

Hi folks @paleolimbot @jiayuasu, do you have any other concerns about this PR? cc @cloud-fan

@jiayuasu
Copy link
Member

Thanks. This PR looks good to us!

@uros-db
Copy link
Contributor Author

uros-db commented Oct 14, 2025

Thanks everyone for your reviews!

@cloud-fan This PR is ready for your review now.

@uros-db
Copy link
Contributor Author

uros-db commented Oct 15, 2025

@cloud-fan This should be ready for merge.

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 8ff9feb Oct 15, 2025
@dongjoon-hyun
Copy link
Member

Thank you, @uros-db , @cloud-fan and all.

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.

8 participants