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

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

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

    https://github.com/apache/incubator-carbondata/pull/50#discussion_r72383803
  
    --- Diff: 
core/src/main/java/org/carbondata/scan/collector/impl/AbstractScannedResultCollector.java
 ---
    @@ -170,33 +120,25 @@ private Object getMeasureData(MeasureColumnDataChunk 
dataChunk, int index, DataT
       /**
        * Below method will used to get the result
        */
    -  @Override public Result getCollectedResult() {
    -    Result<List<ListBasedResultWrapper>, Object> result = new 
ListBasedResult();
    -    if (tableBlockExecutionInfos.isFixedKeyUpdateRequired() && 
tableBlockExecutionInfos
    -        .isDimensionsExistInQuery()) {
    -      updateKeyWithLatestBlockKeygenerator();
    -      result.addScannedResult(listBasedResult);
    -    } else {
    -      result.addScannedResult(listBasedResult);
    +  protected void updateData(List<Object[]> listBasedResult) {
    +    if (tableBlockExecutionInfos.isFixedKeyUpdateRequired()) {
    +      updateKeyWithLatestBlockKeygenerator(listBasedResult);
         }
    -    return result;
       }
     
    -
    -
       /**
        * Below method will be used to update the fixed length key with the
        * latest block key generator
        *
        * @return updated block
        */
    -  private void updateKeyWithLatestBlockKeygenerator() {
    +  private void updateKeyWithLatestBlockKeygenerator(List<Object[]> 
listBasedResult) {
    --- End diff --
    
    @kumarvishal09 Yes you are right, as we are filling with surrogates we 
don't require to update/restructure the key. Key update/restructure is not 
required only for `DictionaryBasedResultCollector` but it is required for 
`RawBasedResultCollector`. That is why it is added here.


> 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