Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ class StreamExecution(
/** Expose for tests */
def explainInternal(extended: Boolean): String = {
if (lastExecution == null) {
"N/A"
"No physical plan. Waiting for data."
} else {
val explain = ExplainCommand(lastExecution.logical, extended = extended)
sparkSession.sessionState.executePlan(explain).executedPlan.executeCollect()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,8 @@ class FileStreamSourceSuite extends FileStreamSourceTest {
val q = df.writeStream.queryName("file_explain").format("memory").start()
.asInstanceOf[StreamExecution]
try {
assert("N/A" === q.explainInternal(false))
assert("N/A" === q.explainInternal(true))
assert("No physical plan. Waiting for data." === q.explainInternal(false))
assert("No physical plan. Waiting for data." === q.explainInternal(true))

val tempFile = Utils.tempFileWith(new File(tmp, "text"))
val finalFile = new File(src, tempFile.getName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ class StreamSuite extends StreamTest {
val q = df.writeStream.queryName("memory_explain").format("memory").start()
.asInstanceOf[StreamExecution]
try {
assert("N/A" === q.explainInternal(false))
assert("N/A" === q.explainInternal(true))
assert("No physical plan. Waiting for data." === q.explainInternal(false))
assert("No physical plan. Waiting for data." === q.explainInternal(true))

inputData.addData("abc")
q.processAllAvailable()
Expand Down