sandeep-katta commented on a change in pull request #29649:
URL: https://github.com/apache/spark/pull/29649#discussion_r484188369



##########
File path: 
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)

Review comment:
       `Hive.loadPartition` for Hive-3.1.x it takes `Table`, but other Hive 
version such as 2.1.x takes `tablename` as `string`
   
   Hive-3.1.0
   ```
     public Partition loadPartition(Path loadPath, Table tbl, Map<String, 
String> partSpec,
         LoadFileType loadFileType, boolean inheritTableSpecs, boolean 
isSkewedStoreAsSubdir,
         boolean isSrcLocal, boolean isAcidIUDoperation, boolean 
hasFollowingStatsTask, Long writeId,
         int stmtId, boolean isInsertOverwrite)
   ```
   
   Hive-2.1.0
   
   ```
     public void loadPartition(Path loadPath, String tableName,
         Map<String, String> partSpec, boolean replace,
         boolean inheritTableSpecs, boolean isSkewedStoreAsSubdir,
         boolean isSrcLocal, boolean isAcid, boolean hasFollowingStatsTask)
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to