ajantha-bhat commented on a change in pull request #4044: URL: https://github.com/apache/carbondata/pull/4044#discussion_r537330003
########## File path: integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/CleanFilesPostEventListener.scala ########## @@ -48,30 +50,59 @@ class CleanFilesPostEventListener extends OperationEventListener with Logging { event match { case cleanFilesPostEvent: CleanFilesPostEvent => LOGGER.info("Clean files post event listener called") - val carbonTable = cleanFilesPostEvent.carbonTable - val indexTables = CarbonIndexUtil - .getIndexCarbonTables(carbonTable, cleanFilesPostEvent.sparkSession) - val isForceDelete = cleanFilesPostEvent.ifForceDelete - val inProgressSegmentsClean = cleanFilesPostEvent.cleanStaleInProgress - indexTables.foreach { indexTable => - val partitions: Option[Seq[PartitionSpec]] = CarbonFilters.getPartitions( - Seq.empty[Expression], - cleanFilesPostEvent.sparkSession, - indexTable) - SegmentStatusManager.deleteLoadsAndUpdateMetadata( - indexTable, isForceDelete, partitions.map(_.asJava).orNull, inProgressSegmentsClean, - true) - CarbonUpdateUtil.cleanUpDeltaFiles(indexTable, true) - cleanUpUnwantedSegmentsOfSIAndUpdateMetadata(indexTable, carbonTable) - } + cleanFilesForIndex( Review comment: would it be better if we call cleanFilesCommand for each index tables, like how MV is handled down ? ---------------------------------------------------------------- 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