-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-19667][SQL]create table with hiveenabled in default database use warehouse path instead of the location of default database #17001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
aebdfc6
825c0ad
a2c9168
bacd528
3f6e061
96dcc7d
f329387
83dba73
58a0020
1dce2d7
12f81d3
56e83d5
901bb1c
99d9746
db555e3
d327994
73c8802
747b31a
8f8063f
4dc11c1
9c0773b
80b8133
41ea115
13245e4
096ae63
badd61b
35d2b59
e3a467e
ae9938a
7739ccd
f93f5d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -341,8 +341,10 @@ private[hive] class HiveClientImpl( | |
| override def getDatabase(dbName: String): CatalogDatabase = withHiveState { | ||
| Option(client.getDatabase(dbName)).map { d => | ||
| // default database's location always use the warehouse path | ||
| // since the location of database stored in metastore is qualified, | ||
| // here we also make qualify for warehouse location | ||
| val dbLocation = if (dbName == SessionCatalog.DEFAULT_DATABASE) { | ||
| sparkConf.get(WAREHOUSE_PATH) | ||
| SessionCatalog.makeQualifiedPath(sparkConf.get(WAREHOUSE_PATH), hadoopConf).toString | ||
|
||
| } else d.getLocationUri | ||
|
|
||
| CatalogDatabase( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it more logical to put this logic in
SessionCatalog?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I don't get the point, if this logic is exactly what we expected, we'd better to replace it at the beginning?