-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: add FORCE_INVERTED_INDEX hint #120384
Conversation
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.
Reviewed 4 of 4 files at r1, 2 of 2 files at r2, 3 of 3 files at r3, 8 of 8 files at r4, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @mgartner and @rytaft)
pkg/sql/parser/sql.y
line 941 at r3 (raw file):
%token <str> FAILURE FALSE FAMILY FETCH FETCHVAL FETCHTEXT FETCHVAL_PATH FETCHTEXT_PATH %token <str> FILES FILTER %token <str> FIRST FLOAT FLOAT4 FLOAT8 FLOORDIV FOLLOWING FOR FORCE FORCE_INDEX FORCE_INVERTED_SCAN
Should it be FORCE_INVERTED_INDEX
instead? You could justify either, but it'll be hard to change once we go with one.
Previously, DrewKimball (Drew Kimball) wrote…
Hmmm, tough call. On the one hand |
The `parse-no-verify` test command has been added to data-driven parser tests. In addition, the `error` test command now asserts that parsing the statement results in an error. Release note: None
This is purely a mechanical movement of parser tests with index hints into a new file. Release note: None
bab8322
to
2cd52f3
Compare
Previously, mgartner (Marcus Gartner) wrote…
I went with |
This commit adds parsing support for the `FORCE_INVERTED_INDEX` hint. The hint currently has no effect. Release note: None
Release note (sql change): The `FORCE_INVERTED_INDEX` hint is now supported. This makes the optimizer prefer a query plan scan over any inverted index of the hinted table. The query will result in an error if no such query plan can be generated.
2cd52f3
to
685df12
Compare
TFTR! bors r=DrewKimball |
Build succeeded: |
blathers backport 23.1 |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from 32d981b to blathers/backport-release-23.1-120384: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.1 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
blathers backport 23.2 |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from 32d981b to blathers/backport-release-23.2-120384: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.2 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
blather backport 24.1 |
blathers backport 24.1 |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from b78cfaa to blathers/backport-release-24.1-120384: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 24.1 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Lol, thanks for the assist. Looks like I'm doing these all manually though. 🙃 |
Haha oh well... |
This doesn't need to be backported to 24.1—it was merged before the |
sql/parser: add parse-no-verify test command
The
parse-no-verify
test command has been added to data-driven parsertests. In addition, the
error
test command now asserts that parsingthe statement results in an error.
Release note: None
sql/parser: move index hint tests to new file
This is purely a mechanical movement of parser tests with index hints
into a new file.
Release note: None
sql/parser: support FORCE_INVERTED_INDEX hint
This commit adds parsing support for the
FORCE_INVERTED_INDEX
hint. Thehint currently has no effect.
Release note: None
sql: support FORCE_INVERTED_INDEX hint
Epic: None
Release note (sql change): The
FORCE_INVERTED_INDEX
hint is nowsupported. This makes the optimizer prefer a query plan scan over any
inverted index of the hinted table. The query will result in an error if
no such query plan can be generated.