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

catalog: add Index.InvertedColumnKeyType #75427

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

RaduBerinde
Copy link
Member

In an inverted index, the encoded key is treated as a Bytes datum.
This is currently hardcoded in the opt catalog.

This commit moves this into the index descriptor.

Release note: None

@RaduBerinde RaduBerinde requested review from rytaft and a team January 23, 2022 23:24
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@ajwerner ajwerner 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 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @RaduBerinde and @rytaft)


pkg/sql/catalog/table_elements.go, line 157 at r1 (raw file):

	// InvertedColumnID returns the ColumnID of the inverted column of the
	// inverted index.
	InvertedColumnID() descpb.ColumnID

Comment about the panic if it's not an inverted index


pkg/sql/catalog/table_elements.go, line 161 at r1 (raw file):

	// InvertedColumnName returns the name of the inverted column of the inverted
	// index.
	InvertedColumnName() string

Comment about the panic if it's not an inverted index


pkg/sql/catalog/table_elements.go, line 165 at r1 (raw file):

	// InvertedColumnKeyType returns the type of the data element that is encoded
	// as the inverted index key. This is currently always Bytes.
	InvertedColumnKeyType() *types.T

Comment about the panic if it's not an inverted index

@ajwerner
Copy link
Contributor

rebase to fix the flake

In an inverted index, the encoded key is treated as a Bytes datum.
This is currently hardcoded in the opt catalog.

This commit moves this into the index descriptor.

Release note: None
Copy link
Member Author

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

TFTR!

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

Copy link
Member Author

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

TFTR!

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

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 3 of 4 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (and 1 stale) (waiting on @RaduBerinde)

@RaduBerinde
Copy link
Member Author

TFTRs!

bors r+

@craig
Copy link
Contributor

craig bot commented Jan 24, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jan 25, 2022

Build succeeded:

@craig craig bot merged commit 4b14a8e into cockroachdb:master Jan 25, 2022
@RaduBerinde RaduBerinde deleted the inv-col-in-desc branch January 27, 2022 20:51
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.

4 participants