You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/06/05 08:02:56 UTC

[GitHub] [flink] godfreyhe commented on a change in pull request #8578: [FLINK-12685] [table-planner-blink] Supports UNNEST query in blink planner

godfreyhe commented on a change in pull request #8578: [FLINK-12685] [table-planner-blink] Supports UNNEST query in blink planner
URL: https://github.com/apache/flink/pull/8578#discussion_r290620967
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/optimize/program/FlinkDecorrelateProgram.scala
 ##########
 @@ -77,6 +81,15 @@ class FlinkDecorrelateProgram[OC <: FlinkOptimizeContext] extends FlinkOptimizeP
         join.getCondition.accept(visitor)
         super.visit(join)
       }
+
+      override def visit(other: RelNode): RelNode = {
+        other match {
+          // ignore Uncollect's inputs due to the correlate variables are from UNNEST directly,
+          // not from cases which RelDecorrelator handles
+          case r: Uncollect => r
 
 Review comment:
   `RelDecorrelator` only handles correlation variables in join, project and filter, does not handle UDTF pattern:`LogicalCorrelate` on `LogicalTableFunctionScan` which will be converted to `BatchExecCorrelate` or `StreamExecCorrelate`. while correlation variables in join, project and filter are not supported in physical phase.  so the validation in `FlinkDecorrelateProgram` only need to check whether there are correlation variables in join, project and filter.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services