[ https://issues.apache.org/jira/browse/HIVE-19387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16539306#comment-16539306 ]
Eugene Koifman commented on HIVE-19387: --------------------------------------- truncate table/partition is handled by {{HiveMetaStore.truncate_table(String,String,List)}} It works by deleting all files under an X lock. Since it's not writing anything it doesn't create a writeId and so RS Cache invalidation doesn't know about this since it relies on ValidWriteIdList. I suspect Incremental MV maintenance would have the same issue. > Truncate table for Acid tables conflicts with ResultSet cache > ------------------------------------------------------------- > > Key: HIVE-19387 > URL: https://issues.apache.org/jira/browse/HIVE-19387 > Project: Hive > Issue Type: New Feature > Components: Transactions > Reporter: Eugene Koifman > Assignee: Eugene Koifman > Priority: Major > > How should this work? Should it work like Insert Overwrite T select * from T > where 1=2? > This should create a new empty base_x/ and thus operate w/o violating > Snapshot Isolation semantics. > This makes sense for specific partition or unpartitioned table. What about > "Truncate T" where T is partitioned? Is the expectation to wipe out all > partition info or to make each partition empty? -- This message was sent by Atlassian JIRA (v7.6.3#76005)