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

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

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

    https://github.com/apache/flink/pull/3808#discussion_r114910197
  
    --- Diff: 
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/batch/table/GroupWindowTest.scala
 ---
    @@ -62,31 +62,30 @@ class GroupWindowTest extends TableTestBase {
       
//===============================================================================================
     
       @Test(expected = classOf[ValidationException])
    -  def testProcessingTimeTumblingGroupWindowOverTime(): Unit = {
    +  def testInvalidProcessingTimeDefinition(): Unit = {
         val util = batchTestUtil()
    -    val table = util.addTable[(Long, Int, String)]('long, 'int, 'string)
    -
    -    table
    -      .window(Tumble over 50.milli as 'w)   // require a time attribute
    -      .groupBy('w, 'string)
    -      .select('string, 'int.count)
    +    // proctime is not allowed
    +    util.addTable[(Long, Int, String)]('long.proctime, 'int, 'string)
       }
     
       @Test(expected = classOf[ValidationException])
    -  def testProcessingTimeTumblingGroupWindowOverCount(): Unit = {
    +  def testInvalidProcessingTimeDefinition2(): Unit = {
         val util = batchTestUtil()
    -    val table = util.addTable[(Long, Int, String)]('long, 'int, 'string)
    +    // proctime is not allowed
    +    util.addTable[(Long, Int, String)]('long, 'int, 'string, 
'proctime.proctime)
    +  }
     
    -    table
    -      .window(Tumble over 2.rows as 'w)   // require a time attribute
    -      .groupBy('w, 'string)
    -      .select('string, 'int.count)
    +  @Test(expected = classOf[ValidationException])
    +  def testInvalidEventTimeDefinition(): Unit = {
    +    val util = batchTestUtil()
    +    // definition must not extend schema
    +    util.addTable[(Long, Int, String)]('long, 'int, 'string, 
'rowtime.rowtime)
       }
     
       @Test
       def testEventTimeTumblingGroupWindowOverCount(): Unit = {
         val util = batchTestUtil()
    -    val table = util.addTable[(Long, Int, String)]('long, 'int, 'string)
    +    val table = util.addTable[(Long, Int, String)]('long.rowtime, 'int, 
'string)
    --- End diff --
    
    +1, we should only replace attributes with valid time types (timestamp, 
long) for stream tables.
    I would not allow `.rowtime` for batch tables.


> Integrate time indicators for Table API & SQL
> ---------------------------------------------
>
>                 Key: FLINK-5884
>                 URL: https://issues.apache.org/jira/browse/FLINK-5884
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: Timo Walther
>            Assignee: Timo Walther
>            Priority: Blocker
>             Fix For: 1.3.0
>
>
> We already discussed the need for a proper integration of time indicators 
> (event-time or processing-time) for both the Table API & SQL on the ML:
> http://apache-flink-mailing-list-archive.1008284.n3.nabble.com/DISCUSS-Table-API-SQL-indicators-for-event-and-processing-time-tp15927.html
> This issue will track the progress. I will work on a design document how we 
> can solve this issue.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to