diff options
author | Wenchen Fan <wenchen@databricks.com> | 2016-08-31 17:08:08 +0800 |
---|---|---|
committer | Wenchen Fan <wenchen@databricks.com> | 2016-08-31 17:08:08 +0800 |
commit | 12fd0cd615683cd4c3e9094ce71a1e6fc33b8d6a (patch) | |
tree | f94ec14cb9c9b9c483de9e4b60c72e6e3920e7ba /conf | |
parent | fa6347938fc1c72ddc03a5f3cd2e929b5694f0a6 (diff) | |
download | spark-12fd0cd615683cd4c3e9094ce71a1e6fc33b8d6a.tar.gz spark-12fd0cd615683cd4c3e9094ce71a1e6fc33b8d6a.tar.bz2 spark-12fd0cd615683cd4c3e9094ce71a1e6fc33b8d6a.zip |
[SPARK-17180][SPARK-17309][SPARK-17323][SQL] create AlterViewAsCommand to handle ALTER VIEW AS
## What changes were proposed in this pull request?
Currently we use `CreateViewCommand` to implement ALTER VIEW AS, which has 3 bugs:
1. SPARK-17180: ALTER VIEW AS should alter temp view if view name has no database part and temp view exists
2. SPARK-17309: ALTER VIEW AS should issue exception if view does not exist.
3. SPARK-17323: ALTER VIEW AS should keep the previous table properties, comment, create_time, etc.
The root cause is, ALTER VIEW AS is quite different from CREATE VIEW, we need different code path to handle them. However, in `CreateViewCommand`, there is no way to distinguish ALTER VIEW AS and CREATE VIEW, we have to introduce extra flag. But instead of doing this, I think a more natural way is to separate the ALTER VIEW AS logic into a new command.
## How was this patch tested?
new tests in SQLViewSuite
Author: Wenchen Fan <wenchen@databricks.com>
Closes #14874 from cloud-fan/minor4.
Diffstat (limited to 'conf')
0 files changed, 0 insertions, 0 deletions