Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2706#discussion_r216885323
--- Diff:
processing/src/main/java/org/apache/carbondata/processing/loading/sort/SortStepRowHandler.java
---
@@ -598,26 +625,53 @@ private void packNoSortFieldsToBytes(Object[] row,
ByteBuffer rowBuffer) {
tmpValue = row[this.measureIdx[idx]];
tmpDataType = this.dataTypes[idx];
if (null == tmpValue) {
+ // can exceed default 2MB, hence need to call ensureArraySize
+ rowBuffer = UnsafeSortDataRows
+ .ensureArraySize(1);
rowBuffer.put((byte) 0);
continue;
}
+ // can exceed default 2MB, hence need to call ensureArraySize
+ rowBuffer = UnsafeSortDataRows
+ .ensureArraySize(1);
--- End diff --
bad indent, can be moved to previous line
The same with line#642, line#647
---