Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/20247#discussion_r161369147
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
---
@@ -2228,4 +2229,26 @@ class DataFrameSuite extends QueryTest with
SharedSQLContext {
checkAnswer(df, Row(0, 10) :: Nil)
assert(df.queryExecution.executedPlan.isInstanceOf[WholeStageCodegenExec])
}
+
+ test("SPARK-23021 AnalysisBarrier should not cut off explain output for
parsed logical plans") {
+ val df = Seq((1, 1)).toDF("a", "b").groupBy("a").count().limit(1)
+ val explain = ExplainCommand(df.queryExecution.logical, extended =
true)
+ val explainString =
--- End diff --
In `StreamSuite`, there is a trick I think it's better to obtain explain
command's output:
```scala
val outputStream = new java.io.ByteArrayOutputStream()
Console.withOut(outputStream) {
joined.explain(true)
}
assert(outputStream.toString.contains("StreamingRelation"))
```
Do you want to try it?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]