Skip to content

[CALCITE-7758] RexSimplify does not absorb redundant IS NOT NULL on non-input-ref sub-expressions in AND simplification - #5234

Open
rubenada wants to merge 2 commits into
apache:mainfrom
rubenada:CALCITE-7758
Open

[CALCITE-7758] RexSimplify does not absorb redundant IS NOT NULL on non-input-ref sub-expressions in AND simplification#5234
rubenada wants to merge 2 commits into
apache:mainfrom
rubenada:CALCITE-7758

Conversation

@rubenada

Copy link
Copy Markdown
Contributor

Jira Link

CALCITE-7758

Changes Proposed

Improve RexSimplify to remove redundant IS_NOT_NULL on expressions that are other then RexInputRef or RexFieldAccess, e.g.:

IS_NOT_NULL(CAST(a)) AND (CAST(a) + 1) < 10 
=>
(CAST(a) + 1) < 10 

@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

@zzwqqq zzwqqq left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants