twalthr 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_r397888192
##########
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:
True, but there we really tested different kind of functions. The comment
has nothing to do with the new type inference. But I don't have a string
opinion there.
----------------------------------------------------------------
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