You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by maropu <gi...@git.apache.org> on 2018/12/05 01:10:46 UTC

[GitHub] spark pull request #23213: [SPARK-26262][SQL] Runs SQLQueryTestSuite on mixe...

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-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org