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

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_r72343421
  
    --- 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 --
    
    Please correct me if i m wrong but now we are from executor layer for 
dictionary columns we are sending surrogate keys ..key updation is required 
only when aggregation is done is executor ..this is because of dynamic 
cardinality. As now from DimensionColumnDataChunk we are filling the surrogate 
key ,so now do we need this method ??


> 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