dolthub / dolthub/dolt

`dolt_diff` assumes schema has not changed

Open
#11,140 1 comment 0 reactions 0 assignees View on GitHub
system tables
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 8h
Merged PRs (30d)
120

Description

`NewDiffTable` uses the root table schema as both the before and after schema when creating the `dolt_diff` schema ([code](https://github.com/dolthub/dolt/blob/6e9d403257b39a3e6e29bd5200c732e2d4611bfe/go/libraries/doltcore/sqle/dtables/diff_table.go#L106))

This will yield an inaccurate diff if columns have been added or deleted.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in go/libraries/doltcore/sqle/dtables/diff_table.go at NewDiffTable and trace how the before and after schemas are selected. Add a regression test for a diff where columns are added or deleted, and confirm the dolt_diff schema represents both versions accurately.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.