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_r397878141
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/CorrelateCodeGenerator.scala
 ##########
 @@ -65,9 +68,11 @@ object CorrelateCodeGenerator {
 
     // according to the SQL standard, every scalar function should also be a 
table function
     // but we don't allow that for now
-    if (!rexCall.getOperator.isInstanceOf[BridgingSqlFunction] &&
-        !rexCall.getOperator.isInstanceOf[TableSqlFunction]) {
-      throw new ValidationException("Currently, only table functions can emit 
rows.")
+    rexCall.getOperator match {
+      case func: BridgingSqlFunction if func.getDefinition.getKind == 
FunctionKind.TABLE => //ok
 
 Review comment:
   I'd prefer to merge it as part of the PR. I added a test for that case which 
I would have problems extracting. If you think it is worth doing it, I will try 
to.

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