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

release-20.2: opt: fix internal error when calculating stats for mutation passthrough cols #62961

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

rytaft
Copy link
Collaborator

@rytaft rytaft commented Apr 1, 2021

Backport 1/1 commits from #62921.

/cc @cockroachdb/release


Prior to this commit, an attempt to calculate statistics for a passthrough
column in a mutation would cause an error, since passthrough columns were
inadvertently ignored by the MapToInputCols function. This commit fixes
the problem by updating MapToInputCols so that it checks whether any of the
given columns are in PassthroughCols before trying to map them to a table
column.

Fixes #62692

Release note (bug fix): Fixed an internal error that could occur during
planning when a query used the output of an UPDATE's RETURNING clause,
and one or more of the columns in the RETURNING clause were from a table
specified in the FROM clause of the UPDATE (i.e., not from the table being
updated).

@rytaft rytaft requested review from mgartner and a team April 1, 2021 14:21
@rytaft rytaft requested a review from a team as a code owner April 1, 2021 14:21
@cockroach-teamcity
Copy link
Member

This change is Reviewable

…gh cols

Prior to this commit, an attempt to calculate statistics for a passthrough
column in a mutation would cause an error, since passthrough columns were
inadvertently ignored by the MapToInputCols function. This commit fixes
the problem by updating MapToInputCols so that it checks whether any of the
given columns are in PassthroughCols before trying to map them to a table
column.

Fixes cockroachdb#62692

Release note (bug fix): Fixed an internal error that could occur during
planning when a query used the output of an UPDATE's RETURNING clause,
and one or more of the columns in the RETURNING clause were from a table
specified in the FROM clause of the UPDATE (i.e., not from the table being
updated).
@rytaft rytaft merged commit 1eb268e into cockroachdb:release-20.2 Apr 1, 2021
@rytaft rytaft deleted the backport20.2-62921 branch April 1, 2021 17:00
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.

None yet

3 participants