[ 
https://issues.apache.org/jira/browse/CALCITE-6787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CALCITE-6787:
------------------------------------
    Labels: pull-request-available  (was: )

> Simplification process fails to remove the 'is not null' predicate
> ------------------------------------------------------------------
>
>                 Key: CALCITE-6787
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6787
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Krisztian Kasa
>            Priority: Major
>              Labels: pull-request-available
>
> Let's have the following expression:
> {code}
> AND(IS NOT NULL($0), <=(0, $0), <=($0, 100))
> {code}
> {{$0}} is a {{nullable integer}} column
> The expression is a filter condition coming from a where clause in a query
> In Calcite 1.25 this expression is simplified to
> {code}
> AND(>=($0, 0), >=(100, $0))
> {code}
> So the {{IS NOT NULL($2)}} predicate is removed.
> In Calcite 1.33
> {code}
> SEARCH($0, Sarg[[0..100]; NULL AS FALSE])
> {code}
> and with {{RexUtil.searchShuttle}} it is transformed to
> {code}
> AND(IS NOT NULL($0), AND(>=($0, 0), <=($0, 100)))
> {code}
> I bumped into this behaviour change when upgrading Calcite in Hive from 1.25 
> to 1.33 or higher.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to