[
https://issues.apache.org/jira/browse/FLINK-6361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15982034#comment-15982034
]
ASF GitHub Bot commented on FLINK-6361:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3762#discussion_r113067259
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/AggregateFunction.scala
---
@@ -17,36 +17,93 @@
*/
package org.apache.flink.table.functions
-import java.util.{List => JList}
-
-import org.apache.flink.api.common.typeinfo.TypeInformation
-import org.apache.flink.table.api.TableException
-
/**
* Base class for User-Defined Aggregates.
*
- * @tparam T the type of the aggregation result
+ * The behavior of an [[AggregateFunction]] can be defined by
implementing a series of custom
+ * methods. An [[AggregateFunction]] needs at least three methods:
createAccumulator, getValue,
+ * and accumulate. There are a few other methods that can be optional to
have: retract, merge,
+ * resetAccumulator, and getAccumulatorType.
+ *
+ * All these methods muse be declared publicly, not static and named
exactly as the names
+ * mentioned above. The methods createAccumulator and getValue are
defined in the
+ * [[AggregateFunction]] functions, while other methods are explained
below.
+ *
+ *
+ * {{{
+ * Processes the input values and update the provided accumulator
instance. The method
+ * accumulate can be overloaded with different custom types and
arguments. This function is
--- End diff --
"This function is always a MUST to have." -> "An AggregateFunction requires
at least one accumulate method"?
> Finalize the AggregateFunction interface and refactoring built-in aggregates
> ----------------------------------------------------------------------------
>
> Key: FLINK-6361
> URL: https://issues.apache.org/jira/browse/FLINK-6361
> Project: Flink
> Issue Type: Sub-task
> Components: Table API & SQL
> Reporter: Shaoxuan Wang
> Assignee: Shaoxuan Wang
>
> We have completed codeGen for all aggregate runtime functions. Now we can
> finalize the AggregateFunction. This includes 1) remove Accumulator trait; 2)
> remove accumulate, retract, merge, resetAccumulator, getAccumulatorType
> methods from interface, and allow them as contracted methods for UDAGG; 3)
> refactoring the built-in aggregates accordingly.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)