wuchong commented on code in PR #19851:
URL: https://github.com/apache/flink/pull/19851#discussion_r897905583


##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala:
##########
@@ -351,9 +351,11 @@ object ScalarOperatorGens {
     checkImplicitConversionValidity(left, right)
     val canEqual = isInteroperable(left.resultType, right.resultType)
     if (isCharacterString(left.resultType) && 
isCharacterString(right.resultType)) {
-      generateOperatorIfNotNull(ctx, new BooleanType(), left, right) {
-        (leftTerm, rightTerm) => s"$leftTerm.equals($rightTerm)"
-      }
+      generateOperatorIfNotNull(
+        ctx,
+        new BooleanType(left.resultType.isNullable || 
right.resultType.isNullable),

Review Comment:
   Could you fix all the expression generation by passing in `resultType`? You 
can see that most expressions are using the given `resultType` in 
`org.apache.flink.table.planner.codegen.ExprCodeGenerator#generateCallExpression`.
 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to