You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Chunwei Lei (Jira)" <ji...@apache.org> on 2020/02/14 02:53:00 UTC

[jira] [Issue Comment Deleted] (CALCITE-3746) RexSimplify changes the order of IS NOT NULL in And RexNode

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

Chunwei Lei updated CALCITE-3746:
---------------------------------
    Comment: was deleted

(was: the SQL standard says it is implementation-dependent whether expressions are actually evaluated from left to right when the precedence is not otherwise determined by the Formats or by parentheses[1].
{code:java}
Subclause 6.3.3.3, “Rule evaluation order”:
a) It is implementation-dependent whether expressions are actually evaluated from left to right when the
precedence is not otherwise determined by the Formats or by parentheses.
b) If evaluation of the inessential parts of an expression or search condition would cause an exception
condition to be raised, then it is implementation-dependent whether or not that condition is raised.
{code})

> RexSimplify changes the order of IS NOT NULL in And RexNode
> -----------------------------------------------------------
>
>                 Key: CALCITE-3746
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3746
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.20.0
>            Reporter: pengzhiwei
>            Assignee: Chunwei Lei
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The RexSimplify changes the order of IS NOT NULL in And RexNode.The following expression 
> {code:java}
> a is not null and length(a) > 0{code}
> is optimazted to 
> {code:java}
> length(a) > 0 and a is not null{code}
> which will affect the logic short circuit for null-test.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)