Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-45389][SQL][3.3] Correct MetaException matching rule on getting partition metadata #43282

Closed
wants to merge 1 commit into from

Commits on Oct 8, 2023

  1. [SPARK-45389][SQL][3.4] Correct MetaException matching rule on gettin…

    …g partition metadata
    
    This is the backport of apache#43191 for `branch-3.3`
    
    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] =>
      ...
    }
    ```
    
    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.
    
    Yes, it should be a bug fix.
    
    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)
    
    No.
    
    Closes apache#43260 from pan3793/SPARK-45389-3.5.
    
    Authored-by: Cheng Pan <chengpan@apache.org>
    Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
    pan3793 committed Oct 8, 2023
    Configuration menu
    Copy the full SHA
    fb28419 View commit details
    Browse the repository at this point in the history