GitHub user baishuo opened a pull request:
https://github.com/apache/spark/pull/6695
[SPARK-8516][SQL]create table to specific database by 'use dbname'
when i test the following code:
hiveContext.sql("""use testdb""")
val df = (1 to 3).map(i => (i, s"val_$i", i * 2)).toDF("a", "b", "c")
df.write
.format("parquet")
.mode(SaveMode.Overwrite)
.saveAsTable("ttt3")
hiveContext.sql("show TABLES in default")
found that the table ttt3 will be created under the database "default"
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/baishuo/spark SPARK-8516-use-database
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/6695.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 #6695
----
commit 3d19ad9ad5885fa5cf7da0c733dca9152fb15655
Author: baishuo <[email protected]>
Date: 2015-06-08T05:19:38Z
create table to specific database
----
---
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]