Conversation
Signed-off-by: Jia Yu <jiayu@apache.org>
Signed-off-by: Jia Yu <jiayu@apache.org>
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?
Follow-up to #3369 and #3374. Depends on the shared IO2 layout API and writer changes. The branch includes #3378 as a prerequisite; review only this output step.
Draft pending prerequisite reviews and publication of IO2.
The IO2 work is reviewed in JTS #11 (shared layouts/reader) and JTS #12 (writer). Both belong to the same pending release.
What changes were proposed in this PR?
ST_AsBinary,ST_AsEWKB, andST_AsHEXEWKBnow preserve declared Z/M layouts for empty geometries and all-NaN ordinates. They use the isolated WKB writer's opt-in preservation mode instead of choosing dimensions from the first coordinate. A finite Z later in a line is no longer dropped, and mixed GeometryCollection members keep their individual layouts.Ordinary XY output, byte order, and SRID behavior remain intact. The public explicit-dimension writer helper keeps its stock JTS return type and behavior. GeoParquet output and explicit 2D adapter writers are unchanged. Collections with no members lack sequence metadata and are written as XY.
How was this patch tested?
Five of six new common tests fail against the prior automatic output behavior. The updated code passes, and two SQL tests cover output after a shuffle/cache and nulls.
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?
Updated all three output function pages, including M preservation and the zero-member collection limit.