GitHub user andrewor14 opened a pull request:
https://github.com/apache/spark/pull/12121
[SPARK-14129][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
```
## How was this patch tested?
`DDLSuite`
(If this patch involves UI changes, please attach a screenshot; otherwise,
remove this)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/andrewor14/spark alter-table-ddl
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/12121.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #12121
----
commit f5aed602a48d715dd637c593c403e18d87b43d8b
Author: Andrew Or <[email protected]>
Date: 2016-03-31T00:56:17Z
Implement rename table
commit c134da5fe22e6ae8272a334aeecdd19eff19e245
Author: Andrew Or <[email protected]>
Date: 2016-03-31T01:23:17Z
Implement alter table set location
commit a74a4ef73b960dc5cbdb4d0423996a24bb7bc116
Author: Andrew Or <[email protected]>
Date: 2016-03-31T22:07:22Z
Merge branch 'master' of github.com:apache/spark into alter-table-ddl
commit 759fafffefd41b968dc7627fc0eb275a8e96434a
Author: Andrew Or <[email protected]>
Date: 2016-03-31T22:52:41Z
Implement set/unset table properties
commit 5191e9a9f7d1d26ca50e382f118868789d147a7d
Author: Andrew Or <[email protected]>
Date: 2016-03-31T23:22:26Z
Implement set serde name/properties
commit 6402d5a310e70a48aea19a35fa1579fd09969664
Author: Andrew Or <[email protected]>
Date: 2016-04-01T21:53:42Z
Unsupport alter table properties for datasource tables
commit 68951fa604e185be22d7fb22f76f0df3c2433b0b
Author: Andrew Or <[email protected]>
Date: 2016-04-01T23:10:17Z
Throw exception on alter table bucketing/skew
commit 00d2513cc56176a04c714da73ba927ff47e3bf31
Author: Andrew Or <[email protected]>
Date: 2016-04-01T23:13:39Z
Merge branch 'master' of github.com:apache/spark into alter-table-ddl
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]