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

Stamatis Zampetakis resolved CALCITE-7145.
------------------------------------------
    Fix Version/s: 1.42.0
       Resolution: Fixed

Fixed in 
[43e0d7581f3247354686aea83400abe4490be2d3|https://github.com/apache/calcite/commit/43e0d7581f3247354686aea83400abe4490be2d3].
 Thanks for the PR [~thomas.rebele] and for the additional reviews and feedback 
[~mbudiu] and [~julianhyde].

The final commit that was merged is not strongly tight to division but 
basically prevents IS NULL/IS NOT NULL simplification when the operand is 
unsafe.

> RexSimplify should not simplify IS NULL(10/0)
> ---------------------------------------------
>
>                 Key: CALCITE-7145
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7145
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Thomas Rebele
>            Assignee: Thomas Rebele
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.42.0
>
>
> RexSimplify incorrectly simplifies {{IS NULL(10/0)}} to false and {{IS NOT 
> NULL(10,0)}} to true
> In other DBMS it's either the inverse (sqlite, MySQL, MariaDB), or they throw 
> an exception in both cases (Oracle, Postgres). The behavior was also 
> mentioned in a comment on CALCITE-3368.
> Is it right that throwing an exception during query execution is the expected 
> behavior according to the SQL standard?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to