danny0405 commented on a change in pull request #8859:
[FLINK-12905][table-planner] Enable querying CatalogViews in legacy planner
URL: https://github.com/apache/flink/pull/8859#discussion_r350512329
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/FlinkRelBuilder.scala
##########
@@ -167,19 +165,9 @@ object FlinkRelBuilder {
def proto(context: Context): RelBuilderFactory = new RelBuilderFactory() {
def create(cluster: RelOptCluster, schema: RelOptSchema): RelBuilder = {
+ val clusterContext =
cluster.getPlanner.getContext.unwrap(classOf[FlinkContext])
+ val mergedContext = Contexts.chain(clusterContext, context)
Review comment:
Can we need to chain the contexts here ? Have a quick look at the
`ChainContext#unwrap`, it seems that the `Contexts.chain(clusterContext,
context)` always returns `clusterContext ` if it is not null, this logic is
just inconsistent with the original, because the old code use `context` to
unwrap.
----------------------------------------------------------------
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