maheshrajus commented on code in PR #4276: URL: https://github.com/apache/carbondata/pull/4276#discussion_r918548519
########## core/src/main/java/org/apache/carbondata/core/util/CleanFilesUtil.java: ########## @@ -206,10 +206,12 @@ private static void getStaleSegmentFiles(CarbonTable carbonTable, List<String> s /** * This method will delete all the empty partition folders starting from the table path */ - private static void deleteEmptyPartitionFoldersRecursively(CarbonFile tablePath) { + public static void deleteEmptyPartitionFoldersRecursively(CarbonFile tablePath) { CarbonFile[] listOfFiles = tablePath.listFiles(); if (listOfFiles.length == 0) { tablePath.delete(); + // if parent file folder also empty then delete that too. + deleteEmptyPartitionFoldersRecursively(tablePath.getParentFile()); Review Comment: this i added as part of bug fix. If partition folder is empty after moving to trash, it will delete empty folder. After moving if database folder also empty then it will delete that too. -- 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. To unsubscribe, e-mail: dev-unsubscr...@carbondata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org