Github user yhuai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10731#discussion_r51984605
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala 
---
    @@ -456,21 +455,32 @@ class SQLQuerySuite extends QueryTest with 
SharedSQLContext {
     
       test("literal in agg grouping expressions") {
         checkAnswer(
    -      sql("SELECT a, count(1) FROM testData2 GROUP BY a, 1"),
    -      Seq(Row(1, 2), Row(2, 2), Row(3, 2)))
    +      sql("SELECT SUM(a) FROM testData2 GROUP BY 2"),
    +      Seq(Row(6), Row(6)))
    +
         checkAnswer(
    -      sql("SELECT a, count(2) FROM testData2 GROUP BY a, 2"),
    +      sql("SELECT a, SUM(b) FROM testData2 GROUP BY 1"),
    +      Seq(Row(1, 3), Row(2, 3), Row(3, 3)))
    +
    +    checkAnswer(
    +      sql("SELECT a, count(1) FROM testData2 GROUP BY a, 1"),
           Seq(Row(1, 2), Row(2, 2), Row(3, 2)))
     
         checkAnswer(
           sql("SELECT a, 1, sum(b) FROM testData2 GROUP BY a, 1"),
    --- End diff --
    
    what is the meaning of 1 in this case?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to