Default Column field should always be an expression
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 108
Description
See: https://github.com/dolthub/dolt/blob/caba06c58a7428433e5b30552aef959c7b8af93c/go/libraries/doltcore/sqle/sqlfmt/schema_fmt.go#L195
The Column.Default field is a string which _should_ always be an expression. There _should_ be round trip parity for strings and expressions, and that line of code indicates that something is wrong upstream.
That field is used in 30+ locations, and it may be more appropriate to change the type from a string to something else to audit all the places we might be doing this wrong. Or it may just be fixing the expression serialization. Not sure, but this code is certainly not correct as it stands now.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.