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

    https://github.com/apache/flink/pull/3574#discussion_r108626444
  
    --- Diff: 
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/stream/sql/WindowAggregateTest.scala
 ---
    @@ -350,4 +350,59 @@ class WindowAggregateTest extends TableTestBase {
         streamUtil.verifySql(sql, expected)
       }
     
    +  @Test
    +  def testBoundedNonPartitionedProcessingWindowWithRow() = {
    +    val sql = "SELECT " +
    +      "c, " +
    +      "count(a) OVER (ORDER BY procTime() ROWS BETWEEN 2 preceding AND " +
    +      "CURRENT ROW) as cnt1 " +
    +      "from MyTable"
    +
    +    val expected =
    +      unaryNode(
    +        "DataStreamCalc",
    +        unaryNode(
    +          "DataStreamOverAggregate",
    +          unaryNode(
    +            "DataStreamCalc",
    +            streamTableNode(0),
    +            term("select", "a", "c", "PROCTIME() AS $2")
    +          ),
    +          term("orderBy", "PROCTIME"),
    +          term("rows", "BETWEEN 2 PRECEDING AND CURRENT ROW"),
    +          term("select", "a", "c", "PROCTIME", "COUNT(a) AS w0$o0")
    +        ),
    +        term("select", "c", "w0$o0 AS $1")
    +      )
    +    streamUtil.verifySql(sql, expected)
    +  }
    +  
    +  @Test
    +  def testBoundedPartitionedProcessingWindowWithRow() = {
    +    val sql = "SELECT " +
    +      "c, " +
    +      "count(a) OVER (PARTITION BY c ORDER BY procTime() ROWS BETWEEN 2 
preceding AND " +
    --- End diff --
    
    I have tested 4 situations that Fabian thought to be sufficient for our 
purpose. 3 or 4 does not change besides my work to manually assemble the test. 
:-) of course unless the aggregations are not reliable and summing 3 numbers or 
4 numbers could have an impact. :-D


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

Reply via email to