hequn8128 commented on a change in pull request #7079: [FLINK-10845][table] 
Support multiple different DISTINCT aggregates for batch
URL: https://github.com/apache/flink/pull/7079#discussion_r232887060
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/ScalarOperators.scala
 ##########
 @@ -1309,6 +1312,18 @@ object ScalarOperators {
         |  $resultTerm = ${expr(left.resultTerm, right.resultTerm)};
         |}
         |""".stripMargin
+    } else if (nullCheck && compareNull) {
+      s"""
+        |${left.code}
+        |${right.code}
+        |boolean $nullTerm = false;
+        |$resultTypeTerm $resultTerm;
+        |if (${left.nullTerm} || ${right.nullTerm}) {
+        |  $resultTerm = ${left.nullTerm} && ${right.nullTerm};
 
 Review comment:
   Add some null data in tests to test this logic.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to