[GitHub] [carbondata] kumarvishal09 commented on a change in pull request #3182: [CARBONDATA-3343] Compaction for Range Sort

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] kumarvishal09 commented on a change in pull request #3182: [CARBONDATA-3343] Compaction for Range Sort

GitBox
kumarvishal09 commented on a change in pull request #3182: [CARBONDATA-3343] Compaction for Range Sort
URL: https://github.com/apache/carbondata/pull/3182#discussion_r277670542
 
 

 ##########
 File path: integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala
 ##########
 @@ -362,24 +415,32 @@ class CarbonMergerRDD[K, V](
     val columnToCardinalityMap = new util.HashMap[java.lang.String, Integer]()
     val partitionTaskMap = new util.HashMap[PartitionSpec, String]()
     val counter = new AtomicInteger()
+    var indexOfRangeColumn = -1
+    var taskIdCount = 0
     carbonInputSplits.foreach { split =>
-      val taskNo = getTaskNo(split, partitionTaskMap, counter)
       var dataFileFooter: DataFileFooter = null
-
-      val splitList = taskIdMapping.get(taskNo)
-      noOfBlocks += 1
-      if (null == splitList) {
-        val splitTempList = new util.ArrayList[CarbonInputSplit]()
-        splitTempList.add(split)
-        taskIdMapping.put(taskNo, splitTempList)
-      } else {
-        splitList.add(split)
+      if (null == rangeColumn) {
+        val taskNo = getTaskNo(split, partitionTaskMap, counter)
+        var sizeOfSplit = split.getDetailInfo.getBlockSize
+        val splitList = taskIdMapping.get(taskNo)
+        noOfBlocks += 1
+        if (null == splitList) {
+          val splitTempList = new util.ArrayList[CarbonInputSplit]()
+          splitTempList.add(split)
+          taskIdMapping.put(taskNo, splitTempList)
+        } else {
+          splitList.add(split)
+        }
       }
-
       // Check the cardinality of each columns and set the highest.
       try {
-        dataFileFooter = CarbonUtil.readMetadataFile(
-          CarbonInputSplit.getTableBlockInfo(split))
+        if (null == rangeColumn) {
+          dataFileFooter = CarbonUtil.readMetadataFile(
+            CarbonInputSplit.getTableBlockInfo(split))
+        } else {
+          dataFileFooter = CarbonUtil.readMetadataFile(
 
 Review comment:
   Please remove this reading of file footer as it is not used  

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services