Skip to content

catalog: add Index.InvertedColumnKeyType#75427

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
RaduBerinde:inv-col-in-desc
Jan 25, 2022
Merged

catalog: add Index.InvertedColumnKeyType#75427
craig[bot] merged 1 commit intocockroachdb:masterfrom
RaduBerinde:inv-col-in-desc

Conversation

@RaduBerinde
Copy link
Copy Markdown
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 a team and rytaft January 23, 2022 23:24
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

TFTRs!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 24, 2022

Build failed (retrying...):

@craig
Copy link
Copy Markdown
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