Skip to content

Commit

Permalink
Use HiveContext's sessionState instead of using SessionState's thread…
Browse files Browse the repository at this point in the history
… local variable.
  • Loading branch information
yhuai committed Feb 4, 2015
1 parent e380d2d commit 84a29e5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ private[hive] class HiveMetastoreCatalog(hive: HiveContext) extends Catalog with
}

def hiveDefaultTableFilePath(tableName: String): String = {
hiveWarehouse.getTablePath(client.getDatabaseCurrent, tableName).toString
val currentDatabase = client.getDatabase(hive.sessionState.getCurrentDatabase())
hiveWarehouse.getTablePath(currentDatabase, tableName).toString
}

def tableExists(tableIdentifier: Seq[String]): Boolean = {
Expand Down

0 comments on commit 84a29e5

Please sign in to comment.