Vladsz83 commented on code in PR #12113:
URL: https://github.com/apache/ignite/pull/12113#discussion_r2205429423


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/ProjectableFilterableTableScan.java:
##########
@@ -195,4 +195,13 @@ public RelColumnOrigin columnOriginsByRelLocalRef(int 
colIdx) {
 
         return new RelColumnOrigin(getTable(), originColIdx, false);
     }
+
+    /** Returns original index of a table column related to the projected 
index. */
+    public RelColumnOrigin tableColOffset(int projectColIdx) {
+        int originColIdx = (requiredColumns == null)
+            ? projectColIdx
+            : Commons.mapping(requiredColumns, 
getTable().getRowType().getFieldCount()).getTarget(requiredColumns.nth(projectColIdx));

Review Comment:
   This is the difference - mapping. Without it, 
`IgniteMdRowCount#joinRowCount()` cannot determine proper column origin and 
find the index.



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