-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-40324][SQL][FOLLOWUP] Fix a bug in setting query context in Analyzer #37861
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
Conversation
|
For throwing AnalysisException, we should use the method or similar approaches. |
| }, | ||
| "queryContext" : [ { | ||
| "objectType" : "", | ||
| "objectName" : "", | ||
| "startIndex" : 56, | ||
| "stopIndex" : 65, | ||
| "fragment" : "GROUP BY b" | ||
| } ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the context disappear completely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously it is set as analyzed.origin which is wrong. It should point to a instead of GROUP BY b anyway.
|
@cloud-fan @MaxGekk Thanks for the review. Merging this one to master. |
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.originis not accurate at all. Thus this PR is to revert itWhy 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