You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/03/15 09:14:03 UTC

[GitHub] [calcite] zabetak commented on a change in pull request #1104: [CALCITE-2900] RewriteRexShuttle generates wrong type during flatten for structured type when visitInputRef

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

 ##########
 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) {
+  protected Ord<RelDataType> getNewFieldForOldInput(int oldOrdinal, int existingOffset) {
 
 Review comment:
   Why protected and not private? Is it meant to be subclassed? 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services