Github user maropu commented on a diff in the pull request: https://github.com/apache/spark/pull/23213#discussion_r238899777 --- Diff: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala --- @@ -2899,6 +2899,144 @@ class SQLQuerySuite extends QueryTest with SharedSQLContext { } } } + + private def checkKeywordsExistsInExplain(df: DataFrame, keywords: String*): Unit = { + val output = new java.io.ByteArrayOutputStream() + Console.withOut(output) { + df.explain(extended = true) + } + val normalizedOutput = output.toString.replaceAll("#\\d+", "#x") + for (key <- keywords) { + assert(normalizedOutput.contains(key)) + } + } + + test("optimized plan should show the rewritten aggregate expression") { --- End diff -- updated! Thanks, guys!
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org