[SPARK-14251][SQL] Add SQL command for printing out generated code for debugging#12099
[SPARK-14251][SQL] Add SQL command for printing out generated code for debugging#12099dongjoon-hyun wants to merge 6 commits intoapache:masterfrom dongjoon-hyun:SPARK-14251
Conversation
There was a problem hiding this comment.
CODEGEN is not a keyword. Please add to the nonReserved rule.
There was a problem hiding this comment.
@hvanhovell does this fix the problem already? i wasn't sure what was before your comment vs after.
There was a problem hiding this comment.
Yeah it is fixed. He added it to the nonReserved rule (see below).
|
@dongjoon-hyun I left a few small comments. Looks pretty solid overall. |
|
Thank you, @hvanhovell . |
|
Hi, @hvanhovell . |
|
Test build #54669 has finished for PR 12099 at commit
|
|
Test build #54673 has finished for PR 12099 at commit
|
|
Hi, @rxin . |
There was a problem hiding this comment.
do we still need this function?
There was a problem hiding this comment.
It is still used in DebuggingSuite since I didn't change that testcase.
val res = sqlContext.range(10).groupBy("id").count().debugCodegenString()
There was a problem hiding this comment.
Sure! No problem at all :)
|
Hi, @rxin . |
|
Now, |
|
One minor thing, why @DeepSparkBot does not visit this PR? |
|
Test build #54713 has finished for PR 12099 at commit
|
|
You need to say: deep-review this please |
There was a problem hiding this comment.
Detected unnecessary var.
Suggested improvement:
val outputString =
if (codegen) {
codegenString(queryExecution.executedPlan)
} else if (extended) {
queryExecution.toString
} else {
queryExecution.simpleString
}
|
@andrewor14 Review complete. No major issues found. |
|
Oh, I see. Thank you, @andrewor14 ! |
|
Test build #54717 has finished for PR 12099 at commit
|
|
I updated the code according to @DeepSparkBot 's comments, and also rebased to the master since master branch is now Scala 2.11.8. |
|
Test build #54736 has finished for PR 12099 at commit
|
|
Test build #2728 has finished for PR 12099 at commit
|
|
Thanks - going to merge this in master. |
|
Thank you, @rxin , @hvanhovell , @andrewor14 , and @DeepSparkBot . :) |
|
Test build #54759 has finished for PR 12099 at commit
|
What changes were proposed in this pull request?
This PR implements
EXPLAIN CODEGENSQL command which returns generated codes likedebugCodegen. Inspark-shell, we don't need toimport debugmodule. Inspark-sql, we can use this SQL command now.Before
After
How was this patch tested?
Pass the Jenkins tests (including new testcases)