snuyanzin commented on code in PR #30065:
URL: https://github.com/apache/flink/pull/30065#discussion_r4681145469
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/CoalesceFunctionITCase.java:
##########
@@ -272,7 +272,23 @@ null, new BigDecimal("1.23"), new BigDecimal("9876543.21"))
coalesce($("f0"), $("f1"), $("f2")),
"COALESCE(f0, f1, f2)",
Duration.ofSeconds(10),
- INTERVAL(SECOND(3)).notNull()));
+ INTERVAL(SECOND(3)).notNull()),
+
+ // nullable field, NOT NULL literal last
+ TestSetSpec.forFunction(
+ BuiltInFunctionDefinitions.COALESCE,
"VARCHAR(20) and CHAR literal")
+ .onFieldsWithData(null, "Bob")
+ .andDataTypes(VARCHAR(20).nullable(),
VARCHAR(20).nullable())
+ .testResult(
+ coalesce($("f0"), "_"),
+ "COALESCE(f0, '_')",
+ "_",
+ VARCHAR(20).notNull())
+ .testResult(
+ coalesce($("f1"), "_"),
+ "COALESCE(f1, '_')",
+ "Bob",
+ VARCHAR(20).notNull()));
Review Comment:
seems like an artifact from another PR, dropped, thanks
--
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]