sql: version gate JSON columns on inverted indexes#105840
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Jul 6, 2023
Merged
sql: version gate JSON columns on inverted indexes#105840craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
Collaborator
|
there is an issue though: |
rafiss
requested changes
Jun 30, 2023
Collaborator
rafiss
left a comment
There was a problem hiding this comment.
the code change is too strict, since the failing test actually is using an inverted index, but the check still fails:
# Test selecting, inserting, updating, and deleting on a table with a
# multi-column JSON inverted index.
statement ok
CREATE TABLE d (
id INT PRIMARY KEY,
foo JSONB,
bar JSONB,
INVERTED INDEX idx (foo, bar)
);
Previously, our version gate for forward JSON indexes did not correctly handle the case when they are used in inverted indexes. When these columns are not the last column in an inverted index they need to be forward indexable, requiring a similar version gate. This patch fixes version gate logic for this scenario. Fixes: cockroachdb#104178, cockroachdb#104707 Release note: None
Collaborator
Author
|
@rafiss That test has to be updated since it's the mixed version config. Previously attempting to make an inverted index JSON column as the non-last column would result in the same error, so I updated the test to skip over these bits in a mixed version setting. |
rafiss
approved these changes
Jul 6, 2023
Collaborator
rafiss
left a comment
There was a problem hiding this comment.
makes sense, thanks for explaining!
Collaborator
Author
|
@rafiss TFTR! bors r+ |
Contributor
|
Build failed (retrying...): |
Contributor
|
Build succeeded: |
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.
Previously, our version gate for forward JSON indexes did not correctly handle the case when they are used in inverted indexes. When these columns are not the last column in an inverted index they need to be forward indexable, requiring a similar version gate. This patch fixes version gate logic for this scenario.
Fixes: #104178, Fixes #104707
Release note: None