twalthr 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_r238696433
########## File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/ScalarOperators.scala ########## @@ -191,7 +191,17 @@ object ScalarOperators { ) ) } - } + } + + def generateDistinctFrom( + nullCheck: Boolean, + left: GeneratedExpression, + right: GeneratedExpression) + : GeneratedExpression = { + val newleft = left.copy(nullTerm = GeneratedExpression.NEVER_NULL) Review comment: This looks not correct to me. By setting the expression to never null, you basically compare the default values of expressions. Long has `0L` for example. For example, a `0 IS NOT DISTINCT FROM NULL` might return `true`. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services