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-4693) Add session group-windows for batch tables
Date Wed, 18 Jan 2017 14:15:26 GMT

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

ASF GitHub Bot commented on FLINK-4693:
---------------------------------------

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

    https://github.com/apache/flink/pull/3150#discussion_r96642258
  
    --- 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 --
    
    I see. I haven't seen this issue.


> 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)

Mime
View raw message