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

Incorrect example of accumulator usage within emitUpdateWithRetract for TableAggregateFunction

    XMLWordPrintableJSON

Details

    Description

      The documentation provides an example of using `emitUpdateWithRetract`. However, the example is misleading as it incorrectly suggests that the accumulator can be updated within the `emitUpdateWithRetract method`. In reality, the order of invocation is to first call `getAccumulator` and then `emitUpdateWithRetract`, which means that updating the accumulator within `emitUpdateWithRetract` will not take effect. Please see GroupTableAggFunction#L141 ~ GroupTableAggFunction#L146 for more details.

      Attachments

        Issue Links

          Activity

            People

              qingyue Jane Chan
              qingyue Jane Chan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: