AMashenkov commented on code in PR #3187:
URL: https://github.com/apache/ignite-3/pull/3187#discussion_r1494466475


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/mapping/QuerySplitter.java:
##########
@@ -188,12 +191,13 @@ public IgniteRel visit(IgniteTableScan rel) {
         IgniteTable table = rel.getTable().unwrap(IgniteTable.class);
 
         assert table != null;
+        long sourceId = idGenerator.nextId();
 
         if (curr.seenRelations.add(table.id())) {
-            curr.tables.add(table);
+            curr.tables.put(sourceId, table);

Review Comment:
   BTW, you missed the very first question. Should `if` clause be removed?
   As I understand, you need a full `sourceID-> table` mapping.
   The same table may occurs with more than once with different `sourceId`, but 
you will never (I guess) see `sourceId` duplicates, isn't it?
   ```
    if (curr.seenRelations.add(table.id())) {
                curr.tables.put(sourceId, table);
   ```
   



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