aljoscha commented on a change in pull request #13285:
URL: https://github.com/apache/flink/pull/13285#discussion_r481040615



##########
File path: 
flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/runtime/stream/sql/FunctionITCase.java
##########
@@ -869,12 +869,19 @@ public void testInvalidUseOfTableFunction() {
                tEnv().executeSql("CREATE TABLE SinkTable(s ROW<s STRING, sa 
ARRAY<STRING> NOT NULL>) WITH ('connector' = 'COLLECTION')");
 
                tEnv().createTemporarySystemFunction("RowTableFunction", 
RowTableFunction.class);
-               tEnv().executeSql(
-                       "INSERT INTO SinkTable " +
-                       "SELECT RowTableFunction('test')");
 
-               // currently, calling a table function like a scalar function 
produces no result
-               assertThat(TestCollectionTableFactory.getResult(), 
equalTo(Collections.emptyList()));
+               try {
+                       tEnv().explainSql(
+                               "INSERT INTO SinkTable " +
+                               "SELECT RowTableFunction('test')");
+                       fail();
+               } catch (ValidationException e) {
+                       assertThat(
+                               e,
+                               hasMessage(

Review comment:
       Nice use of matchers!




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to