sqlsmith/randgen: generate DEFAULT expressions that don't match the column's type #98133
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
E-quick-win
Likely to be a quick win for someone experienced.
O-postmortem
Originated from a Postmortem action item.
T-sql-queries
SQL Queries Team
SQLSmith/randgen only generate DEFAULT expressions that match a column's type exactly. Therefore, our randomized tests don't exercise logic in #81071 that allows creating a DEFAULT expression of type A for coluymn of type B if a cast from A to B is allowed in the assignment context.
When generating DEFAULT expressions, we should randomly pick a type for the expression that can be assignment-cast into the column's type.
Jira issue: CRDB-25097
The text was updated successfully, but these errors were encountered: