Skip to content

Commit

Permalink
Thu Dec 1 19:35:53 PST 2016
Browse files Browse the repository at this point in the history
  • Loading branch information
ericl committed Dec 2, 2016
1 parent 2940d55 commit b405635
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -59,7 +59,7 @@ case class CreateDataSourceTableCommand(table: CatalogTable, ignoreIfExists: Boo
// and infer the table schema and partition if users didn't specify schema in CREATE TABLE.
val pathOption = table.storage.locationUri.map("path" -> _)
// Fill in some default table options from the session conf
val uncreatedTable = table.copy(
val tableWithDefaultOptions = table.copy(
identifier = table.identifier.copy(
database = Some(
table.identifier.database.getOrElse(sessionState.catalog.getCurrentDatabase))),
Expand All @@ -72,7 +72,7 @@ case class CreateDataSourceTableCommand(table: CatalogTable, ignoreIfExists: Boo
className = table.provider.get,
bucketSpec = table.bucketSpec,
options = table.storage.properties ++ pathOption,
catalogTable = Some(uncreatedTable)).resolveRelation()
catalogTable = Some(tableWithDefaultOptions)).resolveRelation()

dataSource match {
case fs: HadoopFsRelation =>
Expand Down

0 comments on commit b405635

Please sign in to comment.