[
https://issues.apache.org/jira/browse/CALCITE-7145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18035110#comment-18035110
]
Thomas Rebele commented on CALCITE-7145:
----------------------------------------
[~mbudiu], a SAFE_DIVIDE operation would be a nice extension of Calcite.
However, I think it does not solve the issue of this ticket: in case of the
standard DIVIDE operator, IS NULL(10/0) should not simplify to false, but throw
an exception at runtime.
[~zabetak], [~Dayakar], and I had discussed some days ago about providing a way
to configure the behavior of the division operator. I've just created a ticket
with our ideas: CALCITE-7264.
> 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
>
> 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)