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

    https://github.com/apache/carbondata/pull/2654#discussion_r214336180
  
    --- Diff: 
processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java
 ---
    @@ -224,10 +237,15 @@ public IntermediateSortTempRow 
readWithNoSortFieldConvert(
     
         // read no-dict & sort data
         for (int idx = 0; idx < this.noDictSortDimCnt; idx++) {
    -      short len = inputStream.readShort();
    -      byte[] bytes = new byte[len];
    -      inputStream.readFully(bytes);
    -      noDictSortDims[idx] = bytes;
    +      // for no dict measure column get the original data
    +      if (DataTypeUtil.isPrimitiveColumn(noDicSortDataTypes[idx])) {
    +        noDictSortDims[idx] = readDataFromStream(inputStream, idx);
    +      } else {
    +        short len = inputStream.readShort();
    +        byte[] bytes = new byte[len];
    +        inputStream.readFully(bytes);
    +        noDictSortDims[idx] = bytes;
    +      }
    --- End diff --
    
    Above also there is a similar..refactor the code to one method and call 
from both these places


---

Reply via email to