diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala index 8ff7a1abd2d6b..99c9199e466f9 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala @@ -1329,8 +1329,7 @@ private[client] class Shim_v3_0 extends Shim_v2_3 { isSrcLocal: Boolean): Unit = { val session = SparkSession.getActiveSession assert(session.nonEmpty) - val database = session.get.sessionState.catalog.getCurrentDatabase - val table = hive.getTable(database, tableName) + val table = hive.getTable(tableName) val loadFileType = if (replace) { clazzLoadFileType.getEnumConstants.find(_.toString.equalsIgnoreCase("REPLACE_ALL")) } else {