Skip to content

Add additional simplification rules #1406

@alamb

Description

@alamb

As pointed out by @xudong963 on #1376, there are several other rewrite rules we could add following the pattern in simplify:

A AND !(A) --> false (if A is not nullable)

Note that if A is null (or some expresson that could be null), then A AND !(A) is NULL

Similarly,

A * 0 --> 0 (if A is not nullable)

The "is nullable" bit is somewhat tricky -- and to be honest I am not sure our current code handles all such cases correctly either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions