carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuchuanyin <...@git.apache.org>
Subject [GitHub] carbondata pull request #1593: [CARBONDATA-1837] Reusing origin row to reduc...
Date Wed, 06 Dec 2017 06:22:11 GMT
Github user xuchuanyin commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1593#discussion_r155154423
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/loading/row/CarbonRowBatch.java
---
    @@ -61,4 +61,19 @@ public CarbonRow next() throws NoSuchElementException {
       @Override public void remove() {
     
       }
    +
    +  /**
    +   * set current row, this can be used to set value for the RowBatch while iterating
it
    +   * @param row
    +   */
    +  public void setCurrentRow(CarbonRow row) {
    +    rowBatch[index - 1] = row;
    --- End diff --
    
    When we interator the RowBatch, the internal `index` will increase by 1.
    
    Here, we firstly get the value by iterating and then reset the value, so the correct index
should be `index-1`
    
    emm, it will be better to rename the method to `setPreviosRow`


---

Mime
View raw message