Skip to content
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: fix trigram inverted index on NAME type #117846

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

yuzefovich
Copy link
Member

Previously, we would hit an internal error when trying to use string-like datum of NAME type for the trigram inverted index. This data type is handled via the DOidWrapper around the DString, so we simply need to unwrap that.

I decided to not include a release note given that we've only seen this issue once in our own randomized testing.

Fixes: #117758.

Release note: None

@yuzefovich yuzefovich added backport-23.1.x Flags PRs that need to be backported to 23.1 backport-23.2.x Flags PRs that need to be backported to 23.2. labels Jan 17, 2024
@yuzefovich yuzefovich requested review from mgartner, rytaft and a team January 17, 2024 01:56
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@rytaft rytaft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner and @yuzefovich)


pkg/sql/logictest/testdata/logic_test/trigram_indexes line 360 at r1 (raw file):

			AS tab (col1_1, col1_2) ON
			(tab2.col1) = (tab.col1_1)
			AND (tab2.col2) = (tab.col1_2);

nit: remove tabs

Previously, we would hit an internal error when trying to use
string-like datum of NAME type for the trigram inverted index. This data
type is handled via the DOidWrapper around the DString, so we simply
need to unwrap that.

I decided to not include a release note given that we've only seen this
issue once in our own randomized testing.

Release note: None
Copy link
Member Author

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFTR!

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @mgartner and @rytaft)

@craig
Copy link
Contributor

craig bot commented Jan 18, 2024

Build succeeded:

@craig craig bot merged commit 1c67f8e into cockroachdb:master Jan 18, 2024
9 checks passed
@yuzefovich yuzefovich deleted the trigram-index-fix branch January 18, 2024 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.1.x Flags PRs that need to be backported to 23.1 backport-23.2.x Flags PRs that need to be backported to 23.2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sql/tests: TestRandomSyntaxSQLSmith failed [trying to apply inverted index to unsupported type NAME]
3 participants