jackylk commented on a change in pull request #3535: [WIP] Refactory data 
loading for partition table
URL: https://github.com/apache/carbondata/pull/3535#discussion_r361857572
 
 

 ##########
 File path: 
integration/spark-common/src/main/scala/org/apache/spark/rdd/CarbonMergeFilesRDD.scala
 ##########
 @@ -181,17 +264,39 @@ class CarbonMergeFilesRDD(
     }
   }
 
-  override def internalCompute(theSplit: Partition, context: TaskContext): 
Iterator[String] = {
+  override def internalCompute(theSplit: Partition,
+      context: TaskContext): Iterator[(String, SegmentFileStore.SegmentFile)] 
= {
     val tablePath = carbonTable.getTablePath
-    val iter = new Iterator[String] {
+    val iter = new Iterator[(String, SegmentFileStore.SegmentFile)] {
       val split = theSplit.asInstanceOf[CarbonMergeFilePartition]
       logInfo("Merging carbon index files of segment : " +
               CarbonTablePath.getSegmentPath(tablePath, split.segmentId))
 
-      if (isHivePartitionedTable) {
+      var segmentFile: SegmentFileStore.SegmentFile = null
+      var indexSize: String = ""
+      if (isHivePartitionedTable && partitionInfo.isEmpty) {
         CarbonLoaderUtil
           .mergeIndexFilesInPartitionedSegment(carbonTable, split.segmentId,
             segmentFileNameToSegmentIdMap.get(split.segmentId), 
split.partitionPath)
+      } else if (isHivePartitionedTable && !partitionInfo.isEmpty) {
+        val folderDetails = CarbonLoaderUtil
+          .mergeIndexFilesInPartitionedTempSegment(carbonTable,
 
 Review comment:
   move `carbonTable` to next line

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


With regards,
Apache Git Services

Reply via email to