xtern commented on code in PR #1434:
URL: https://github.com/apache/ignite-3/pull/1434#discussion_r1053242249


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/externalize/RelJson.java:
##########
@@ -657,10 +666,13 @@ IgniteDistribution toDistribution(Object distribution) {
         }
 
         Map<String, Object> map = (Map<String, Object>) distribution;
-        Number cacheId = (Number) map.get("cacheId");
-        if (cacheId != null) {
-            return 
IgniteDistributions.hash(ImmutableIntList.copyOf((List<Integer>) 
map.get("keys")),
-                    DistributionFunction.affinity(cacheId.intValue(), 
cacheId));
+        String tableIdStr = (String) map.get("tableId");
+
+        if (tableIdStr != null) {
+            UUID tableId = UUID.fromString(tableIdStr);
+            Object zoneId = map.get("zoneId");
+
+            return IgniteDistributions.hash((List<Integer>) map.get("keys"), 
DistributionFunction.affinity(tableId, zoneId));

Review Comment:
   Done, thanks



##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/schema/TableDescriptorImpl.java:
##########
@@ -66,13 +59,17 @@ public class TableDescriptorImpl extends 
NullInitializerExpressionFactory implem
 
     private final ImmutableBitSet keyFields;
 
+    private final IgniteDistribution distribution;
+
     /**
      * Constructor.
      * TODO Documentation https://issues.apache.org/jira/browse/IGNITE-15859
      */
     public TableDescriptorImpl(
             List<ColumnDescriptor> columnDescriptors,
-            IntList colocationColumns
+            IntList colocationColumns,
+            UUID tableId,
+            Object zoneId

Review Comment:
   Done, thanks



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