swuferhong commented on code in PR #20822:
URL: https://github.com/apache/flink/pull/20822#discussion_r1067630694
##########
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdDistribution.scala:
##########
@@ -87,6 +87,10 @@ class FlinkRelMdDistribution private extends
MetadataHandler[FlinkDistribution]
}
}
+ def flinkDistribution(exchange: Exchange, mq: RelMetadataQuery):
FlinkRelDistribution = {
+ exchange.distribution.asInstanceOf[FlinkRelDistribution]
Review Comment:
> It's not safe to just cast to FlinkRelDistribution. I think we should
>
> ```
> // if exchagne.distribution is instance of FlinkRelDistribution
> // return exchange.distribution
>
> // else convert to FlinkRelDistribution according to RelDistribution.Type
> ```
The RelNode call this method `flinkDistribution()` must be an instance of
`FlinkRelDistribution`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]