[ 
https://issues.apache.org/jira/browse/DRILL-5993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16296038#comment-16296038
 ] 

ASF GitHub Bot commented on DRILL-5993:
---------------------------------------

Github user Ben-Zvi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1057#discussion_r157646636
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/svremover/CopierTemplate4.java
 ---
    @@ -54,17 +52,33 @@ public int copyRecords(int index, int recordCount) 
throws SchemaChangeException
           }
         }
     
    -    int outgoingPosition = 0;
    -    for(int svIndex = index; svIndex < index + recordCount; svIndex++, 
outgoingPosition++){
    +    return insertRecords(0, index, recordCount);
    +  }
    +
    +  @Override
    +  public int appendRecord(int index) throws SchemaChangeException {
    +    return appendRecords(index, 1);
    +  }
    --- End diff --
    
    Minor performance comment: If *appendRecord()* is to be used heavily, then 
the overhead of calling the for() loop (in insertRecords() ) many times for 
only a size of 1 may be significant. 


> Allow Copier to Copy a Record and Append to the End of an Outgoing Batch
> ------------------------------------------------------------------------
>
>                 Key: DRILL-5993
>                 URL: https://issues.apache.org/jira/browse/DRILL-5993
>             Project: Apache Drill
>          Issue Type: New Feature
>            Reporter: Timothy Farkas
>            Assignee: Timothy Farkas
>
> Currently the copier can only copy record from an incoming batch to the 
> beginning of an outgoing batch. We need to be able to copy a record and 
> append it to the end of the outgoing batch.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to