vineetgarg02 commented on a change in pull request #1852: [CALCITE-3848]
Materialized view rewriting fails for mv consisting of group by on join keys
(Vineet Garg)
URL: https://github.com/apache/calcite/pull/1852#discussion_r390049788
##########
File path:
core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java
##########
@@ -1187,7 +1187,7 @@ protected RexNode shuttleReferences(final RexBuilder
rexBuilder,
}
int pos = c.iterator().next();
if (rewritingMapping != null) {
- pos = rewritingMapping.getTargetOpt(pos);
+ pos = rewritingMapping.get(pos).iterator().next();
if (pos == -1) {
Review comment:
Yup good catch.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services