JingsongLi commented on a change in pull request #10989: 
[FLINK-15840][table-planner-blink] ClassCastException is thrown when use 
tEnv.from for temp/catalog table
URL: https://github.com/apache/flink/pull/10989#discussion_r373907291
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/optimize/BatchCommonSubGraphBasedOptimizer.scala
 ##########
 @@ -80,12 +81,17 @@ class BatchCommonSubGraphBasedOptimizer(planner: 
BatchPlanner)
       .getOrElse(FlinkBatchProgram.buildProgram(config.getConfiguration))
     Preconditions.checkNotNull(programs)
 
+    val context = 
relNode.getCluster.getPlanner.getContext.unwrap(classOf[FlinkContext])
+
 
 Review comment:
   Not inline because:
   I think it is better to get all fields from this context instead of getting 
from planner.
   `BatchOptimizeContext` should extends previous context.
   Not do it because 1.10.

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


With regards,
Apache Git Services

Reply via email to