hanyuzheng7 commented on code in PR #23173: URL: https://github.com/apache/flink/pull/23173#discussion_r1510162578
########## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/CollectionFunctionsITCase.java: ########## @@ -1516,4 +1517,141 @@ private Stream<TestSetSpec> arraySortTestCases() { }, DataTypes.ARRAY(DataTypes.DATE()))); } + + private Stream<TestSetSpec> arrayExceptTestCases() { + return Stream.of( + TestSetSpec.forFunction(BuiltInFunctionDefinitions.ARRAY_EXCEPT) + .onFieldsWithData( + new Integer[] {1, 2, 2}, + null, + new Row[] { + Row.of(true, LocalDate.of(2022, 4, 20)), + Row.of(true, LocalDate.of(1990, 10, 14)), + null + }, + new Integer[] {null, null, 1}, + new Integer[][] { + new Integer[] {1, null, 3}, new Integer[] {0}, new Integer[] {1} + }, + new Map[] { + CollectionUtil.map(entry(1, "a"), entry(2, "b")), + CollectionUtil.map(entry(3, "c"), entry(4, "d")), + null + }) + .andDataTypes( + DataTypes.ARRAY(DataTypes.INT()), + DataTypes.ARRAY(DataTypes.INT()), + DataTypes.ARRAY( + DataTypes.ROW(DataTypes.BOOLEAN(), DataTypes.DATE())), + DataTypes.ARRAY(DataTypes.INT()), + DataTypes.ARRAY(DataTypes.ARRAY(DataTypes.INT())), + DataTypes.ARRAY(DataTypes.MAP(DataTypes.INT(), DataTypes.STRING()))) + // ARRAY<INT> + .testResult( Review Comment: The order is [1,2,3,4] -- 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