diff options
author | sureshthalamati <suresh.thalamati@gmail.com> | 2016-04-01 18:33:31 +0200 |
---|---|---|
committer | Herman van Hovell <hvanhovell@questtec.nl> | 2016-04-01 18:33:31 +0200 |
commit | a471c7f9eaa59d55dfff5b9d1a858f304a6b3a84 (patch) | |
tree | ae5cd5a91bd2faf0324c04329a1e06c411abe541 /sql/hive/compatibility | |
parent | 0b04f8fdf1614308cb3e7e0c7282f7365cc3d1bb (diff) | |
download | spark-a471c7f9eaa59d55dfff5b9d1a858f304a6b3a84.tar.gz spark-a471c7f9eaa59d55dfff5b9d1a858f304a6b3a84.tar.bz2 spark-a471c7f9eaa59d55dfff5b9d1a858f304a6b3a84.zip |
[SPARK-14133][SQL] Throws exception for unsupported create/drop/alter index , and lock/unlock operations.
## What changes were proposed in this pull request?
This PR throws Unsupported Operation exception for create index, drop index, alter index , lock table , lock database, unlock table, and unlock database operations that are not supported in Spark SQL. Currently these operations are executed executed by Hive.
Error:
spark-sql> drop index my_index on my_table;
Error in query:
Unsupported operation: drop index(line 1, pos 0)
## How was this patch tested?
Added test cases to HiveQuerySuite
yhuai hvanhovell andrewor14
Author: sureshthalamati <suresh.thalamati@gmail.com>
Closes #12069 from sureshthalamati/unsupported_ddl_spark-14133.
Diffstat (limited to 'sql/hive/compatibility')
-rw-r--r-- | sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala | 10 |
1 files changed, 6 insertions, 4 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 bedbf9ae17..695b5ef733 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 @@ -352,7 +352,12 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter { "show_create_table_index", "show_create_table_partitioned", "show_create_table_serde", - "show_create_table_view" + "show_create_table_view", + + // Index commands are not supported + "drop_index", + "drop_index_removes_partition_dirs", + "alter_index" ) /** @@ -369,7 +374,6 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter { "alter3", "alter4", "alter5", - "alter_index", "alter_merge_2", "alter_partition_format_loc", "alter_partition_with_whitelist", @@ -496,8 +500,6 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter { "distinct_stats", "drop_database_removes_partition_dirs", "drop_function", - "drop_index", - "drop_index_removes_partition_dirs", "drop_multi_partitions", "drop_partitions_filter", "drop_partitions_filter2", |