dawidwys commented on a change in pull request #11280: [FLINK-16377][table] 
Support inline user defined functions in expression dsl
URL: https://github.com/apache/flink/pull/11280#discussion_r397738405
 
 

 ##########
 File path: 
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/runtime/stream/sql/FunctionITCase.java
 ##########
 @@ -444,6 +450,31 @@ private void 
testUserDefinedCatalogFunction(TableEnvironment tableEnv, String cr
                tableEnv.sqlUpdate("drop table t2");
        }
 
+       @Test
+       public void testDataTypeBasedTypeInferenceNotSupported() throws 
Exception {
+               thrown.expect(ValidationException.class);
+               thrown.expectMessage("The new type inference for functions is 
only supported in the Blink planner.");
+
+               StreamExecutionEnvironment streamExecEnvironment = 
StreamExecutionEnvironment.getExecutionEnvironment();
+               StreamTableEnvironment tableEnvironment = 
StreamTableEnvironment.create(streamExecEnvironment);
+
+               tableEnvironment.createTemporarySystemFunction("func", 
SimpleScalarFunction.class);
+               Table table = tableEnvironment
+                       .sqlQuery("SELECT func(1)");
+               tableEnvironment.toAppendStream(table, Row.class).print();
+
+               streamExecEnvironment.execute();
+       }
+
+       /**
 
 Review comment:
   We must have a comment to satisfy the checkstyle. We have the same in the 
Blink's version of this test.

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


With regards,
Apache Git Services

Reply via email to