pan3793 opened a new pull request, #43282:
URL: https://github.com/apache/spark/pull/43282

   This is the backport of https://github.com/apache/spark/pull/43191 for 
`branch-3.3`
   
   ### What changes were proposed in this pull request?
   
   This PR aims to fix the HMS call fallback logic introduced in SPARK-35437.
   
   ```patch
   try {
     ...
     hive.getPartitionNames
     ...
     hive.getPartitionsByNames
   } catch {
   - case ex: InvocationTargetException if 
ex.getCause.isInstanceOf[MetaException] =>
   + case ex: HiveException if ex.getCause.isInstanceOf[MetaException] =>
     ...
   }
   ```
   
   ### Why are the changes needed?
   
   Directly method call won't throw `InvocationTargetException`, and check the 
code of `hive.getPartitionNames` and `hive.getPartitionsByNames`, both of them 
will wrap a `HiveException` if `MetaException` throws.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, it should be a bug fix.
   
   ### How was this patch tested?
   
   Pass GA and code review. (I'm not sure how to construct/simulate a 
MetaException during the HMS thrift call with the current HMS testing 
infrastructure)
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.
   
   
   


-- 
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]

Reply via email to