flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-6584) Support multiple consecutive windows in SQL
Date Tue, 27 Jun 2017 15:05:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-6584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16064968#comment-16064968

ASF GitHub Bot commented on FLINK-6584:

GitHub user twalthr opened a pull request:


    [FLINK-6584] [table] Support multiple consecutive windows in SQL

    This allows for accessing rowtime and proctime attributes of windows in SQL. It introduces
`TUMBLE_ROWTIME`, `TUMBLE_PROCTIME` etc. It also allows for multiple consecutive windows such
      TUMBLE_ROWTIME(rowtime, INTERVAL '0.004' SECOND),
      TUMBLE_END(rowtime, INTERVAL '0.004' SECOND),
      COUNT(`int`) as `int`
    FROM (
        TUMBLE_ROWTIME(rowtime, INTERVAL '0.002' SECOND) AS rowtime,
        COUNT(`int`) as `int`
      FROM $table
      GROUP BY TUMBLE(rowtime, INTERVAL '0.002' SECOND)
    GROUP BY TUMBLE(rowtime, INTERVAL '0.004' SECOND)```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/twalthr/flink FLINK-6584

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4199
commit 28fcb9250e85d02d70a956ea36ade54905b6b56d
Author: twalthr <twalthr@apache.org>
Date:   2017-05-23T13:57:23Z

    [FLINK-6584] [table] Support multiple consecutive windows in SQL


> Support multiple consecutive windows in SQL
> -------------------------------------------
>                 Key: FLINK-6584
>                 URL: https://issues.apache.org/jira/browse/FLINK-6584
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: Timo Walther
>            Assignee: Timo Walther
> Right now, the Table API supports multiple consecutive windows as follows:
> {code}
> val table = stream.toTable(tEnv, 'rowtime.rowtime, 'int, 'double, 'float, 'bigdec, 'string)
> val t = table
>   .window(Tumble over 2.millis on 'rowtime as 'w)
>   .groupBy('w)
>   .select('w.rowtime as 'rowtime, 'int.count as 'int)
>   .window(Tumble over 4.millis on 'rowtime as 'w2)
>   .groupBy('w2)
>   .select('w2.rowtime, 'w2.end, 'int.count)
> {code}
> Similar behavior should be supported by the SQL API as well. We need to introduce a new
auxiliary group function, but this should happen in sync with Apache Calcite.

This message was sent by Atlassian JIRA

View raw message