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-40416][SQL] Move subquery expression CheckAnalysis error messages to use the new error framework #37840

Closed
wants to merge 23 commits into from
Closed

Conversation

dtenedor
Copy link
Contributor

@dtenedor dtenedor commented Sep 8, 2022

What changes were proposed in this pull request?

Move subquery expression CheckAnalysis error messages to use the new error framework.

This will help improve the usability of Apache Spark as a product, and link against documentation.

Why are the changes needed?

Error messages related to SQL query analysis in Apache Spark need some work to make them more descriptive and actionable.

Does this PR introduce any user-facing change?

Yes, error messages change.

How was this patch tested?

Unit test and query test coverage shows the updates in error messages received.

@dtenedor
Copy link
Contributor Author

dtenedor commented Sep 8, 2022

Hi @MaxGekk @srielau can you please help review this? 🙏 it helps make error messages better with respect to subquery expression analysis. @allisonwang-db FYI

Copy link
Contributor

@allisonwang-db allisonwang-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! Thanks @dtenedor.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

stash

respond to code review comments

stash

respond to code review comments

update tests
Copy link
Contributor Author

@dtenedor dtenedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you all @allisonwang-db @srielau @MaxGekk @gengliangwang for your helpful review. I responded to all comments, please take another look. Hat-tip to Gengliang with a helpful suggestion to add an overload expression.failAnalysis to propagate query contexts while adding the new error classes and minimizing diffs in CheckAnalysis.

@dtenedor dtenedor requested review from gengliangwang and srielau and removed request for gengliangwang September 12, 2022 20:04
@dtenedor dtenedor changed the title [SPARK-40394][SQL] Move subquery expression CheckAnalysis error messages to use the new error framework [SPARK-40416][SQL] Move subquery expression CheckAnalysis error messages to use the new error framework Sep 13, 2022
respond to code review comments

respond to code review comments

update

update

update

update
@gengliangwang
Copy link
Member

Hi @dtenedor, I have just merged the bug fix #37861. The query context should be set correctly in the AnlysisException. I believe the test cases in this PR need to be updated so please try updating the code base to the latest master.

fetch latest changes from master
@dtenedor
Copy link
Contributor Author

Hi @dtenedor, I have just merged the bug fix #37861. The query context should be set correctly in the AnlysisException. I believe the test cases in this PR need to be updated so please try updating the code base to the latest master.

@gengliangwang thanks, this is done. We can see the new query contexts in this PR at the latest commit, they appear more accurate now.

@dtenedor
Copy link
Contributor Author

Hi @MaxGekk I responded to your comments, please take another look at this when you have time. 🙏 @gengliangwang @allisonwang-db @srielau FYI

@dtenedor
Copy link
Contributor Author

Friendly ping @MaxGekk @allisonwang-db @gengliangwang can we please review this again?

@gengliangwang
Copy link
Member

LGTM except one comment

respond to code review comments

update

update

update

simplify

reuse existing plan canonicalize method

respond to code review comments
@gengliangwang
Copy link
Member

Thanks, merging to master

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.

6 participants