Nico Kruber created FLINK-20059:
-----------------------------------
Summary: Outdated SQL docs on aggregate functions' merge
Key: FLINK-20059
URL:
https://issues.apache.org/jira/browse/FLINK-20059 Project: Flink
Issue Type: Bug
Components: Documentation, Table SQL / API
Affects Versions: 1.11.2, 1.12.0
Reporter: Nico Kruber
In the java docs as well as the user docs, the {{merge}} method of an aggregation UDF is described as optional, e.g.
{quote}Merges a group of accumulator instances into one accumulator instance. This function must be implemented for data stream session window grouping aggregates and data set grouping aggregates.{quote}
However, it seems that nowadays this method is required in more cases (I stumbled on this for a HOP window in streaming):
{code}
StreamExecGlobalGroupAggregate.scala
.needMerge(mergedAccOffset, mergedAccOnHeap, mergedAccExternalTypes)
StreamExecGroupWindowAggregateBase.scala
generator.needMerge(mergedAccOffset = 0, mergedAccOnHeap = false)
StreamExecIncrementalGroupAggregate.scala
.needMerge(mergedAccOffset, mergedAccOnHeap = true, mergedAccExternalTypes)
StreamExecLocalGroupAggregate.scala
.needMerge(mergedAccOffset = 0, mergedAccOnHeap = true)
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)