Default for generated column not working as expected
Open
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 73
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 129
Description
SetUp:
`create table t1 (i int primary key, j int generated always as (i + 10));`
`insert into t1 (i, j) values (1, default);`
Query: `select * from t1`
Expected: `[]sql.Row{{1, 11}}`
Actual: `[]sql.Row{{1, nil}}`
Test case skipped and tagged with issue link in dolthub/go-mysql-server#3705
Contributor guide
Research direction
Start by reproducing the CREATE TABLE, INSERT, and SELECT statements from the issue, then inspect the skipped test tagged with dolthub/go-mysql-server#3705. Trace generated-column handling for an explicit DEFAULT value and confirm that the query returns {{1, 11}} instead of a nil value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100