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

colinfo: add missing type families into CanHaveCompositeKeyEncoding #95839

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

yuzefovich
Copy link
Member

This commit adds several missing type families into CanHaveCompositeKeyEncoding method. Some of these type families are internal and, probably, don't need to be handled, but we recently introduced TSVector and TSQuery types which were incorrectly marked as being composite since they were not mentioned explicitly in the type family switch. This commit also makes it so that we panic in this method if we forget to include a newly-introduced type into this switch.

Fixes: #95680.

Release note: None

@yuzefovich yuzefovich requested review from jordanlewis and a team January 25, 2023 16:55
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @jordanlewis)


pkg/sql/catalog/colinfo/column_type_properties.go line 92 at r1 (raw file):

	case types.UnknownFamily,
		types.AnyFamily:
		return true

I don't really understand why Unknown and Any are marked as composite here, but perhaps it doesn't matter that much.

Copy link
Member

@jordanlewis jordanlewis left a comment

Choose a reason for hiding this comment

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

LGTM

This commit adds several missing type families into
`CanHaveCompositeKeyEncoding` method. Some of these type families are
internal and, probably, don't need to be handled, but we recently
introduced TSVector and TSQuery types which were incorrectly marked as
being composite since they were not mentioned explicitly in the type
family switch. This commit also makes it so that we panic in this method
if we forget to include a newly-introduced type into this switch.

Release note: None
@yuzefovich
Copy link
Member Author

Thanks Jordan!

@cockroachdb/sql-schema I'd appreciate if someone took a look at this too.

@yuzefovich
Copy link
Member Author

Got an implicit LGTM from Andrew.

bors r+

@craig craig bot merged commit 32b5345 into cockroachdb:master Jan 26, 2023
@craig
Copy link
Contributor

craig bot commented Jan 26, 2023

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

roachtest: unoptimized-query-oracle/disable-rules=all/rand-tables failed
3 participants