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



##########
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:
       The changes forbidden the `is not null` simplification overall, which is 
beyond the scope of the case. A better way it to expand the `SEARCH` operator 
after the `RexSimplify` invocation, see `FlinkRexUtil.expandSearch`.




----------------------------------------------------------------
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:
[email protected]


Reply via email to