-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
GiST test case for #4139 #336
Closed
Closed
Changes from 8 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ab85f28
Uncomment GiST test case for #4139
Komzpa 41b470f
what if key and query are swapped?
Komzpa 17542f9
GiST test don't really depend on SP-GiST
Komzpa 8d7bbee
what if contains/containedby are swapped only on internal, and argume…
Komzpa 515ec81
Numbers should be changed after semantics change
Komzpa c7e6fd9
It works if internal_consistent check is always overlaps()
Komzpa 13de0a2
Update regress_gist_index_nd.sql
Komzpa 222445a
Make sure gidx_merge makes box that gidx_contains the added one
Komzpa 23da396
Remove now-invalid memcpy optimization
Komzpa 04975b6
we need to initialize the first value
Komzpa dd0fa93
clean up debug code
Komzpa a4f31e0
Merge remote-tracking branch 'upstream/svn-trunk' into ticket-4139
Komzpa 71fba6f
link to ticket from question
Komzpa f65c51c
add NEWS for the change
Komzpa 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
&&&|180502|Seq Scan|180502|Index Scan | ||
~~ |35498|Seq Scan|35498|Index Scan | ||
@@ |35498|Seq Scan|35498|Index Scan | ||
~~ |39682|Seq Scan|39682|Index Scan | ||
@@ |39682|Seq Scan|39682|Index Scan | ||
~~=|480|Seq Scan|480|Index Scan |
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.
Is this shrinking really necessary now? If b_union has 10 dimensions and b_new 2, I'd expect the merge to have 10, not 2; that is, a merge between 2 boxes should be bigger, never smaller.
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.
Think of 3DM box: it has (minx, maxx, miny, maxy, -FLT_MAX, FLT_MAX, minm, maxm ) for padding, it is a 4D gidx.
When this gets into calculations here, it resets whatever was there in Z to -flt_max / flt_max, in gidx_merge logic. That is equivalent of dropping the dimension. Thus, unshared dimensions should be dropped to correctly summarize a group of other mixed-dimensions boxes.
Is there a fault in this logic?
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.
That's what I wasn't expecting. I'd expect that a XYM GBOX would result in a 3-dimension gidx, but as you say it's done by adding an infinite dimension instead [1]. Based on the preferences taken ([2]), I'm unsure whether
gidx_merge
the union should contain that extra dimension or not, but it appears that this was in fact the issue here.[1]
postgis/libpgcommon/gserialized_gist.c
Line 275 in a46d862
[2] https://lists.osgeo.org/pipermail/postgis-devel/2015-February/024759.html