AMashenkov commented on code in PR #2164:
URL: https://github.com/apache/ignite-3/pull/2164#discussion_r1226710781


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/CacheKey.java:
##########
@@ -18,48 +18,34 @@
 package org.apache.ignite.internal.sql.engine.prepare;
 
 import java.util.Arrays;
-import java.util.Objects;
 
 /**
  * CacheKey.
  * The class uses to distinguish different query plans which could be various 
for the same query text but different context. As example such
  * context could be schema name, dynamic parameters, and so on...
  */
 public class CacheKey {
-    public static final Class[] EMPTY_CLASS_ARRAY = {};
+    private static final Class[] EMPTY_CLASS_ARRAY = {};
 
     private final String schemaName;
 
     private final String query;
 
-    private final Object contextKey;
-
     private final Class[] paramTypes;
 
     /**
      * Constructor.
      *
      * @param schemaName Schema name.
      * @param query      Query string.
-     * @param contextKey Optional context key to differ queries with and 
without/different flags, having an impact on result plan (like
-     *                   LOCAL flag)
-     * @param paramTypes Types of all dynamic parameters, no any type can be 
{@code null}.
+     * @param params     Dynamic parameters.
      */
-    public CacheKey(String schemaName, String query, Object contextKey, 
Class[] paramTypes) {
+    public CacheKey(String schemaName, String query, Object[] params) {

Review Comment:
   Cache key must contains schema version.
   Using integer CatalogSchemaDescriptor.id() instead of schemaName would be 
more optimal.
   
   As of now, you can safely hardcode constants instead of version/id, which we 
will fix later.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to