You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by zsxwing <gi...@git.apache.org> on 2018/08/02 22:24:09 UTC
[GitHub] spark pull request #21222: [SPARK-24161][SS] Enable debug package feature on...
Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/21222#discussion_r206342230
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/debug/package.scala ---
@@ -88,23 +100,72 @@ package object debug {
}
}
+ /**
+ * Get WholeStageCodegenExec subtrees and the codegen in a query plan into one String
+ *
+ * @param query the streaming query for codegen
+ * @return single String containing all WholeStageCodegen subtrees and corresponding codegen
+ */
+ def codegenString(query: StreamingQuery): String = {
+ try {
+ val w = asStreamExecution(query)
+ if (w.lastExecution != null) {
+ codegenString(w.lastExecution.executedPlan)
+ } else {
+ "No physical plan. Waiting for data."
+ }
+ } catch {
--- End diff --
ditto
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org