Github user mohammadshahidkhan commented on a diff in the pull request: https://github.com/apache/carbondata/pull/1782#discussion_r161366867 --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala --- @@ -893,33 +893,58 @@ object CommonUtil { /** * Merge the carbonindex files with in the segment to carbonindexmerge file inside same segment + * + * @param sparkContext + * @param segmentIds + * @param tablePath + * @param carbonTable + * @param mergeIndexProperty + * @param readFileFooterFromCarbonDataFile flag to read file footer information from carbondata + * file. This will used in case of upgrade from version + * which do not store the blocklet info to current version */ def mergeIndexFiles(sparkContext: SparkContext, segmentIds: Seq[String], tablePath: String, carbonTable: CarbonTable, - mergeIndexProperty: Boolean): Unit = { + mergeIndexProperty: Boolean, + readFileFooterFromCarbonDataFile: Boolean = false): Unit = { if (mergeIndexProperty) { - new CarbonMergeFilesRDD(sparkContext, AbsoluteTableIdentifier.from(tablePath, - carbonTable.getDatabaseName, carbonTable.getTableName).getTablePath, - segmentIds).collect() + new CarbonMergeFilesRDD( + sparkContext, + AbsoluteTableIdentifier.from( + tablePath, + carbonTable.getDatabaseName, + carbonTable.getTableName).getTablePath, --- End diff -- if already have tablePath then why to get tablePath from AbsoluteTableIdentifier.from( tablePath, carbonTable.getDatabaseName, carbonTable.getTableName).getTablePath ? This is unnecessary forming objects so please simply use the tablePath.
---