Skip to content

opt: build stats and logical props for multi-column inverted joins#59171

Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom
mgartner:test-multi-column-inverted-join-stats
Jan 20, 2021
Merged

opt: build stats and logical props for multi-column inverted joins#59171
craig[bot] merged 2 commits intocockroachdb:masterfrom
mgartner:test-multi-column-inverted-join-stats

Conversation

@mgartner
Copy link
Copy Markdown
Contributor

opt: add stats tests for multi-column inverted joins

The statistics builder was updated in #58054 to consider constant
filters on non-inverted prefix columns when building stats for
multi-column inverted joins. This commit adds additional tests for this.

There is no release note because multi-column inverted indexes are gated
behind the experimental_enable_multi_column_inverted_indexes session
setting.

Release note: None

opt: consider inverted join prefix key columns when building logical props

This commit updates the logical props builder to consider inverted join
prefix key columns when building logical props for inverted join
expressions.

There is no release note because multi-column inverted indexes are gated
behind the experimental_enable_multi_column_inverted_indexes session
setting.

Release note: None

The statistics builder was updated in cockroachdb#58054 to consider constant
filters on non-inverted prefix columns when building stats for
multi-column inverted joins. This commit adds additional tests for this.

There is no release note because multi-column inverted indexes are gated
behind the `experimental_enable_multi_column_inverted_indexes` session
setting.

Release note: None
@mgartner mgartner requested a review from rytaft January 20, 2021 00:55
@mgartner mgartner requested a review from a team as a code owner January 20, 2021 00:55
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

…props

This commit updates the logical props builder to consider inverted join
prefix key columns when building logical props for inverted join
expressions.

There is no release note because multi-column inverted indexes are gated
behind the `experimental_enable_multi_column_inverted_indexes` session
setting.

Release note: None
@mgartner mgartner force-pushed the test-multi-column-inverted-join-stats branch from 3459e80 to 62ddee7 Compare January 20, 2021 02:45
}
tn = tree.NewUnqualifiedTableName("t2")
tab = md.AddTable(tc.Table(tn), tn)
inputTab := md.AddTable(tc.Table(tn), tn)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I had to create a new variable rather than reuse tab so that the reference to tab in the InvertedJoinPrivate below is the correct table—the one with the inverted index.

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 1 of 1 files at r1, 5 of 5 files at r2.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@mgartner
Copy link
Copy Markdown
Contributor Author

TFTR!

bors r=rytaft

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 20, 2021

Build succeeded:

@craig craig bot merged commit 81b3bb9 into cockroachdb:master Jan 20, 2021
@mgartner mgartner deleted the test-multi-column-inverted-join-stats branch January 20, 2021 20:31
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.

3 participants