dawidwys commented on a change in pull request #12410:
URL: https://github.com/apache/flink/pull/12410#discussion_r434619796



##########
File path: 
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/expressions/ExpressionBuilder.java
##########
@@ -90,9 +91,8 @@ public static UnresolvedCallExpression isNull(Expression 
input) {
                return call(IS_NULL, input);
        }
 
-       public static UnresolvedCallExpression ifThenElse(Expression condition, 
Expression ifTrue,
-               Expression ifFalse) {
-               return call(IF, condition, ifTrue, ifFalse);
+       public static UnresolvedCallExpression ifThenElse(Expression condition, 
Expression ifTrue, Expression ifFalse) {
+               return call(IF, call(IS_TRUE, condition), ifTrue, ifFalse);

Review comment:
       Initially I was checking that the first argument was `NOT NULL`. It 
should not be necessary. I forgot to revert it.
   
   `if the condition is NULL we will always execute the false branch?` <- yes, 
that will also be the case when I remove it, it will happen down in the code 
gen.




----------------------------------------------------------------
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