kunal642 commented on a change in pull request #4039:
URL: https://github.com/apache/carbondata/pull/4039#discussion_r539852924



##########
File path: 
processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/FileMergeSortComparator.java
##########
@@ -78,49 +83,43 @@ public int compare(IntermediateSortTempRow rowA, 
IntermediateSortTempRow rowB) {
     int nonDictIndex = 0;
     int noDicTypeIdx = 0;
     int schemaRowIdx = 0;
-    int sortIndex = 0;
 
-    for (Map.Entry<Integer, List<Boolean>> schemaEntry : 
sortColumnSchemaOrderMap.entrySet()) {
-      boolean isSortColumn = schemaEntry.getValue().get(0);
-      boolean isDictColumn = schemaEntry.getValue().get(1);
-      if (isSortColumn) {
-        if (isSortColumnNoDictionary[sortIndex++]) {
-          if (DataTypeUtil.isPrimitiveColumn(noDictDataTypes[noDicTypeIdx])) {
-            // use data types based comparator for the no dictionary measure 
columns
-            SerializableComparator comparator =
-                org.apache.carbondata.core.util.comparator.Comparator
-                    .getComparator(noDictDataTypes[noDicTypeIdx]);
-            int difference = comparator
-                
.compare(rowA.getNoDictSortDims()[noDictPrimitiveIndex[schemaRowIdx]],
-                    
rowB.getNoDictSortDims()[noDictPrimitiveIndex[schemaRowIdx]]);
-            schemaRowIdx++;
-            if (difference != 0) {
-              return difference;
-            }
-          } else {
-            byte[] byteArr1 = (byte[]) rowA.getNoDictSortDims()[nonDictIndex];
-            byte[] byteArr2 = (byte[]) rowB.getNoDictSortDims()[nonDictIndex];
-
-            int difference = 
ByteUtil.UnsafeComparer.INSTANCE.compareTo(byteArr1, byteArr2);
-            if (difference != 0) {
-              return difference;
-            }
+    for (boolean isNoDictionary : isSortColumnNoDictionary) {

Review comment:
       i think now "isSortColumnNoDictionary" is not needed as dict and noDict 
Order mappings are kept separately. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to