[GitHub] [carbondata] KanakaKumar commented on a change in pull request #3262: [CARBONDATA-3415] Merge index is not working for partition table. Merge index for partition table is taking significantly longer time than normal table.

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

[GitHub] [carbondata] KanakaKumar commented on a change in pull request #3262: [CARBONDATA-3415] Merge index is not working for partition table. Merge index for partition table is taking significantly longer time than normal table.

GitBox
KanakaKumar commented on a change in pull request #3262: [CARBONDATA-3415] Merge index is not working for partition table. Merge index for partition table is taking significantly longer time than normal table.
URL: https://github.com/apache/carbondata/pull/3262#discussion_r291466837
 
 

 ##########
 File path: integration/spark-common/src/main/scala/org/apache/spark/rdd/CarbonMergeFilesRDD.scala
 ##########
 @@ -130,9 +135,28 @@ class CarbonMergeFilesRDD(
   extends CarbonRDD[String](ss, Nil) {
 
   override def internalGetPartitions: Array[Partition] = {
-    segments.zipWithIndex.map {s =>
-      CarbonMergeFilePartition(id, s._2, s._1)
-    }.toArray
+    if (carbonTable.isHivePartitionTable) {
+      // in case of partition table make rdd partitions per partition of the carbon table
+      val partitionPaths: java.util.Map[String, String] = new java.util.HashMap()
+      segments.foreach(segment => {
+        val partitionSpecs = SegmentFileStore.getPartitionSpecs(segment, carbonTable.getTablePath)
 
 Review comment:
   1) SegmentFileStore.getPartitionSpecs is reading table status file for each segment. So, read & send the load details from outside to avoid this.
   2) partitionLoc may be same for each segment. So, at the end only one segment per partition will remain in map. Please correct to use list based map instead
   

----------------------------------------------------------------
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