You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "WeiNan Zhao (Jira)" <ji...@apache.org> on 2021/02/22 14:22:00 UTC

[jira] [Created] (CALCITE-4508) Related to FLINK-21162,SQL optimization in OR syntax

WeiNan Zhao created CALCITE-4508:
------------------------------------

             Summary: Related to FLINK-21162,SQL optimization in OR syntax
                 Key: CALCITE-4508
                 URL: https://issues.apache.org/jira/browse/CALCITE-4508
             Project: Calcite
          Issue Type: Bug
          Components: stream
    Affects Versions: 1.26.0
         Environment: flink-1.12,flink1.13
            Reporter: WeiNan Zhao
             Fix For: 1.26.0


[flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/rex/RexSimplify.java|https://github.com/apache/flink/pull/14872/files#diff-f13aa38a0e8d4eb656016353b2da73c4d53e9898098a5c497219829c1401c48e]

linenum:2673 

case IS_NULL:

{color:#FF0000}/*   when is_null in OR operate ,if change to search('',null) there was a major mistake, *   because search has three return values (true,false,null),but OR Operate only *   can return true or false,so wo can't change is_null or ... to search('',null); */ {color}

if (negate) \{ return false; }

final RexNode arg = ((RexCall) e).operands.get(0);

{color:#ffab00}return accept1( arg, e.getKind(), rexBuilder.makeNullLiteral(arg.getType()), newTerms);{color}

{color:#4c9aff}It should not be converted here{color}



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