cloud-fan commented on code in PR #44364:
URL: https://github.com/apache/spark/pull/44364#discussion_r1462773777
##########
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 =>
Review Comment:
another idea: shall we check `tableExists` and only throw exception if table
does exist?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]