You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/08/27 04:03:32 UTC

[GitHub] [calcite] chunweilei commented on a change in pull request #2121: [CALCITE-4192]fix aggregate column origins searching by RelMdColumnOrigins

chunweilei commented on a change in pull request #2121:
URL: https://github.com/apache/calcite/pull/2121#discussion_r478074237



##########
File path: core/src/main/java/org/apache/calcite/rel/metadata/RelMdColumnOrigins.java
##########
@@ -65,8 +65,8 @@ private RelMdColumnOrigins() {}
   public Set<RelColumnOrigin> getColumnOrigins(Aggregate rel,
       RelMetadataQuery mq, int iOutputColumn) {
     if (iOutputColumn < rel.getGroupCount()) {
-      // Group columns pass through directly.
-      return mq.getColumnOrigins(rel.getInput(), iOutputColumn);
+      // get actual index of Group columns.
+      return mq.getColumnOrigins(rel.getInput(), rel.getGroupSet().asList().get(iOutputColumn));

Review comment:
       The title does not describe the issue clearly. Could you improve it?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org