vikramahuja1001 commented on a change in pull request #4005:
URL: https://github.com/apache/carbondata/pull/4005#discussion_r531552014
##########
File path:
integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonCleanFilesCommand.scala
##########
@@ -91,6 +96,14 @@ case class CarbonCleanFilesCommand(
OperationListenerBus.getInstance.fireEvent(cleanFilesPreEvent,
operationContext)
if (tableName.isDefined) {
Checker.validateTableExists(databaseNameOp, tableName.get, sparkSession)
+ if (forceClean) {
+ // empty the trash folder
+ TrashUtil.emptyTrash(carbonTable.getTablePath)
+ } else {
+ // clear trash based on timestamp
+ TrashUtil.deleteExpiredDataFromTrash(carbonTable.getTablePath)
+ }
+ CleanFilesUtil.cleanStaleSegments(carbonTable)
Review comment:
i don't understand , what you mean here. We are cleaning the stale
segments here for the first time. We delete the data in trash first based on
timestamp expiration and then proceed with cleaning of stale segments and then
do regular clean files operation for MFD/Compacted segments
----------------------------------------------------------------
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:
[email protected]