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: don't report invalid PruneCols from WithScan #40937

Merged
merged 1 commit into from
Sep 20, 2019

Conversation

justinj
Copy link
Contributor

@justinj justinj commented Sep 20, 2019

Fixes #40930.

This commit zeroes out the Rule field on the relational props copied
from the With node. Follow-up for post branching will be to correctly
prune the columns from the WithScan.

Release note (bug fix): Fixed a stack overflow that could occur via use
of WITH.

Release justification: Category 2: Low risk and important bugfix.

@justinj justinj requested a review from a team as a code owner September 20, 2019 15:02
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@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.

Thanks for the quick fix! :lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @justinj, @RaduBerinde, and @rytaft)


pkg/sql/opt/memo/logical_props_builder.go, line 755 at r1 (raw file):

	// Things like PruneCols are not valid here.
	// TODO(justin): we should re-implement the relevant ones for WithScan.

[nit] I agree but this TODO doesn't really belong here - the code change wouldn't be here but in DerivePruneCols etc (we would let those functions recalculate as necessary)

Fixes cockroachdb#40930.

This commit zeroes out the Rule field on the relational props copied
from the With node. Follow-up for post branching will be to correctly
prune the columns from the WithScan.

Release note (bug fix): Fixed a stack overflow that could occur via use
of WITH.

Release justification: Category 2: Low risk and important bugfix.
Copy link
Contributor Author

@justinj justinj left a comment

Choose a reason for hiding this comment

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

TFTR!

bors r+

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


pkg/sql/opt/memo/logical_props_builder.go, line 755 at r1 (raw file):

Previously, RaduBerinde wrote…

[nit] I agree but this TODO doesn't really belong here - the code change wouldn't be here but in DerivePruneCols etc (we would let those functions recalculate as necessary)

Removed—I'll just add it to my TODO list for now

craig bot pushed a commit that referenced this pull request Sep 20, 2019
40937: opt: don't report invalid PruneCols from WithScan r=justinj a=justinj

Fixes #40930.

This commit zeroes out the Rule field on the relational props copied
from the With node. Follow-up for post branching will be to correctly
prune the columns from the WithScan.

Release note (bug fix): Fixed a stack overflow that could occur via use
of WITH.

Release justification: Category 2: Low risk and important bugfix.

Co-authored-by: Justin Jaffray <justin@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Sep 20, 2019

Build succeeded

@craig craig bot merged commit 488f8c4 into cockroachdb:master Sep 20, 2019
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.

sql: fatal error: stack overflow
3 participants