Github user kunal642 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1605#discussion_r154980576
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAlterTableCompactionCommand.scala
---
@@ -212,4 +221,56 @@ case class CarbonAlterTableCompactionCommand(
}
}
}
+
+ private def startCompactionForDataMap(carbonLoadModel: CarbonLoadModel,
+ sparkSession: SparkSession): Unit = {
+ val carbonTable =
carbonLoadModel.getCarbonDataLoadSchema.getCarbonTable
+ val loadMetaDataDetails = CarbonDataMergerUtil
+ .identifySegmentsToBeMerged(carbonLoadModel,
+ CarbonDataMergerUtil.getCompactionSize(CompactionType.MAJOR),
+ carbonLoadModel.getLoadMetadataDetails,
+ carbonLoadModel.getCompactionType)
+ val segments = loadMetaDataDetails.asScala.map(_.getLoadName)
+ if (segments.nonEmpty) {
+ CarbonSession
+ .threadSet(CarbonCommonConstants.CARBON_INPUT_SEGMENTS +
--- End diff --
This is used to set the segments to access to load incremental data into
the child table. There is no other way to set segments in CarbonScanRDD other
than this
---