mirror of
https://github.com/apache/impala.git
synced 2026-01-06 15:01:43 -05:00
This commit adds PURGE option to DROP TABLE/ALTER TABLE DROP PARTITION statements. Following is the usage: 1. DROP TABLE <tablename> takes an optional argument PURGE. Adding purge purges the table data by skipping trash, if configured. DROP TABLE [<database>.]<tablename> [IF EXISTS] [PURGE] 2. PURGE is also supported with alter table drop partition query with the following syntax. If specified, impala purges the partition data by skipping trash. ALTER TABLE [<database>.]<tablename> DROP PARTITION [IF EXISTS] [PURGE] This patch also helps the use case where Trash and the data directories are in different encryption zones, in which case we cannot move the data during ALTER/DROP. Then purge option can be used to skip the trash and make sure data is actually deleted. Change-Id: I64bf71d660b719896c32e0f3a7ab768f30ec7b3b (cherry picked from commit 585d4f8d9e809f3bf194018dd161a22d3f144270) Reviewed-on: http://gerrit.cloudera.org:8080/1244 Reviewed-by: Juan Yu <jyu@cloudera.com> Tested-by: Internal Jenkins