Commit 4e2b315
[SPARK-54501][SQL] Improve error handling for Hive metastore partition filter failures
### What changes were proposed in this pull request?
This PR refactors the error handling for Hive metastore partition filter failures by migrating from the legacy error code _LEGACY_ERROR_TEMP_2193 to a properly defined error condition INTERNAL_ERROR_HIVE_METASTORE_PARTITION_FILTER with SQL state 58030. The error message is restructured to include the underlying exception details.
### Why are the changes needed?
The previous error message was verbose and lacked important diagnostic information. The legacy error code needed to be migrated to a proper error condition with an appropriate SQL state for better error categorization.
### Does this PR introduce _any_ user-facing change?
Yes. Users will see an improved error message that includes the actual exception details and clearer guidance.
### How was this patch tested?
Updated existing unit tests in HivePartitionFilteringSuite and ExternalCatalogSuite to verify the new error condition.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Sonnet 4.5
Closes #53212 from ganeshashree/SPARK-54501.
Authored-by: Ganesha S <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>1 parent 54cde81 commit 4e2b315
File tree
4 files changed
+19
-12
lines changed- common/utils/src/main/resources/error
- sql
- catalyst/src
- main/scala/org/apache/spark/sql/errors
- test/scala/org/apache/spark/sql/catalyst/catalog
- hive/src/test/scala/org/apache/spark/sql/hive/client
4 files changed
+19
-12
lines changedLines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2436 | 2436 | | |
2437 | 2437 | | |
2438 | 2438 | | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
2439 | 2447 | | |
2440 | 2448 | | |
2441 | 2449 | | |
| |||
9028 | 9036 | | |
9029 | 9037 | | |
9030 | 9038 | | |
9031 | | - | |
9032 | | - | |
9033 | | - | |
9034 | | - | |
9035 | | - | |
9036 | 9039 | | |
9037 | 9040 | | |
9038 | 9041 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1667 | 1667 | | |
1668 | 1668 | | |
1669 | 1669 | | |
1670 | | - | |
| 1670 | + | |
1671 | 1671 | | |
1672 | 1672 | | |
1673 | 1673 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
576 | | - | |
| 576 | + | |
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
| |||
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
150 | 154 | | |
151 | 155 | | |
152 | 156 | | |
| |||
0 commit comments