my7ym commented on a change in pull request #1104: [CALCITE-2900] 
RewriteRexShuttle generates wrong type during flatten for structured type when 
visitInputRef
URL: https://github.com/apache/calcite/pull/1104#discussion_r266295219
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/sql2rel/RelStructuredTypeFlattener.java
 ##########
 @@ -303,9 +303,11 @@ protected int getNewForOldInput(int oldOrdinal) {
    * corresponding field post-flattening, and also returns its type.
    *
    * @param oldOrdinal Pre-flattening ordinal
+   * @param existingOffset offset already calculated the target column inside 
the oldOrdinal column.
+   *                       For unnested column, it should be 0.
    * @return Post-flattening ordinal and type
    */
-  protected Ord<RelDataType> getNewFieldForOldInput(int oldOrdinal) {
+  private Ord<RelDataType> getNewFieldForOldInput(int oldOrdinal, int 
existingOffset) {
 
 Review comment:
   @zabetak Changed to private.

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