You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/02/23 07:12:10 UTC

[GitHub] [flink] chaozwn commented on a change in pull request #14872: [FLINK-21162] [Blink Planner]use "IF(col = '' OR col IS NULL, 'a', 'b')",when co…

chaozwn commented on a change in pull request #14872:
URL: https://github.com/apache/flink/pull/14872#discussion_r580809202



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/rex/RexSimplify.java
##########
@@ -2670,12 +2670,12 @@ private boolean accept_(RexNode e, List<RexNode> newTerms) {
                             e.getKind(),
                             newTerms);
                 case IS_NULL:
-                    if (negate) {
-                        return false;
-                    }
-                    final RexNode arg = ((RexCall) e).operands.get(0);
-                    return accept1(
-                            arg, e.getKind(), rexBuilder.makeNullLiteral(arg.getType()), newTerms);
+                    /**
+                     *   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);
+                     */
+                    return false;

Review comment:
       @danny0405 do you mean,in FlinkRexUtil.expandSearch , i strip out the optimization of is_null?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org