Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23213#discussion_r238803424
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/ExplainSuite.scala 
---
    @@ -53,6 +55,133 @@ class ExplainSuite extends QueryTest with 
SharedSQLContext {
         checkKeywordsExistsInExplain(df,
           keywords = "InMemoryRelation", "StorageLevel(disk, memory, 
deserialized, 1 replicas)")
       }
    +
    +  test("optimized plan should show the rewritten aggregate expression") {
    +    withTempView("test_agg") {
    +      sql(
    +        """
    +          |CREATE TEMPORARY VIEW test_agg AS SELECT * FROM VALUES
    +          |  (1, true), (1, false),
    +          |  (2, true),
    +          |  (3, false), (3, null),
    +          |  (4, null), (4, null),
    +          |  (5, null), (5, true), (5, false) AS test_agg(k, v)
    +        """.stripMargin)
    +
    +      // simple explain of queries having every/some/any aggregates. 
Optimized
    +      // plan should show the rewritten aggregate expression.
    +      val df = sql("SELECT k, every(v), some(v), any(v) FROM test_agg 
GROUP BY k")
    +      checkKeywordsExistsInExplain(df,
    +        "Aggregate [k#x], [k#x, min(v#x) AS every(v)#x, max(v#x) AS 
some(v)#x, " +
    --- End diff --
    
    Since `extended=false` in [line 
33](https://github.com/apache/spark/pull/23213/files#diff-d61681740c66c4c0ea311a76c98f80adR33),
 the test suite only compares with Physical Plan. Maybe, did you change line 33 
in your codebase?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to