diff options
author | Andrew Or <andrew@databricks.com> | 2016-04-05 14:54:07 -0700 |
---|---|---|
committer | Yin Huai <yhuai@databricks.com> | 2016-04-05 14:54:07 -0700 |
commit | 45d8cdee3945bf94d0f1bd93a12e4cb0d416468e (patch) | |
tree | 13e700eeb175a0cbe5419ec62f72a6acfd4c96ea /sql/hive/src | |
parent | c59abad052b7beec4ef550049413e95578e545be (diff) | |
download | spark-45d8cdee3945bf94d0f1bd93a12e4cb0d416468e.tar.gz spark-45d8cdee3945bf94d0f1bd93a12e4cb0d416468e.tar.bz2 spark-45d8cdee3945bf94d0f1bd93a12e4cb0d416468e.zip |
[SPARK-14129][SPARK-14128][SQL] Alter table DDL commands
## What changes were proposed in this pull request?
In Spark 2.0, we want to handle the most common `ALTER TABLE` commands ourselves instead of passing the entire query text to Hive. This is done using the new `SessionCatalog` API introduced recently.
The commands supported in this patch include:
```
ALTER TABLE ... RENAME TO ...
ALTER TABLE ... SET TBLPROPERTIES ...
ALTER TABLE ... UNSET TBLPROPERTIES ...
ALTER TABLE ... SET LOCATION ...
ALTER TABLE ... SET SERDE ...
```
The commands we explicitly do not support are:
```
ALTER TABLE ... CLUSTERED BY ...
ALTER TABLE ... SKEWED BY ...
ALTER TABLE ... NOT CLUSTERED
ALTER TABLE ... NOT SORTED
ALTER TABLE ... NOT SKEWED
ALTER TABLE ... NOT STORED AS DIRECTORIES
```
For these we throw exceptions complaining that they are not supported.
## How was this patch tested?
`DDLSuite`
Author: Andrew Or <andrew@databricks.com>
Closes #12121 from andrewor14/alter-table-ddl.
Diffstat (limited to 'sql/hive/src')
-rw-r--r-- | sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala index d315f39a91..0cccc22e5a 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala @@ -94,7 +94,7 @@ private[sql] class HiveSessionCatalog( metastoreCatalog.refreshTable(name) } - def invalidateTable(name: TableIdentifier): Unit = { + override def invalidateTable(name: TableIdentifier): Unit = { metastoreCatalog.invalidateTable(name) } |