diff options
author | wangxiaojing <u9jing@gmail.com> | 2014-10-27 22:00:36 -0700 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-10-27 22:02:52 -0700 |
commit | 0c34fa5b4b3c1c20d7a2d7df3a8ae757b532dd32 (patch) | |
tree | 379fd3cfabb6d3a4d7bf0bf6021072e2dd69a217 /sql/hive/compatibility/src/test/scala | |
parent | 27470d3406bc0adde3da79ca34ebf9bc512514b6 (diff) | |
download | spark-0c34fa5b4b3c1c20d7a2d7df3a8ae757b532dd32.tar.gz spark-0c34fa5b4b3c1c20d7a2d7df3a8ae757b532dd32.tar.bz2 spark-0c34fa5b4b3c1c20d7a2d7df3a8ae757b532dd32.zip |
[SPARK-3907][SQL] Add truncate table support
JIRA issue: [SPARK-3907]https://issues.apache.org/jira/browse/SPARK-3907
Add turncate table support
TRUNCATE TABLE table_name [PARTITION partition_spec];
partition_spec:
: (partition_col = partition_col_value, partition_col = partiton_col_value, ...)
Removes all rows from a table or partition(s). Currently target table should be native/managed table or exception will be thrown. User can specify partial partition_spec for truncating multiple partitions at once and omitting partition_spec will truncate all partitions in the table.
Author: wangxiaojing <u9jing@gmail.com>
Closes #2770 from wangxiaojing/spark-3907 and squashes the following commits:
63dbd81 [wangxiaojing] change hive scalastyle
7a03707 [wangxiaojing] add comment
f6e710e [wangxiaojing] change truncate table
a1f692c [wangxiaojing] Correct spelling mistakes
3b20007 [wangxiaojing] add truncate can not support column err message
e483547 [wangxiaojing] add golden file
77b1f20 [wangxiaojing] add truncate table support
Diffstat (limited to 'sql/hive/compatibility/src/test/scala')
-rw-r--r-- | sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala b/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala index 15cd62d3bf..4fc26d6f55 100644 --- a/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala +++ b/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala @@ -767,6 +767,7 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter { "touch", "transform_ppr1", "transform_ppr2", + "truncate_table", "type_cast_1", "type_widening", "udaf_collect_set", |