alex-plekhanov commented on a change in pull request #8855:
URL: https://github.com/apache/ignite/pull/8855#discussion_r587725778



##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/IgniteTableImpl.java
##########
@@ -59,16 +62,21 @@
     /** */
     private final Statistic statistic;
 
+    /** */
+    private final GridKernalContext ctx;
+
     /** */
     private volatile GridH2Table tbl;
 
     /** */
     private final Map<String, IgniteIndex> indexes = new ConcurrentHashMap<>();
 
     /**
-     *  @param desc Table descriptor.
+     * @param ctx Kernal context.
+     * @param desc Table descriptor.
      */
-    public IgniteTableImpl(TableDescriptor desc) {
+    public IgniteTableImpl(GridKernalContext ctx, TableDescriptor desc) {

Review comment:
       I think if at least two components are required it's better to pass only 
the KernalContext. Passing two components and store them in two fields only 
brings unnecessary code complexity.
   I can also pass and store only one of these components and get another from 
it (for example `cacheProc.context().kernelContext().query()`) but it looks 
weird.




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


Reply via email to