ygerzhedovich commented on code in PR #4629:
URL: https://github.com/apache/ignite-3/pull/4629#discussion_r1823959899


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/ExecutionDistributionProviderImpl.java:
##########
@@ -205,4 +230,46 @@ private CompletableFuture<List<TokenizedAssignments>> 
allReplicas(
             });
         });
     }
+
+    static class DistributionHolderImpl implements DistributionHolder {
+        private final List<String> nodes;
+        private final Map<IgniteTable, List<TokenizedAssignments>> 
assignmentsPerTable;
+        private final Map<String, List<String>> nodesPerView;
+
+        DistributionHolderImpl(
+                List<String> nodes,
+                Map<IgniteTable, List<TokenizedAssignments>> 
assignmentsPerTable,
+                Map<String, List<String>> nodesPerView) {
+            this.nodes = nodes;
+            this.assignmentsPerTable = assignmentsPerTable;
+            this.nodesPerView = nodesPerView;
+        }
+
+        @Override
+        public List<String> nodes() {
+            return nodes;
+        }
+
+        @Override
+        public List<TokenizedAssignments> tableAssignments(IgniteTable table) {
+            return assignmentsPerTable.get(table);
+        }
+
+        @Override
+        public List<String> viewNodes(String viewName) {
+            return nodesPerView.get(viewName);
+        }
+    }
+
+    /** Nodes distribution information holder. */
+    public interface DistributionHolder {
+        /** Whole collection of participating nodes. */
+        List<String> nodes();
+
+        /** Nodes table assigned to. */

Review Comment:
   it can return `null` as and the following method



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