cockroachdb / cockroachdb/cockroach
sql: value set in DEFAULT clause of ADD COLUMN to be stored as metadata
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Currently, if you specify the DEFAULT clause for a column, the table is [back]filled with the given default value.
We could optimize the behavior and provide the option so that the default value is stored as metadata but the column itself is not populated.
[slack](https://cockroachlabs.slack.com/archives/CHVV403F0/p1678482973406139)
Jira issue: CRDB-25253
gz#16284
Epic CRDB-61003
Contributor guide
Research direction
Start by tracing the ADD COLUMN path for a DEFAULT clause and the existing backfill behavior. Define the option and verify that the default is retained as metadata while existing rows remain unpopulated, then cover the behavior in the relevant SQL tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100