hanyuzheng7 commented on code in PR #24365: URL: https://github.com/apache/flink/pull/24365#discussion_r1603638142
########## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/CollectionFunctionsITCase.java: ########## @@ -1721,4 +1722,83 @@ private Stream<TestSetSpec> arrayExceptTestCases() { "Invalid input arguments. Expected signatures are:\n" + "ARRAY_EXCEPT(<COMMON>, <COMMON>)")); } + + private Stream<TestSetSpec> splitTestCases() { + return Stream.of( + TestSetSpec.forFunction(BuiltInFunctionDefinitions.SPLIT) + .onFieldsWithData( + "123,123,23", + null, + ",123,123", + ",123,123,", + 123, + "12345", + ",123,,,123,") + .andDataTypes( + DataTypes.STRING().notNull(), + DataTypes.STRING(), + DataTypes.STRING().notNull(), + DataTypes.STRING().notNull(), + DataTypes.INT().notNull(), + DataTypes.STRING().notNull(), + DataTypes.STRING().notNull()) + .testResult( + $("f0").split(","), + "SPLIT(f0, ',')", + new String[] {"123", "123", "23"}, + DataTypes.ARRAY(DataTypes.STRING()).notNull()) + .testResult( + $("f0").split(null), + "SPLIT(f0, NULL)", + null, + DataTypes.ARRAY(DataTypes.STRING())) + .testResult( + $("f0").split(""), + "SPLIT(f0, '')", + new String[] {"123,123,23"}, Review Comment: return input string -- 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