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_r290624047
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/rules/FlinkBatchRuleSets.scala
##########
@@ -119,7 +119,9 @@ object FlinkBatchRuleSets {
new CoerceInputsRule(classOf[LogicalMinus], false),
ConvertToNotInOrInRule.INSTANCE,
// optimize limit 0
- FlinkLimit0RemoveRule.INSTANCE
+ FlinkLimit0RemoveRule.INSTANCE,
+ // unnest rule
+ LogicalUnnestRule.INSTANCE
Review comment:
`decorrelate` replaces all correlated expressions in RelNode with
non-correlated expressions.
while `LogicalUnnestRule` rewrites `LogicalCorrelate` on `Uncollect` pattern
to `LogicalCorrelate` on `LogicalTableFunctionScan` with `explode`, which will
be converted to physical Correlate in physical optimization phase. so
`LogicalUnnestRule` should be put in `DEFAULT_REWRITE`.
----------------------------------------------------------------
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