Github user kumarvishal09 commented on a diff in the pull request: https://github.com/apache/carbondata/pull/3029#discussion_r244723649 --- Diff: processing/src/main/java/org/apache/carbondata/processing/merger/RowResultMergerProcessor.java --- @@ -103,15 +104,22 @@ private void initRecordHolderHeap(List<RawResultIterator> rawResultIteratorList) * Merge function * */ - public boolean execute(List<RawResultIterator> resultIteratorList) throws Exception { - initRecordHolderHeap(resultIteratorList); + public boolean execute(List<RawResultIterator> unsortedResultIteratorList, + List<RawResultIterator> sortedResultIteratorList) throws Exception { + + if (unsortedResultIteratorList != null && unsortedResultIteratorList.size() > 0) { --- End diff -- No need to add this if check because if unsortedResultIteratorList != null && unsortedResultIteratorList.size() > 0 condition is true and RowResultMergerResultProcessor is getting called then problem is there in the caller class, this class responsibility is to handle only sorted without restructured segments
---