danny0405 commented on a change in pull request #1293: [CALCITE-3165] 
Project#accept(RexShuttle shuttle) does not update rowType
URL: https://github.com/apache/calcite/pull/1293#discussion_r301617948
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/core/Project.java
 ##########
 @@ -145,6 +146,12 @@ public RelNode accept(RexShuttle shuttle) {
     if (this.exps == exps) {
       return this;
     }
+    final RelDataType rowType =
+        RexUtil.createStructType(
+            getInput().getCluster().getTypeFactory(),
+            exps,
+            this.rowType.getFieldNames(),
+            SqlValidatorUtil.F_SUGGESTER);
     return copy(traitSet, getInput(), exps, rowType);
 
 Review comment:
   Do we need a `SqlValidatorUtil.Suggester` here ? What's the problem if we 
keep the original fields names(if there are some same name fields.)

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