flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Bortoli <stefano.bort...@huawei.com>
Subject GROUP BY TUMBLE on ROW range
Date Tue, 17 Oct 2017 15:16:49 GMT
Hi all,

Is there a way to use a tumble window group by with row range in streamSQL?

I mean, something like this:

//      "SELECT COUNT(*) " +
//             "FROM T1 " +
//        "GROUP BY TUMBLE(rowtime, INTERVAL '2' ROWS PRECEDING )"

However, even looking at tests and looking at the "row interval expression generation" I could
not find any examples in SQL. I know it is supported by the stream APIs, and countWindow is
the chosen abstraction.

    table
      .window(Tumble over 2.rows on 'long as 'w)
      .groupBy('w)
      .select('int.count)
      .toDataSet[Row]

I fear I am missing something simple. Thanks a lot for the support guys!

Best,
Stefano

Mime
View raw message