hsyuan commented on a change in pull request #1355: [CALCITE-3228] Error while
applying rule ProjectScanRule: interpreter
URL: https://github.com/apache/calcite/pull/1355#discussion_r313205029
##########
File path: core/src/main/java/org/apache/calcite/rel/core/Project.java
##########
@@ -282,7 +282,12 @@ public RelWriter explainTerms(RelWriter pw) {
if (!(exp.e instanceof RexInputRef)) {
return null;
}
- mapping.set(((RexInputRef) exp.e).getIndex(), exp.i);
+
+ int source = ((RexInputRef) exp.e).getIndex();
+ if (mapping.getTargetOpt(source) != -1) {
+ return null;
Review comment:
Seems like there is no test case to cover this changes. The test case passed
even without this change.
----------------------------------------------------------------
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