Zoltan Borok-Nagy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/14071
Change subject: IMPALA-8793: Implement TRUNCATE for insert-only ACID tables ...................................................................... IMPALA-8793: Implement TRUNCATE for insert-only ACID tables This commit adds support for the TRUNCATE statement for transactional tables. TRUNCATE on transactional tables doesn't remove the files, it just creates new empty ACID base directories. All the functionality is implemented in the catalog, therefore transaction handling, table locking, heartbeating also happens there. Added the new Transaction class that should prevent leakage of transactions, it should be used in try-with-resources statements. Testing: Added backend tests that truncate non-partitioned and partitioned tables as well. The tests check whether the statistics were removed. The tests also check if Hive sees the effect of truncation. Change-Id: Ic749b7f27da157e1c0ebf9b7e9b6ee09afad122a --- M fe/src/main/java/org/apache/impala/analysis/TruncateStmt.java M fe/src/main/java/org/apache/impala/catalog/Catalog.java M fe/src/main/java/org/apache/impala/catalog/FileMetadataLoader.java A fe/src/main/java/org/apache/impala/catalog/Transaction.java M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java M fe/src/test/java/org/apache/impala/analysis/AnalyzerTest.java A testdata/workloads/functional-query/queries/QueryTest/acid-truncate.test M tests/metadata/test_hms_integration.py M tests/query_test/test_acid.py 9 files changed, 294 insertions(+), 23 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/71/14071/1 -- To view, visit http://gerrit.cloudera.org:8080/14071 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic749b7f27da157e1c0ebf9b7e9b6ee09afad122a Gerrit-Change-Number: 14071 Gerrit-PatchSet: 1 Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
