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-40324][SQL] Provide query context in AnalysisException #37841

Closed
wants to merge 6 commits into from

Conversation

gengliangwang
Copy link
Member

What changes were proposed in this pull request?

This is a major PR for extending AnalysisException with query context. After changes, we can:

  • migrate analysis errors to error classes
  • change the actual error messages of AnalysisException, showing the query context from original query instead of an unresolved logical plan.

Why are the changes needed?

Make it possible for better error messages in analysis exceptions.

Does this PR introduce any user-facing change?

No. This is an extension of the framework. We will have more improvements based on this one.

How was this patch tested?

Existing UT

@gengliangwang
Copy link
Member Author

cc @srielau @anchovYu as well

@github-actions github-actions bot added the BUILD label Sep 9, 2022
@dtenedor
Copy link
Contributor

dtenedor commented Sep 9, 2022

cc @dtenedor myself for context

@github-actions github-actions bot added the CORE label Sep 10, 2022
@MaxGekk
Copy link
Member

MaxGekk commented Sep 10, 2022

+1, LGTM. Merging to master.
Thank you, @gengliangwang and @cloud-fan for review.

@MaxGekk MaxGekk closed this in bf5103a Sep 10, 2022
gengliangwang added a commit that referenced this pull request Sep 14, 2022
…alyzer

### What changes were proposed in this pull request?

This is a followup of #37841. The code change in https://github.com/apache/spark/pull/37841/files#diff-ed19f376a63eba52eea59ca71f3355d4495fad4fad4db9a3324aade0d4986a47R212 is wrong. The context of`analyzed.origin` is not accurate at all. Thus this PR is to revert it
### Why are the changes needed?

Fix a wrong query context in previous PR #37841
### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

GA tests

Closes #37861 from gengliangwang/fxiReg.

Authored-by: Gengliang Wang <gengliang@apache.org>
Signed-off-by: Gengliang Wang <gengliang@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants