Repository navigation
[SPARK-52184][SQL] Wrap external engine JDBC syntax errors with a unified exception - #50918
Closed
alekjarmov wants to merge 5 commits into
Closed
alekjarmov wants to merge 5 commits into
alekjarmov wants to merge 5 commits into
Conversation
cloud-fan
reviewed
May 16, 2025
cloud-fan
approved these changes
May 16, 2025
MaxGekk
reviewed
May 16, 2025
Member
|
@alekjarmov Could you fix formatting, please: just re-generate the json file: |
alekjarmov
force-pushed
the
wrap-external-engine-errors
branch
from
May 19, 2025 08:53
6898200 to
8b143e5
Compare
alekjarmov
force-pushed
the
wrap-external-engine-errors
branch
from
May 19, 2025 09:43
8b143e5 to
2aacaf9
Compare
Contributor
Author
|
@cloud-fan Could you merge it please if everything is ok? |
MaxGekk
approved these changes
May 19, 2025
cloud-fan
reviewed
May 19, 2025
| }, | ||
| "JDBC_EXTERNAL_ENGINE_SYNTAX_ERROR" : { | ||
| "message" : [ | ||
| "JDBC external engine syntax error." |
Contributor
There was a problem hiding this comment.
is it possible to always provide the compiled JDBC SQL text?
Contributor
Author
There was a problem hiding this comment.
Yes, I modified the error message to include the query.
cloud-fan
approved these changes
May 20, 2025
cloud-fan
reviewed
May 20, 2025
Contributor
|
The last commit just modified the version number in |
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?
This PR introduces a unified mechanism for handling SQL syntax errors thrown by external JDBC engines. It does so by:
JDBC_EXTERNAL_ENGINE_SYNTAX_ERROR.isSyntaxErrorBestEffort.Why are the changes needed?
Current behavior rethrows the error if it's a syntax error on the external engine. Having it wrapped in a Spark exception enables for easier data scince.
Does this PR introduce any user-facing change?
The users would get a better error message.
How was this patch tested?
Adding new integration tests.
Was this patch authored or co-authored using generative AI tooling?
Coauthored with GitHub Copilot.