[
https://issues.apache.org/jira/browse/FLINK-4693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15829598#comment-15829598
]
ASF GitHub Bot commented on FLINK-4693:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3150#discussion_r96812620
--- Diff:
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/runtime/dataset/DataSetWindowAggregateITCase.scala
---
@@ -119,4 +119,35 @@ class DataSetWindowAggregateITCase(
val results = windowedTable.toDataSet[Row].collect()
TestBaseUtils.compareResultAsText(results.asJava, expected)
}
+
+ @Test
+ def testEventTimeSessionGroupWindow(): Unit = {
+ val env = ExecutionEnvironment.getExecutionEnvironment
+ val tEnv = TableEnvironment.getTableEnvironment(env, config)
+
+ val table = env.fromCollection(data).toTable(tEnv, 'long, 'int,
'string)
+ val windowedTable = table
+ .groupBy('string)
+ .window(Session withGap 7.milli on 'long as 'w)
+ .select('string, 'string.count, 'w.start, 'w.end)
+
+ val results = windowedTable.toDataSet[Row].collect()
+
+ val expected = "Hallo,1,1970-01-01 00:00:00.002,1970-01-01
00:00:00.009\nHello world,1," +
--- End diff --
can you break the lines at the end of the records? Makes it easier to read
the expected data.
> Add session group-windows for batch tables
> -------------------------------------------
>
> Key: FLINK-4693
> URL: https://issues.apache.org/jira/browse/FLINK-4693
> Project: Flink
> Issue Type: Sub-task
> Components: Table API & SQL
> Reporter: Timo Walther
> Assignee: sunjincheng
>
> Add Session group-windows for batch tables as described in
> [FLIP-11|https://cwiki.apache.org/confluence/display/FLINK/FLIP-11%3A+Table+API+Stream+Aggregations].
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)