Skip to content

opt: lift restrictions on comparison normalizations #118475

@mgartner

Description

@mgartner

See: #118307

In #118307 we lifted the restrictions on types of comparison normalization rules. I think it should be possible to lift this restriction for more types. For each pair of types allowed in l - r and l + r` expressions, we should determine if an overflow will error. If overflows cause errors, then we can apply the normalization rules to those types.

Overloads for - can be found here:

treebin.Minus: {overloads: []*BinOp{

Overloads for + can be found here:

treebin.Plus: {overloads: []*BinOp{

Jira issue: CRDB-35754

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-queriesSQL Queries Team

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions