GitHub user cloud-fan opened a pull request:
https://github.com/apache/spark/pull/14874
[SPARK-17180][SPARK-17309][SQL] create AlterViewCommand to handle ALTER VIEW
## What changes were proposed in this pull request?
Currently we use `CreateViewCommand` to implement ALTER VIEW, which has 2
bugs:
1. SPARK-17180: ALTER VIEW should alter temp view if view name has no
database part and temp view exists
2. SPARK-17309: ALTER VIEW should issue exception if view does not exist.
The root cause is, ALTER VIEW 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 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 logic into a new command.
## How was this patch tested?
new tests in SQLViewSuite
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloud-fan/spark minor4
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/14874.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 #14874
----
commit 69e6cd4a2a6058dbfe9ac8e1b54c80f09cbb3c4b
Author: Wenchen Fan <[email protected]>
Date: 2016-08-30T09:20:12Z
create AlterViewCommand to handle ALTER VIEW
----
---
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]