Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/21222#discussion_r206342173
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/debug/package.scala ---
@@ -116,6 +177,30 @@ package object debug {
}
}
+ implicit class DebugStreamQuery(query: StreamingQuery) extends Logging {
+ def debug(): Unit = {
+ try {
+ val w = asStreamExecution(query)
+ if (w.lastExecution == null) {
+ debugPrint("No physical plan. Waiting for data.")
+ } else {
+ val executedPlan = w.lastExecution.executedPlan
+ if
(executedPlan.find(_.isInstanceOf[WriteToContinuousDataSourceExec]).isDefined) {
+ debugPrint("Debug on continuous mode is not supported.")
+ } else {
+ debugInternal(executedPlan)
+ }
+ }
+ } catch {
--- End diff --
I prefer to remove this. There is nothing to do in this case. This
basically means a bug in Spark: a new type is added but `asStreamExecution` is
not updated accordingly.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]