snuyanzin commented on code in PR #25298: URL: https://github.com/apache/flink/pull/25298#discussion_r1797059992
########## flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/StringFunctionsITCase.java: ########## @@ -44,10 +45,33 @@ Stream<TestSetSpec> getTestSetSpecs() { endsWithTestCases(), printfTestCases(), startsWithTestCases(), - translateTestCases()) + translateTestCases(), + concatenateTestCases()) .flatMap(s -> s); } + private Stream<TestSetSpec> concatenateTestCases() { + return Stream.of( + TestSetSpec.forFunction(BuiltInFunctionDefinitions.PLUS) + .onFieldsWithData("Beginning", " Middle ", "Ending") + .andDataTypes(DataTypes.STRING(), DataTypes.STRING(), DataTypes.STRING()) + .testResult( + $("f0").concat($("f1")).concat($("f2")), + "concat(concat(f0, f1), f2)", + "Beginning Middle Ending", + DataTypes.STRING()) + .testResult( + concat($("f0"), $("f1"), $("f2")), + "concat(f0, f1, f2)", + "Beginning Middle Ending", + DataTypes.STRING()) + .testResult( + $("f0").plus($("f1")).plus($("f2")), + "concat(concat(f0, f1), f2)", Review Comment: Not related to the PR and just out of curiosity Would it make sense to have a special rule to translate it into `concat(f0, f1, f2)` if all args are `CHARACTER_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