Skip to content

sqlsmith/randgen: generate DEFAULT expressions that don't match the column's type #98133

@mgartner

Description

@mgartner

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)E-quick-winLikely to be a quick win for someone experienced.O-postmortemOriginated from a Postmortem action item.T-sql-queriesSQL Queries Team

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions