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_r313609297
 
 

 ##########
 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;
       }
 
 Review comment:
   I think just changing the mapping type to `INVERSE_FUNCTION` and removing 
`Mappings.isIdentity(mapping)` check in L109 can also solve the issue. 
L275~L277 should be removed. Apparently, the mapping is not an inverse 
surjection, but an inverse function, according to the method description.

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

Reply via email to