yaooqinn commented on code in PR #44364: URL: https://github.com/apache/spark/pull/44364#discussion_r1427622193
########## sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala: ########## @@ -923,7 +923,13 @@ private[client] class Shim_v2_0 extends Shim with Logging { tableName: String, throwException: Boolean): Table = { recordHiveCall() - val table = hive.getTable(dbName, tableName, throwException) + 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 && e.getMessage.contains("Unable to fetch table") => Review Comment: Is it ok to skip 2nd condition as throwException=false means the caller side requires suppressing expressions? -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org