You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "pan3793 (via GitHub)" <gi...@apache.org> on 2023/10/08 15:41:15 UTC

[PR] [SPARK-45389][SQL][3.4] Correct MetaException matching rule on getting partition metadata [spark]

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

   This is the backport of https://github.com/apache/spark/pull/43191 for `branch-3.4`
   
   ### 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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-45389][SQL][3.4] Correct MetaException matching rule on getting partition metadata [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #43281:
URL: https://github.com/apache/spark/pull/43281#issuecomment-1754501342

   Merged into branch-3.4, thanks @pan3793 


-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-45389][SQL][3.4] Correct MetaException matching rule on getting partition metadata [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang closed pull request #43281: [SPARK-45389][SQL][3.4] Correct MetaException matching rule on getting partition metadata
URL: https://github.com/apache/spark/pull/43281


-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org