-
Notifications
You must be signed in to change notification settings - Fork 632
feat(client-v2, jdbc-v2): add MultiPoint data type support #3050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
polyglotAI-bot
wants to merge
4
commits into
main
Choose a base branch
from
polyglot/multipoint-type-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
aa6ee95
feat(client-v2, jdbc-v2): add MultiPoint data type support
polyglotAI-bot 58487f5
test(client-v2): cover two dimensional geo variant matching
polyglotAI-bot 0e27b55
Merge remote-tracking branch 'origin/main' into polyglot/multipoint-t…
polyglotAI-bot 298a8ea
Merge remote-tracking branch 'origin/main' into polyglot/multipoint-t…
polyglotAI-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you — the technical description of the Native layout is correct, and I verified it. But the behavior is pre-existing for every geo type and is not introduced by this PR, so I am not changing it here.
What this PR changes in this file: one line,
case MultiPoint: return (T) readGeoRing();.NativeFormatReaderis untouched by the diff.Why
MultiPointis not special:NativeFormatReader.readBlock()enters its columnar Array branch only whencolumn.isArray()is true.Point,Ring,LineString,MultiLineString,PolygonandMultiPolygonare all distinctClickHouseDataTypevalues, soisArray()is already false for each of them and each already falls through tobinaryStreamReader.readValue(column).MultiPointinherits exactly the same routing as its siblings.Measured on
main's code path (ClickHouse 26.7.3.19), usingRing—SELECT r FROM ... FORMAT Nativefor the rows[(1,2),(3,4)]and[(5,6)]:Fed to
NativeFormatReader:Expected
[[1.0,2.0],[3.0,4.0]]then[[5.0,6.0]]. SoRing— with no code from this PR involved — already shows the failure mode you describe.Why not fix it in this PR: either remedy (a Native columnar decode path for geo columns, or an explicit
ClientExceptionfor geo in Native asreadBlockalready does for undecodable QBit shapes) changes the observable behavior ofPoint/Ring/LineString/MultiLineString/Polygon/MultiPolygon. That is a behavior change on existing types and needs its own PR and maintainer buy-in; bundling it into an additiveMultiPointfeature would mix two concerns. RejectingMultiPointalone in Native would also make it inconsistent with the siblings that share its wire format.The MultiPoint read/write tests in this PR run through
RowBinaryWithNamesAndTypes, which is correct for all geo types today.I have logged the pre-existing Native geo defect for a separate fix, including the reproduction above. It is distinct from #2955 / #2956 and from the
Arrayelement sub-structure work, because geo columns never enter theArraybranch at all.Leaving this thread open for maintainer visibility.