cockroachdb / cockroachdb/cockroach

opt: prune primary key columns from mutation RETURNING columns

Open
#111,733 0 comments 0 reactions 0 assignees View on GitHub
C-enhancement T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Currently, the PruneMutationReturnCols normalization rule does not prune primary key columns even if they don't appear in the RETURNING clause of a mutation statement (INSERT, UPDATE, DELETE, UPSERT). This may prevent these columns from being pruned from the fetch columns in some cases.

This issue is opened to investigate whether primary key columns could be pruned from RETURNING columns.
This also applies to the PruneInsertReturnCols rule added by #111403.

Jira issue: CRDB-32047

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.