GitHub user cloud-fan opened a pull request:
https://github.com/apache/spark/pull/15812
[SPARK-18360][SQL] warehouse path config should work for data source tables
## What changes were proposed in this pull request?
The current semantic of the warehouse config:
1. it's a session-scoped runtime config, which means you can create
database with warehouse path A, then we can change warehouse path to B, and
create another database with path B.
2. Once a database is created, its location won't change even the warehouse
path config is changed.
3. default database is a special case, although its location is fixed, but
the locations of tables created in it are not. If a Spark app starts with
warehouse path B(while the location of default database is A), then users
create a table `tbl` in default database, its location will be `B/tbl` instead
of `A/tbl`. If uses change the warehouse path config to C, and create another
table `tbl2`, its location will still be `B/tbl2` instead of `C/tbl2`.
This PR fixes rule 3 for data source tables.
## How was this patch tested?
HiveSparkSubmitSuite
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloud-fan/spark default-db
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/15812.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 #15812
----
commit fa61496cd570f980514b9dac8d262a29258590ba
Author: Wenchen Fan <[email protected]>
Date: 2016-11-08T17:48:40Z
warehouse path config should work for data source tables
----
---
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]