Skip to content

Conversation

@ganeshashree
Copy link

@ganeshashree ganeshashree commented Nov 25, 2025

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

@github-actions github-actions bot added the SQL label Nov 25, 2025
@cloud-fan
Copy link
Contributor

how about other errors thrown by the hive client? Does HiveClientImpl properly re-throw the hive error with clear error condition name?

@ganeshashree
Copy link
Author

ganeshashree commented Nov 26, 2025

how about other errors thrown by the hive client? Does HiveClientImpl properly re-throw the hive error with clear error condition name?

@cloud-fan The following errors thrown by the Hive client still use the LEGACY error code.

_LEGACY_ERROR_TEMP_2186 - Used by serDeInterfaceNotFoundError()
_LEGACY_ERROR_TEMP_2187 - Used by convertHiveTableToCatalogTableError()
_LEGACY_ERROR_TEMP_2192 - Used by invalidPartitionFilterError()

I'm planning to improve the error condition in a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants