New `dolt_column_diff_<tablename>` system table to query columns changed per-row
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 120
Description
A customer requested the ability to easily query for a list of columns that changed _in each row_ of a specific commit. (The [existing `dolt_column_diff` system table](https://docs.dolthub.com/sql-reference/version-control/dolt-system-tables#dolt_column_diff) provides similar information at a per-commit level, but not at a per-row level.) Manually comparing the `to_` and `from_` columns in a diff table is a possible workaround today, but requires extra work for the application to stay up to date with the schema and also has edge cases that can be difficult to handle at the application level (e.g. column renames). Having metadata that directly reports which columns changed could be helpful in some situations.
The proposal is to add a new `dolt_column_diff_` system table that includes the primary key fields from ``, `commit_hash`, and a `column_changed` column that lists a single changed column. Multiple changed columns should be represented as multiple rows in the result set with the same primary key fields.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.