dolthub / dolthub/dolt

Columns that are named `commit` or `commit_date` appear as NULL in the `dolt_diff_{table_name}` system table.

Open
#3,395 2 comments 0 reactions 1 assignee Claimed by @zachmu View on GitHub
bug diff sql
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 5h
Merged PRs (30d)
108

Description

Repro:
```shell
dolt sql -q "CREATE table t (pk int, commit text);"
dolt sql -q "INSERT INTO t VALUES (1, 'hi');"
dolt commit -am "initial"
```

Table data:
```shell
dolt sql -q "SELECT * from t"
+----+--------+
| pk | commit |
+----+--------+
| 1 | hi |
+----+--------+
```

Diff table:
```
$ dolt sql -q "SELECT * from dolt_diff_t;"
+-----------+-------+----------------------------------+-----------------------------------+-------------+---------+----------------------------------+-----------------------------------+-----------+
| to_commit | to_pk | to_commit | to_commit_date | from_commit | from_pk | from_commit | from_commit_date | diff_type |
+-----------+-------+----------------------------------+-----------------------------------+-------------+---------+----------------------------------+-----------------------------------+-----------+
| NULL | 1 | 736lsfds067c30freqtve8o0v7lsrmpe | 2022-05-11 20:21:31.744 +0000 UTC | NULL | NULL | 83amk1pnul86ajecveuu4e44ie63c0gp | 2022-05-11 20:20:00.975 +0000 UTC | added |
```

It seems like we need a better story around how the dolt_diff column names are generated. In the meantime, we can at-least fix the missing data ("hi");

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.