[ https://issues.apache.org/jira/browse/HIVE-26414?focusedWorklogId=794193&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-794193 ]
ASF GitHub Bot logged work on HIVE-26414: ----------------------------------------- Author: ASF GitHub Bot Created on: 22/Jul/22 12:15 Start Date: 22/Jul/22 12:15 Worklog Time Spent: 10m Work Description: SourabhBadhya commented on code in PR #3457: URL: https://github.com/apache/hive/pull/3457#discussion_r927592887 ########## ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java: ########## @@ -7852,6 +7852,10 @@ protected Operator genFileSinkPlan(String dest, QB qb, Operator input) throw new SemanticException("Error while getting the full qualified path for the given directory: " + ex.getMessage()); } } + + if (!isNonNativeTable && AcidUtils.isTransactionalTable(destinationTable) && qb.isCTAS()) { Review Comment: I enquired with @lcspinter offline, Iceberg tables are treated as external tables and specifically for Iceberg tables, there is a implementation of cleanup here - https://github.com/apache/hive/blob/master/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergQueryLifeTimeHook.java Issue Time Tracking ------------------- Worklog Id: (was: 794193) Time Spent: 4h 10m (was: 4h) > Aborted/Cancelled CTAS operations must initiate cleanup of uncommitted data > --------------------------------------------------------------------------- > > Key: HIVE-26414 > URL: https://issues.apache.org/jira/browse/HIVE-26414 > Project: Hive > Issue Type: Improvement > Reporter: Sourabh Badhya > Assignee: Sourabh Badhya > Priority: Major > Labels: pull-request-available > Time Spent: 4h 10m > Remaining Estimate: 0h > > When a CTAS query fails before creation of table and after writing the data, > the data is present in the directory and not cleaned up currently by the > cleaner or any other mechanism currently. This is because the cleaner > requires a table corresponding to what its cleaning. In order surpass such a > situation, we can directly pass the relevant information to the cleaner so > that such uncommitted data is deleted. -- This message was sent by Atlassian Jira (v8.20.10#820010)