GitHub user windpiger opened a pull request:
https://github.com/apache/spark/pull/17341
[SPARK-20013][SQL]add a newTablePath parameter for renameTable in
ExternalCatalog
## What changes were proposed in this pull request?
Currently when we create / rename a managed table, we should get the
defaultTablePath for them in ExternalCatalog, then we have two defaultTablePath
logic in its two subclass HiveExternalCatalog and InMemoryCatalog, additionally
there is also a defaultTablePath in SessionCatalog, so till now we have three
defaultTablePath in three classes.
we'd better to unify them up to SessionCatalog
To unify them, we should move some logic from ExternalCatalog to
SessionCatalog, renameTable is one of this.
while limit to the simple parameters in renameTable
```
def renameTable(db: String, oldName: String, newName: String): Unit
```
even if we move the defaultTablePath logic to SessionCatalog, we can not
pass it to renameTable.
So we can add a newTablePath parameter for renameTable in ExternalCatalog
## How was this patch tested?
delete some tests in ExternalCatalogSuite which already existed in
SessionCatalogSuite,
and move some other tests in ExternalCatalogSuite which does not exist in
SessionCatalogSuite
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/windpiger/spark modifyRenameTable
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/17341.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 #17341
----
commit 80110e5783ab38d18e40ced06c3d926e6017b03f
Author: windpiger <[email protected]>
Date: 2017-03-18T14:33:49Z
[SPARK-20013][SQL]add a newTablePath parameter for renameTable in
ExternalCatalog
----
---
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]