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

    https://github.com/apache/flink/pull/3026#discussion_r97298700
  
    --- Diff: docs/dev/table_api.md ---
    @@ -790,6 +790,40 @@ val result = in.groupBy('a).select('a, 'b.sum as 'd);
         </tr>
     
         <tr>
    +      <td><strong>GroupingSets</strong></td>
    +      <td>
    +        <p>Similar to a SQL GROUP BY GROUPING SETS clause. A GROUPING SETS 
expression allows to selectively specify the
    +        set of groups that you want to create within a GROUP BY clause.</p>
    +{% highlight scala %}
    +val in = ds.toTable(tableEnv, 'a, 'b, 'c);
    +val result = in.groupingSets(('a, 'b), 'b, ()).select('a, 'b, 'c.sum as 
'd);
    +{% endhighlight %}
    +      </td>
    +    </tr>
    +
    +    <tr>
    +      <td><strong>Cube</strong></td>
    +      <td>
    +        <p>Similar to a SQL GROUP BY CUBE clause. A CUBE expression will 
generate subtotals for all combinations of the dimensions specified.</p>
    --- End diff --
    
    Would be great if you could also add an example. E.g. `.cube('a, 'b)` is 
equivalent to `.groupingSets(...)`.


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

Reply via email to