Conversation
jiayuasu
marked this pull request as draft
September 16, 2026 07:19
This was referenced Sep 16, 2026
Signed-off-by: Jia Yu <jiayu@apache.org>
This was referenced Sep 18, 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?
Yes.
Is this PR related to a ticket?
Closes #3369. Depends on #3377. Builds on merged #3373.
Draft pending review and publication of
jts-io-patch:1.21.0-datasyslab-2.This PR is the serializer and SQL constructor step. Copy behavior is reviewed in #3377; file and adapter readers are in #3378. Review this step after #3377.
The IO2 work is reviewed in JTS #11 (shared layouts/reader) and JTS #12 (writer). Both belong to the same pending release.
WKB output is reviewed separately in #3381.
What changes were proposed in this PR?
Preserve layouts declared in WKB and Sedona geometry buffers, including empty primitive geometries and all-NaN Z/M values. A leading null in a GeoSeries does not change a geometry's layout.
Use IO2's shared declared-sequence types and
WKBReader.forDeclaredDimensions()directly. Sedona no longer definesDeclaredCoordinateSequence,DeclaredCoordinateSequenceFactory, orGeometryWkbReader. The JTS geometry factory remains ordinary; its sequence factory preserves declarations on copies without declaring subsequent sized allocations. Ordinary XY operations, includingST_GeneratePoints, remain XY.ST_SetSRIDuses the isolated copier through #3377.Spark's bundled JTS jar stays in place and the Sedona wire format is unchanged. Multipart geometries have one layout header, so conflicting declared component layouts raise the existing heterogeneous-layout error, including XY mixed with a declared empty Z component. Apply
ST_ForceCollectionbefore collection to retain individual layouts. Zero-member collections have no coordinate sequence carrying their own declaration.How was this patch tested?
The core API adaptation passed 100 focused common tests. Validated the combined Sedona stack at
76f59c947971e06657d01229a4f940863d3e5253against the local, unpublished IO2 candidate:The IO2 candidate passes 80 focused JTS core tests and 27 isolated-artifact tests against stock JTS 1.20. These are local results; the dependency remains unpublished.
Did this PR include necessary documentation updates?
ST_CollectandST_Collect_Aggdocument layout requirements and the GeometryCollection alternative. No SQL API or wire-format change.