Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2611#discussion_r208146114
--- Diff:
processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java
---
@@ -160,35 +160,45 @@ public SortStepRowHandler(SortParameters
sortParameters) {
* @return 3-parted row
*/
public Object[]
convertIntermediateSortTempRowTo3Parted(IntermediateSortTempRow sortTempRow) {
- int[] dictDims = new int[this.dictSortDimCnt + this.dictNoSortDimCnt];
- byte[][] noDictArray = new byte[this.noDictSortDimCnt +
this.noDictNoSortDimCnt
- + this.varcharDimCnt +
this.complexDimCnt][];
-
- int[] dictNoSortDims = new int[this.dictNoSortDimCnt];
- byte[][] noDictNoSortAndVarcharComplexDims
- = new byte[this.noDictNoSortDimCnt + this.varcharDimCnt +
this.complexDimCnt][];
- Object[] measures = new Object[this.measureCnt];
+ Object[] out = new Object[3];
+ NonDictionaryUtil
+ .prepareOutObj(out, sortTempRow.getDictSortDims(),
sortTempRow.getNoDictSortDims(),
+ sortTempRow.getMeasures());
+ return out;
+ }
- sortTempRow.unpackNoSortFromBytes(dictNoSortDims,
noDictNoSortAndVarcharComplexDims, measures,
- this.dataTypes, this.varcharDimCnt, this.complexDimCnt);
+ /**
+ * Read intermediate sort temp row from InputStream.
--- End diff --
Update the comment
---