Skip to content

Commit 20eae3d

Browse files
committed
Address
1 parent ca268b9 commit 20eae3d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/command/commands.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,18 @@ case class ExecutedCommandExec(cmd: RunnableCommand) extends SparkPlan {
8686
* }}}
8787
*
8888
* @param logicalPlan plan to explain
89-
* @param output output schema
9089
* @param extended whether to do extended explain or not
9190
* @param codegen whether to output generated code from whole-stage codegen or not
9291
*/
9392
case class ExplainCommand(
9493
logicalPlan: LogicalPlan,
95-
override val output: Seq[Attribute] =
96-
Seq(AttributeReference("plan", StringType, nullable = true)()),
9794
extended: Boolean = false,
9895
codegen: Boolean = false)
9996
extends RunnableCommand {
10097

98+
override val output: Seq[Attribute] =
99+
Seq(AttributeReference("plan", StringType, nullable = true)())
100+
101101
// Run through the optimizer to generate the physical plan.
102102
override def run(sparkSession: SparkSession): Seq[Row] = try {
103103
val queryExecution =

sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamSuite.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ class StreamSuite extends StreamTest {
291291
.map(_.getString(0))
292292
.mkString("\n")
293293
assert(explainString.contains("StateStoreRestore"))
294+
assert(explainString.contains("StreamingRelation"))
295+
assert(!explainString.contains("LocalTableScan"))
294296

295297
// Test StreamingQuery.display
296298
val q = df.writeStream.queryName("memory_explain").outputMode("complete").format("memory")

0 commit comments

Comments
 (0)