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

 ##########
 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:
   > not from cases which RelDecorrelator handles
   
   I don't get it.
   The real reason should be that `LogicalUnnestRule` is in the 
`DEFAULT_REWRITE` phase, and the `DEFAULT_REWRITE` phase is behind the 
`DECORRELATE` phase, so now we need not verify the Unnest correlation?
   Update comments?

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