dawidwys commented on code in PR #25298:
URL: https://github.com/apache/flink/pull/25298#discussion_r1800623737
##########
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:
Generally yes, not sure if we need a rule or should we convert that when
translating from table API.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]