cloud-fan commented on a change in pull request #30212:
URL: https://github.com/apache/spark/pull/30212#discussion_r601237679



##########
File path: docs/sql-ref-syntax-qry-select-groupby.md
##########
@@ -42,42 +42,44 @@ aggregate_name ( [ DISTINCT ] expression [ , ... ] ) [ 
FILTER ( WHERE boolean_ex
 
 ### Parameters
 
+* **grouping_expression**
+
+    Specifies the criteria based on which the rows are grouped together. The 
grouping of rows is performed based on
+    result values of the grouping expressions. A grouping expression may be a 
column alias like `GROUP BY a`, a column position like
+    `GROUP BY 0`, or an expression like `GROUP BY a + b`.
+   
 * **GROUPING SETS**
 
     Groups the rows for each subset of the expressions specified in the 
grouping sets. For example,

Review comment:
       I think `GROUP BY GROUPING SETS ((warehouse, product), (product), ())` 
should be the main syntax.
   
   `GROUP BY GROUPING SETS (warehouse, product)` is more like a syntax sugar 
like ROLLUP/CUBE, which is equivalent to `GROUPING SETS ((warehouse), 
(product))`.
   
   Can we rewrite the document here?




-- 
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