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

Add support for generating optimized logical plan for Over aggregate

    XMLWordPrintableJSON

Details

    Description

      This issue aims to generate optimized plan for Over aggregate queries on both Batch and Stream, e.g.

      SELECT a, b, c, RANK() OVER (PARTITION BY b ORDER BY c) FROM MyTable
      

      currently, Stream requires all over aggregate functions must be computed on the same window, e.g.

      SELECT c,
          COUNT(a) OVER (PARTITION BY c ORDER BY proctime RANGE UNBOUNDED PRECEDING),
          SUM(a) OVER (PARTITION BY b ORDER BY proctime RANGE UNBOUNDED PRECEDING)
      from MyTable
      

      the above sql is not supported because the partition keys are different.

      Batch does not have such limitation.

      Attachments

        Issue Links

          Activity

            People

              godfreyhe godfrey he
              godfreyhe godfrey he
              Votes:
              0 Vote for this issue
              Watchers:
              1 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