shishkovilja commented on code in PR #12563:
URL: https://github.com/apache/ignite/pull/12563#discussion_r2611196752


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java:
##########
@@ -2439,32 +2427,12 @@ public void onPageSend() {
      *
      */
     private static class FieldsResult<Q> extends CachedResult<Q> {

Review Comment:
   Class sems to be redundant now. Please, file a ticket for removal and add 
here TODO with a link to the ticket.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java:
##########
@@ -159,15 +131,6 @@ public GridCacheQueryResponse(int cacheId, long reqId, 
Throwable err, boolean ad
     @Override public void finishUnmarshal(GridCacheSharedContext ctx, 
ClassLoader ldr) throws IgniteCheckedException {

Review Comment:
   ```suggestion
       @Override public void finishUnmarshal(GridCacheSharedContext<?, ?> ctx, 
ClassLoader ldr) throws IgniteCheckedException {
   ```



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheDistributedQueryManager.java:
##########
@@ -277,7 +275,6 @@ protected void removeQueryFuture(long reqId) {
             sndId,
             req.id(),
             req.includeMetaData(),
-            req.allPages(),

Review Comment:
   Why was this line removed?



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheLocalQueryFuture.java:
##########
@@ -137,7 +137,6 @@ private GridCacheQueryInfo localQueryInfo() throws 
IgniteCheckedException {
                 cctx.localNodeId(),
                 cctx.io().nextIoId(),
                 qry.query().includeMetadata(),
-                true,

Review Comment:
   Why was it removed?



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryResponse.java:
##########
@@ -131,15 +112,6 @@ public GridCacheQueryResponse(int cacheId, long reqId, 
Throwable err, boolean ad
 
         GridCacheContext cctx = ctx.cacheContext(cacheId);

Review Comment:
   ```suggestion
           GridCacheContext<?, ?> = ctx.cacheContext(cacheId);
   ```
   
   Also
   1. Add wildcards for ctx parameter in method signature.
   2. Change line 121 in a such way: `Map.Entry<?, ?> e = (Map.Entry<?, ?>)o;`



##########
modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/IndexQueryResultMeta.java:
##########
@@ -64,27 +60,30 @@ public IndexQueryResultMeta(SortedIndexDefinition def, int 
critSize) {
         }
     }
 
+    /** {@inheritDoc} */
+    @Override public short directType() {
+        return 18;
+    }
+
     /** */
     public IndexKeyTypeSettings keyTypeSettings() {
         return keyTypeSettings;
     }
 
     /** */
-    public LinkedHashMap<String, IndexKeyDefinition> keyDefinitions() {
-        return keyDefs;
+    public void keyTypeSettings(IndexKeyTypeSettings keyTypeSettings) {
+        this.keyTypeSettings = keyTypeSettings;
     }
 
-    /** {@inheritDoc} */
-    @Override public void writeExternal(ObjectOutput out) throws IOException {
-        out.writeObject(keyTypeSettings);
-
-        U.writeMap(out, keyDefs);
+    /** */
+    public Map<String, IndexKeyDefinition> keyDefinitions() {
+        return keyDefs;
     }
 
-    /** {@inheritDoc} */
-    @Override public void readExternal(ObjectInput in) throws IOException, 
ClassNotFoundException {
-        keyTypeSettings = (IndexKeyTypeSettings)in.readObject();
-
-        keyDefs = U.readLinkedMap(in);
+    /** */
+    public void keyDefinitions(Map<String, IndexKeyDefinition> keyDefs) {
+        this.keyDefs = keyDefs == null

Review Comment:
   Please, add TODO here with link to ticket for refactoring.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to