Github user sunjincheng121 commented on a diff in the pull request: https://github.com/apache/flink/pull/3150#discussion_r96635999 --- 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," + + "1970-01-01 00:00:00.008,1970-01-01 00:00:00.015\nHello world,1," + + "1970-01-01 00:00:00.016,1970-01-01 00:00:00.023\nHello,3,1970-01-01 00:00:00.003," + + "1970-01-01 00:00:00.013\nHi,1,1970-01-01 00:00:00.001,1970-01-01 00:00:00.008" + TestBaseUtils.compareResultAsText(results.asJava, expected) + } + + @Test(expected = classOf[UnsupportedOperationException]) + def testAlldEventTimeSessionGroupWindow(): Unit = { --- End diff -- Yes, I have discussed this with fabian, and we will add non-grouped session windows for batch tables in [FLINK-5219](https://issues.apache.org/jira/browse/FLINK-5219).
--- 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. ---