Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-6584

Support multiple consecutive windows in SQL

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Blocker
    • Resolution: Implemented
    • None
    • 1.4.0
    • Table SQL / API
    • None

    Description

      Right now, the Table API supports multiple consecutive windows as follows:

      val table = stream.toTable(tEnv, 'rowtime.rowtime, 'int, 'double, 'float, 'bigdec, 'string)
      
      val t = table
        .window(Tumble over 2.millis on 'rowtime as 'w)
        .groupBy('w)
        .select('w.rowtime as 'rowtime, 'int.count as 'int)
        .window(Tumble over 4.millis on 'rowtime as 'w2)
        .groupBy('w2)
        .select('w2.rowtime, 'w2.end, 'int.count)
      

      Similar behavior should be supported by the SQL API as well. We need to introduce a new auxiliary group function, but this should happen in sync with Apache Calcite.

      Attachments

        Issue Links

          Activity

            People

              twalthr Timo Walther
              twalthr Timo Walther
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: