zstan commented on code in PR #2441:
URL: https://github.com/apache/ignite-3/pull/2441#discussion_r1293318151


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java:
##########
@@ -640,7 +641,11 @@ private void handleError(Throwable ex, String 
initiatorNode, long fragmentId) {
         }
 
         private AsyncCursor<List<Object>> execute(InternalTransaction tx, 
MultiStepPlan notMappedPlan) {
-            CompletableFuture<MultiStepPlan> f = mapFragments(notMappedPlan);
+            Iterable<IgniteRel> fragmentRoots = 
TransformingIterator.newIterable(notMappedPlan.fragments(), (f) -> f.root());

Review Comment:
   ```suggestion
               Iterable<IgniteRel> fragmentRoots = 
TransformingIterator.newIterable(notMappedPlan.fragments(), Fragment::root);
   ```



##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java:
##########
@@ -796,6 +802,9 @@ public IgniteRel visit(IgniteTableScan rel) {
                 @Override
                 public IgniteRel visit(IgniteTableModify rel) {
                     int tableId = 
rel.getTable().unwrap(IgniteTable.class).id();
+
+                    // TODO IGNITE-19499 Remove rewriting tableId.
+                    tableId = deps.internalTable(tableId).tableId();
                     List<NodeWithTerm> assignments = 
fragment.mapping().updatingTableAssignments();
 
                     enlist(tableId, assignments);

Review Comment:
   assignments can be null



##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java:
##########
@@ -172,7 +173,7 @@ public static <RowT> ExecutionServiceImpl<RowT> create(
                 dependencyResolver,
                 (ctx, deps) -> new LogicalRelImplementor<>(
                         ctx,
-                        new HashFunctionFactoryImpl<>(sqlSchemaManager, 
handler),
+                        new 
HashFunctionFactoryImpl<>(ctx.getRootSchema().unwrap(IgniteSchema.class), 
handler),

Review Comment:
   I found that HashFunctionFactoryImpl not need IgniteSchema at all, but only 
TableDescriptor.



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