cockroachdb / cockroachdb/cockroach

schemachanger: add a metadata parameter to declarative schema changer functions

Open
#128,536 0 comments 0 reactions 0 assignees View on GitHub
A-schema-changer-impl C-cleanup C-enhancement C-performance T-sql-foundations
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Currently, schema change implementations within the declarative schema changer take only the `BuildCtx` and the `tree.Statement` specifying the schema change as parameters. This leads to cases like `scbuild.ReferenceProvider`, which re-runs the statement through the optimizer in order to resolve dependencies which were already resolved during the original pass. It also encourages mutation of the original `tree.Statement`. We should add a parameter to the interface of `scbuildstmt.Process` that allows passing arbitrary information from planning into the schema changer.

Jira issue: CRDB-41057

Epic CRDB-60938

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.