twalthr commented on code in PR #25716:
URL: https://github.com/apache/flink/pull/25716#discussion_r1865485221
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/runtime/stream/sql/FunctionITCase.java:
##########
@@ -1035,6 +1035,28 @@ void testStructuredTableFunction() throws Exception {
assertThat(TestCollectionTableFactory.getResult()).isEqualTo(sinkData);
}
+ @Test
+ void testDynamicCatalogTableFunctionWithoutTableWrapper() throws Exception
{
+ final Row[] sinkData =
+ new Row[] {Row.of("Test is a string"), Row.of("42"),
Row.of((String) null)};
+
+ TestCollectionTableFactory.reset();
+
+ tEnv().executeSql("CREATE TABLE SinkTable(s STRING) WITH ('connector'
= 'COLLECTION')");
+
+ tEnv().createFunction("DynamicTableFunction",
DynamicTableFunction.class);
+ tEnv().executeSql(
+ "INSERT INTO SinkTable "
+ + "SELECT T1.s FROM
DynamicTableFunction('Test') AS T1(s) "
+ + "UNION ALL "
+ + "SELECT CAST(T2.i AS STRING) FROM
DynamicTableFunction(42) AS T2(i)"
Review Comment:
since we use the same function 3 times. can we test:
`DynamicTableFunction('Test'), db.DynamicTableFunction('Test'),
cat.db.DynamicTableFunction('Test')` to verify the catalog resolution works?
--
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]