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



##########
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);
+                    /**

Review comment:
       We should also add comment in the class javadoc to mention what has been 
changed, and when this file can be removed until which calcite issue is fixed 
(we should create a corresponding issue in Calcite first). 

##########
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:
       Could you also add a test to verify the expected simplified result in 
`FlinkRexUtilTest`?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to