This is an automated email from the ASF dual-hosted git repository.

yao pushed a commit to branch branch-3.4
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.4 by this push:
     new c158a7a0b9fd Revert "[SPARK-46417][SQL] Do not fail when calling 
hive.getTable and throwException is false"
c158a7a0b9fd is described below

commit c158a7a0b9fd9ac9af6f467040c56d8a7ce258cd
Author: Kent Yao <y...@apache.org>
AuthorDate: Tue Jan 23 17:37:57 2024 +0800

    Revert "[SPARK-46417][SQL] Do not fail when calling hive.getTable and 
throwException is false"
    
    This reverts commit 114754382b19eded5488d63101fa4c520e8551ca.
---
 .../main/scala/org/apache/spark/sql/hive/client/HiveShim.scala    | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

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 c5b0ca2241cd..558af75ca8f5 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
@@ -620,13 +620,7 @@ private[client] class Shim_v0_12 extends Shim with Logging 
{
       tableName: String,
       throwException: Boolean): Table = {
     recordHiveCall()
-    val table = try {
-      hive.getTable(dbName, tableName, throwException)
-    } catch {
-      // Hive may have bugs and still throw an exception even if 
`throwException` is false.
-      case e: HiveException if !throwException =>
-        null
-    }
+    val table = hive.getTable(dbName, tableName, throwException)
     if (table != null) {
       table.getTTable.setTableName(tableName)
       table.getTTable.setDbName(dbName)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to