diff options
author | gatorsmile <gatorsmile@gmail.com> | 2016-09-15 14:43:10 +0800 |
---|---|---|
committer | Wenchen Fan <wenchen@databricks.com> | 2016-09-15 14:43:10 +0800 |
commit | 6a6adb1673775df63a62270879eac70f5f8d7d75 (patch) | |
tree | ef89cd39c929180ca4f899a43037c96d7f85d881 /sql/core/pom.xml | |
parent | bb322943623d14b85283705e74d913e31230387f (diff) | |
download | spark-6a6adb1673775df63a62270879eac70f5f8d7d75.tar.gz spark-6a6adb1673775df63a62270879eac70f5f8d7d75.tar.bz2 spark-6a6adb1673775df63a62270879eac70f5f8d7d75.zip |
[SPARK-17440][SPARK-17441] Fixed Multiple Bugs in ALTER TABLE
### What changes were proposed in this pull request?
For the following `ALTER TABLE` DDL, we should issue an exception when the target table is a `VIEW`:
```SQL
ALTER TABLE viewName SET LOCATION '/path/to/your/lovely/heart'
ALTER TABLE viewName SET SERDE 'whatever'
ALTER TABLE viewName SET SERDEPROPERTIES ('x' = 'y')
ALTER TABLE viewName PARTITION (a=1, b=2) SET SERDEPROPERTIES ('x' = 'y')
ALTER TABLE viewName ADD IF NOT EXISTS PARTITION (a='4', b='8')
ALTER TABLE viewName DROP IF EXISTS PARTITION (a='2')
ALTER TABLE viewName RECOVER PARTITIONS
ALTER TABLE viewName PARTITION (a='1', b='q') RENAME TO PARTITION (a='100', b='p')
```
In addition, `ALTER TABLE RENAME PARTITION` is unable to handle data source tables, just like the other `ALTER PARTITION` commands. We should issue an exception instead.
### How was this patch tested?
Added a few test cases.
Author: gatorsmile <gatorsmile@gmail.com>
Closes #15004 from gatorsmile/altertable.
Diffstat (limited to 'sql/core/pom.xml')
0 files changed, 0 insertions, 0 deletions