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

opt: improve various composite-ness checks #55194

Merged
merged 3 commits into from
Oct 6, 2020

Conversation

RaduBerinde
Copy link
Member

opt: improve composite check for PushFilterIntoSetOp

Use CanBeCompositeSensitive instead of disallowing any filters
involving composite columns.

Release note: None

opt: improve composite check for Project FDs

Release note: None

opt: improve composite check for join filter remapping

Use CanBeCompositeSensitive to allow remapping insensitive join
filters.

Release note: None

Use `CanBeCompositeSensitive` instead of disallowing any filters
involving composite columns.

Release note: None
@RaduBerinde RaduBerinde requested review from mgartner and rytaft October 2, 2020 22:35
@RaduBerinde RaduBerinde requested a review from a team as a code owner October 2, 2020 22:35
@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Oct 2, 2020

This change is Reviewable

@cockroachdb cockroachdb deleted a comment from cockroach-teamcity Oct 2, 2020
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, 11 of 11 files at r2, 2 of 2 files at r3.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner and @RaduBerinde)


pkg/sql/opt/norm/join_funcs.go, line 337 at r3 (raw file):

	allowCompositeEncoding := !memo.CanBeCompositeSensitive(c.mem.Metadata(), src)
	// Map each column in src to one column in dst. We choose an arbitrary column

[nit] add a blank line above this


pkg/sql/opt/norm/join_funcs.go, line 408 at r3 (raw file):

//
// TODO(rytaft): In the future, we may want to allow the mapping if the
// filter involves a comparison operator, such as x < 5.

you can remove this TODO :)
(and update the comment)

Use CanBeCompositeSensitive to allow remapping insensitive join
filters.

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! 1 of 0 LGTMs obtained (waiting on @mgartner and @rytaft)


pkg/sql/opt/norm/join_funcs.go, line 337 at r3 (raw file):

Previously, rytaft (Rebecca Taft) wrote…

[nit] add a blank line above this

Done.


pkg/sql/opt/norm/join_funcs.go, line 408 at r3 (raw file):

Previously, rytaft (Rebecca Taft) wrote…

you can remove this TODO :)
(and update the comment)

Nice catch, done!

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.

Reviewed 1 of 1 files at r4.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @mgartner)

@RaduBerinde
Copy link
Member Author

bors r+

@craig
Copy link
Contributor

craig bot commented Oct 6, 2020

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Oct 6, 2020

Build succeeded:

@craig craig bot merged commit 5784427 into cockroachdb:master Oct 6, 2020
@RaduBerinde RaduBerinde deleted the composite-2 branch October 8, 2020 22:21
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