[
https://issues.apache.org/jira/browse/CALCITE-7295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18038985#comment-18038985
]
Julian Hyde commented on CALCITE-7295:
--------------------------------------
[~thomas.rebele], You should say explicitly that if one of the arguments is
null then division (and therefore division by zero) does not occur. And
therefore division can be simplified without regard to divide-by-zero if one of
the arguments is known to be always null.
> RexSimplify should simplify a division with a NULL argument
> -----------------------------------------------------------
>
> Key: CALCITE-7295
> URL: https://issues.apache.org/jira/browse/CALCITE-7295
> Project: Calcite
> Issue Type: Task
> Reporter: Thomas Rebele
> Assignee: Thomas Rebele
> Priority: Major
> Labels: pull-request-available
>
> Some expressions, such as
> * {{null + a/4}}
> * {{a/null}}
> * {{null/0}}, which gets simplified to {{null}} by PostgreSQL, Oracle,
> SQLite, MariaDB, and MySQL,
> are not simplified. This ticket aims to improve RexSimplify to support these
> kind of statements.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)