cockroachdb / cockroachdb/cockroach
opt: prune primary key columns from mutation RETURNING columns
Open
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
Assessment
This issue has not been assessed yet.