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

    https://github.com/apache/flink/pull/3046#discussion_r96860112
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/table.scala
 ---
    @@ -930,3 +921,46 @@ class GroupWindowedTable(
       }
     
     }
    +
    +
    +class WindowedTable(
    +    private[flink] val table: Table,
    +    private[flink] val window: Window) {
    +
    +  /**
    +    * Groups the elements on some keys (window alias or group keys). It 
should be noted that one
    +    * window alias MUST be included in the key list. Use this function 
before a selection with
    +    * aggregations to perform the aggregation on a per-group basis. 
Similar to a SQL GROUP BY
    +    * statement.
    +    *
    +    * Example:
    +    *
    +    * {{{
    +    *   tab.groupBy('windowAlias, 'key).select('key, 'value.avg)
    +    * }}}
    +    */
    +  def groupBy(fields: Expression*): WindowGroupedTable = {
    +    if (fields.filter(window.alias.get.equals(_)).length != 1) {
    +      throw new ValidationException("Group by must contain only one window 
column.")
    --- End diff --
    
    "GroupBy must contain exactly one window alias.".


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to