flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From walterddr <...@git.apache.org>
Subject [GitHub] flink pull request #4521: [FLINK-7357] [table] Created extended rules for Wi...
Date Fri, 25 Aug 2017 18:13:02 GMT
Github user walterddr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4521#discussion_r135321169
  
    --- Diff: flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/stream/sql/GroupWindowTest.scala
---
    @@ -143,4 +143,36 @@ class GroupWindowTest extends TableTestBase {
     
         streamUtil.verifySql(sql, expected)
       }
    +
    +  @Test
    +  def testExpressionOnWindowHavingFunction() = {
    +    val sql =
    +      "SELECT " +
    +        "  COUNT(*), " +
    +        "  HOP_START(rowtime, INTERVAL '15' MINUTE, INTERVAL '1' MINUTE) " +
    +        "FROM MyTable " +
    +        "GROUP BY HOP(rowtime, INTERVAL '15' MINUTE, INTERVAL '1' MINUTE) " +
    +        "HAVING SUM(a) > 0"
    +    val expected =
    +      unaryNode(
    +        "DataStreamCalc",
    +        unaryNode(
    +          "DataStreamGroupWindowAggregate",
    +          unaryNode(
    +            "DataStreamCalc",
    +            streamTableNode(0),
    +            term("select", "rowtime, a")
    +          ),
    +          term("window", SlidingGroupWindow('w$, 'rowtime, 60000.millis, 900000.millis)),
    +          term("select",
    +            "COUNT(*) AS EXPR$0",
    +            "SUM(a) AS $f1",
    +            "start('w$) AS w$start",
    +            "end('w$) AS w$end")
    +        ),
    +        term("select", "EXPR$0", "w$start")
    --- End diff --
    
    Ahh. good catch. Bonehead, bonehead :-(. will fix it


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message