Github user manishgupta88 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1812#discussion_r184403180
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/preaaggregate/PreAggregateListeners.scala
 ---
    @@ -566,6 +567,11 @@ object AlterPreAggregateTableCompactionPostListener 
extends OperationEventListen
         val compactionType = compactionEvent.carbonMergerMapping.campactionType
         val carbonLoadModel = compactionEvent.carbonLoadModel
         val sparkSession = compactionEvent.sparkSession
    +    val segmentIds = if (compactionType == CompactionType.CUSTOM) {
    +      Some(compactionEvent.carbonMergerMapping.validSegments.map(x => 
x.getSegmentNo).toList)
    --- End diff --
    
    Custom compaction should be done only for the given table in the Alter SQL. 
Custom compaction executed on main table should not be applied on child 
tables/datamaps as one to one mapping of segments might not be there between 
main table and its child tables.
    Custom compaction can be done for child tables/datamaps directly like main 
table by specifying the child table/datamap name in the alter SQL.


---

Reply via email to