[SPARK-59632][SQL] Unwrap reflected SQL Server parser exceptions - #58898
Open
alekjarmov wants to merge 1 commit into
Open
alekjarmov wants to merge 1 commit into
alekjarmov wants to merge 1 commit into
Conversation
alekjarmov
marked this pull request as ready for review
September 18, 2026 10:31
cloud-fan
approved these changes
Sep 18, 2026
cloud-fan
left a comment
Contributor
There was a problem hiding this comment.
Review summary
I found no code-review issues in the pinned change. The exception translation is confined to the existing reflected parser invocation and preserves successful parsing, missing-method fallback behavior, and unrelated reflection failures. The focused regression test rejects the previous InvocationTargetException behavior and verifies reference identity with the original SQLException.
Findings
0 total: 0 P0, 0 P1, 0 P2, 0 P3.
No findings.
Contributor
|
let's make the CI green |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
The SQL Server connection provider invokes the JDBC driver's URL parser through reflection. This change unwraps
InvocationTargetExceptionwhen the reflected parser throws and propagates the original exception.Why are the changes needed?
Reflection wraps parser failures in
InvocationTargetException, hiding the original structured JDBC exception details from callers. Propagating the cause preserves those details.Does this PR introduce any user-facing change?
Yes. Failures from the SQL Server JDBC driver's reflected URL parser now surface as their original exceptions instead of
InvocationTargetExceptionwrappers.How was this patch tested?
Added a test to
MSSQLConnectionProviderSuitethat verifies the exact originalSQLExceptionis propagated.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Cursor GPT-5.6 Sol