Repository navigation
Conversation
This was referenced Nov 7, 2026
This branch has not been deployed
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?
Yes, I have read the contributor rules and development guide.
Is this PR related to a ticket?
Related to #3124. This is an independent compatibility fix discovered while preparing the Spark 4.2 port; it does not enable native types.
What changes were proposed in this PR?
Python
GeographyTypecurrently encodes compact geometry bytes, but the JVM geography UDT expects a four-byte big-endian SRID followed by WKB. Consequently, collecting JVM geography values in Python and sending Python geography values to the JVM fail.Use the existing JVM geography wire format on the Python side. Preserve SRID, supported Z/M dimensions, typed empties and nulls through
collect,createDataFrameand Python UDFs. A shared Shapely WKB helper handles the supported Shapely 1.x empty-constructor and old-GEOS empty-point cases.The JVM/S2 geography implementation, SQL geometry transport, and RDD/index serialization are unchanged.
How was this patch tested?
Review additionally reproduced three old-GEOS dimensional-empty failures; the corrected compatibility path passes all three. No actual GEOS <3.9 runtime was used.
Did this PR include necessary documentation updates?
No new public API. This fixes the behavior already documented by
GeographyType.