[
https://issues.apache.org/jira/browse/CALCITE-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469267#comment-16469267
]
Zoltan Haindrich commented on CALCITE-2247:
-------------------------------------------
sorry...I see now that actually AND(null, ...) was there... my mistake.
I see your point...so "b is not null" would be bad - because it would make it
only true/false; however currently the presence of the original predicate
sourceĀ {{b=1}} makes it {{unknown}} in cases when {{b is null}} ; so {{U OR F =
U}} which aligns with {{b=1 OR b!=1}}
another simplification would probably be {{null OR b is not null}}
||b||b=1||b!=1||b=1 OR b!=1||b is not null||b=1 OR b is not null||null OR b is
not null||
|U|U|U|U|F|U|U|
|1|T|F|T|T|T|T|
|0|F|T|T|T|T|T|
> Add rule to push in condition condition into a related disjunctive expression
> -----------------------------------------------------------------------------
>
> Key: CALCITE-2247
> URL: https://issues.apache.org/jira/browse/CALCITE-2247
> Project: Calcite
> Issue Type: Improvement
> Reporter: Zoltan Haindrich
> Assignee: Zoltan Haindrich
> Priority: Major
>
> Simplify expressions like: {code}a = 1 AND (a = 1 OR a = 2){code} to {code}a
> = 1{code}
> Conditions to apply will be:
> * in an AND condition there exists a comparison(c) and an OR (o)
> * o and c only reference 1 variable
> See HIVE-19097 for more info.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)