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

ASF GitHub Bot commented on CARBONDATA-92:
------------------------------------------

Github user kumarvishal09 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/50#discussion_r72341820
  
    --- Diff: 
core/src/main/java/org/carbondata/core/carbon/datastore/chunk/impl/FixedLengthDimensionDataChunk.java
 ---
    @@ -69,9 +69,27 @@ public FixedLengthDimensionDataChunk(byte[] dataChunk, 
DimensionChunkAttributes
       }
     
       /**
    +   * Converts to column dictionary integer value
    +   */
    +  @Override public int fillConvertedChunkData(int rowId, int columnIndex, 
int[] row,
    +      KeyStructureInfo restructuringInfo) {
    +    if (chunkAttributes.getInvertedIndexes() != null) {
    +      rowId = chunkAttributes.getInvertedIndexesReverse()[rowId];
    +    }
    +    int start = rowId * chunkAttributes.getColumnValueSize();
    +    int dict = 0;
    +    for (int i = start; i < start + chunkAttributes.getColumnValueSize(); 
i++) {
    +      dict <<= 8;
    +      dict ^= dataChunk[i] & 0xFF;
    +    }
    +    row[columnIndex] = dict;
    +    return columnIndex + 1;
    --- End diff --
    
    @ravipesala do we need to return anything from this method .Please correct 
me if I am wrong:)


> Remove the unnecessary intermediate conversion of key while scanning.
> ---------------------------------------------------------------------
>
>                 Key: CARBONDATA-92
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-92
>             Project: CarbonData
>          Issue Type: Improvement
>            Reporter: Ravindra Pesala
>
> Remove the unnecessary intermediate conversion of key while scanning.
> Basically it removes one step in result conversion.
> It avoids System.arraycopy while converting to result. 
> It avoids the result preparation step.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to