hequn8128 commented on a change in pull request #11051: 
[FLINK-15961][table-planner][table-planner-blink] Introduce Python Physical 
Correlate RelNodes which are containers for Python TableFunction
URL: https://github.com/apache/flink/pull/11051#discussion_r379235507
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/physical/batch/BatchExecCorrelateRule.scala
 ##########
 @@ -39,13 +40,13 @@ class BatchExecCorrelateRule extends ConverterRule(
     val right = join.getRight.asInstanceOf[RelSubset].getOriginal
 
     right match {
-      // right node is a table function
-      case _: FlinkLogicalTableFunctionScan => true
+      // right node is a java table function
+      case scan: FlinkLogicalTableFunctionScan => 
PythonUtil.isNonPythonCall(scan.getCall)
       // a filter is pushed above the table function
       case calc: FlinkLogicalCalc =>
-        calc.getInput.asInstanceOf[RelSubset]
-            .getOriginal.isInstanceOf[FlinkLogicalTableFunctionScan]
-      case _ => false
+        val scan = calc.getInput.asInstanceOf[RelSubset]
+          .getOriginal.asInstanceOf[FlinkLogicalTableFunctionScan]
 
 Review comment:
   The original may not be a `FlinkLogicalTableFunctionScan`

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