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_r293290416
##########
File path: integration/spark-common/src/main/scala/org/apache/spark/rdd/CarbonMergeFilesRDD.scala
##########
@@ -94,6 +102,28 @@ object CarbonMergeFilesRDD {
}
}
}
+ if (carbonTable.isHivePartitionTable) {
+ segmentIds.foreach(segmentId => {
+ val readPath: String = CarbonTablePath.getSegmentFilesLocation(tablePath) +
+ CarbonCommonConstants.FILE_SEPARATOR + segmentId + "_" +
+ segmentFileNameToSegmentIdMap.get(segmentId) + ".tmp"
+ // Merge all partition files into a single file.
+ val segmentFileName: String = SegmentFileStore
+ .genSegmentFileName(segmentId, segmentFileNameToSegmentIdMap.get(segmentId))
+ val segmentFile: SegmentFileStore.SegmentFile = SegmentFileStore
+ .mergeSegmentFiles(readPath,
+ segmentFileName,
+ CarbonTablePath.getSegmentFilesLocation(tablePath))
+
+ if (segmentFile != null) {
Review comment:
I think this code is not required for partition table as already segments file written to segment folder
----------------------------------------------------------------
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