dawidwys commented on code in PR #23173:
URL: https://github.com/apache/flink/pull/23173#discussion_r1492228180


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java:
##########
@@ -391,6 +391,16 @@ ANY, and(logical(LogicalTypeRoot.BOOLEAN), LITERAL)
                     .internal()
                     .build();
 
+    public static final BuiltInFunctionDefinition ARRAY_EXCEPT =
+            BuiltInFunctionDefinition.newBuilder()
+                    .name("ARRAY_EXCEPT")
+                    .kind(SCALAR)
+                    .inputTypeStrategy(commonArrayType(2))
+                    .outputTypeStrategy(nullableIfArgs(COMMON))

Review Comment:
   Then the output strategy is wrong. As you explained yourself, you don't take 
the nullability of the second argument into account. 
   
   The fact if the output is null or not null does not depend on the second 
argument therefore you should not depend the nullability of the output on the 
second argument.
   
   If I am right you should have `nullableIfArgs(ConstantArgumentCount.of(0), 
argument(0))`



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to