maropu commented on pull request #30144:
URL: https://github.com/apache/spark/pull/30144#issuecomment-716353950


   I'm not familiar with this mixed case, so I just want to know a whole 
picture of this feature first. The other systems support this feature? And, how 
about the other mixed cases as follows?
   ```
   postgres=# create table t(a int, b int, c int, v int);
   postgres=# insert into t values (1, 1, 1, 1);
   postgres=# select a, b, c, sum(v) from t group by rollup(a, b), cube(b, c);
    a | b | c | sum 
   ---+---+---+-----
      |   |   |   1
    1 |   | 1 |   1
    1 |   |   |   1
    1 | 1 | 1 |   1
    1 | 1 | 1 |   1
    1 | 1 | 1 |   1
      | 1 | 1 |   1
      |   | 1 |   1
    1 | 1 |   |   1
    1 | 1 |   |   1
    1 | 1 |   |   1
      | 1 |   |   1
   (12 rows)
   
   postgres=# select a, b, c, sum(v) from t group by rollup(a, b), cube(b, c), 
grouping sets(a, c);
    a | b | c | sum 
   ---+---+---+-----
    1 | 1 |   |   1
    1 | 1 |   |   1
    1 | 1 |   |   1
    1 | 1 |   |   1
    1 |   |   |   1
    1 |   |   |   1
    1 | 1 | 1 |   1
    1 | 1 | 1 |   1
    1 | 1 | 1 |   1
    1 | 1 | 1 |   1
    1 | 1 | 1 |   1
    1 | 1 | 1 |   1
    1 | 1 | 1 |   1
    1 | 1 | 1 |   1
    1 | 1 | 1 |   1
    1 | 1 | 1 |   1
      | 1 | 1 |   1
      | 1 | 1 |   1
      |   | 1 |   1
      |   | 1 |   1
    1 |   | 1 |   1
    1 |   | 1 |   1
    1 |   | 1 |   1
    1 |   | 1 |   1
   (24 rows)
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to