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_r373914585
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/delegation/PlannerContext.java
 ##########
 @@ -80,13 +82,15 @@
  */
 @Internal
 public class PlannerContext {
+
        private final RelDataTypeSystem typeSystem = new FlinkTypeSystem();
        private final FlinkTypeFactory typeFactory = new 
FlinkTypeFactory(typeSystem);
        private final TableConfig tableConfig;
-       private final RelOptCluster cluster;
        private final FlinkContext context;
        private final CalciteSchema rootSchema;
        private final List<RelTraitDef> traitDefs;
+       private FrameworkConfig frameworkConfig;
+       private RelOptCluster cluster;
 
 Review comment:
   I am not favor of it.
   Pass `this::createSqlExprToRexConverter` to the `FlinkContextImpl` means we 
pass an unfinished instance to it. Actually `frameworkConfig` and `cluster` is 
not the real final to `FlinkContextImpl`, they will become real instance from 
null.
   So this feel like bypassing the `final` rule of Java.

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