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

Add support for generating optimized logical plan for stream window aggregate

    XMLWordPrintableJSON

Details

    Description

      This issue aims to add support for generating optimized logical plan for stream window aggregate queries, e.g.

      SELECT COUNT(*),
          TUMBLE_END(rowtime, INTERVAL '15' MINUTE) + INTERVAL '1' MINUTE
      FROM MyTable
          GROUP BY TUMBLE(rowtime, INTERVAL '15' MINUTE)
      

      the above query will be optimized to following plan

      Calc(select=[EXPR$0, +(CAST(w$end), 60000:INTERVAL MINUTE) AS EXPR$1])
      +- GroupWindowAggregate(window=[TumblingGroupWindow], properties=[w$start, w$end, w$rowtime], select=[COUNT(*) AS EXPR$0, start('w$) AS w$start, end('w$) AS w$end, rowtime('w$) AS w$rowtime])
         +- Exchange(distribution=[single])
            +- Calc(select=[rowtime])
               +- DataStreamScan(table=[[_DataStreamTable_0]], fields=[a, b, c, proctime, rowtime])
      

      Attachments

        Issue Links

          Activity

            People

              godfreyhe godfrey he
              godfreyhe godfrey he
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m