maksaska commented on code in PR #12285:
URL: https://github.com/apache/ignite/pull/12285#discussion_r2380198515


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java:
##########
@@ -948,11 +948,13 @@ public static QueryClassProperty 
buildClassProperty(Class<?> keyCls, Class<?> va
     public static GridQueryProperty buildProperty(Class<?> keyCls, Class<?> 
valCls, String keyFieldName,
         String valueFieldName, String pathStr, Class<?> resType, Map<String, 
String> aliases, boolean notNull,
         CacheObjectContext coCtx) throws IgniteCheckedException {
+        String alias = aliases.get(pathStr);
+
         if (pathStr.equals(keyFieldName))
-            return new KeyOrValProperty(true, pathStr, keyCls);
+            return new KeyOrValProperty(true, pathStr, keyCls, alias);

Review Comment:
   Agree



##########
modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/QueryIndexRowHandler.java:
##########
@@ -68,12 +68,14 @@ public QueryIndexRowHandler(
         for (String propName : keyDefs.keySet()) {
             GridQueryProperty prop;
 
-            if (propName.equals(QueryUtils.KEY_FIELD_NAME) || 
propName.equals(type.keyFieldName())
-                || propName.equals(type.keyFieldAlias()))
-                prop = new KeyOrValPropertyWrapper(true, propName, 
type.keyClass());
-            else if (propName.equals(QueryUtils.VAL_FIELD_NAME) || 
propName.equals(type.valueFieldName())
-                || propName.equals(type.valueFieldAlias()))
-                prop = new KeyOrValPropertyWrapper(false, propName, 
type.valueClass());
+            if (propName.equals(QueryUtils.KEY_FIELD_NAME))
+                prop = new KeyOrValPropertyWrapper(true, propName, 
type.keyClass(), null);
+            else if (propName.equals(type.keyFieldName()) || 
propName.equals(type.keyFieldAlias()))
+                prop = new KeyOrValPropertyWrapper(true, propName, 
type.keyClass(), type.keyFieldAlias());
+            else if (propName.equals(QueryUtils.VAL_FIELD_NAME))
+                prop = new KeyOrValPropertyWrapper(false, propName, 
type.valueClass(), null);
+            else if (propName.equals(type.valueFieldName()) || 
propName.equals(type.valueFieldAlias()))
+                prop = new KeyOrValPropertyWrapper(false, propName, 
type.valueClass(), type.keyFieldAlias());

Review Comment:
   Removed



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