-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29172][SQL] Fix some exception issue of explain commands #25848
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
| if (codegen) { | ||
| try { | ||
| codegenString(queryExecution.executedPlan) | ||
| } catch { |
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.
Indentation should be fixed
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.
Thank you for the review.
I've done.
srowen
left a comment
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.
I'm not sure we want to let the explain plan proceed here? it has failed already, and I'm not sure about just appending it to the output as if successful.
|
@srowen , because of the try exception in Other options such as cost, formated and codegen don't behave like this, so it needs something change to be consistent. |
|
OK, that's a good argument from consistency. @kiszk do you agree? |
|
I agree to make their behaviors in |
|
Test build #4885 has finished for PR 25848 at commit
|
|
Merged to master |
What changes were proposed in this pull request?
Added try exceptionWhy are the changes needed?
The behaviors of run commands during exception handling are different depends on explain command. I think it should be unified.[ >spark.sql("explain cost select * from hoge").show(false) ]

[ >spark.sql("explain extended select * from hoge").show(false) ]

Does this PR introduce any user-facing change?
NoHow was this patch tested?
tested manually