[
https://issues.apache.org/jira/browse/FLINK-6725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16032367#comment-16032367
]
ASF GitHub Bot commented on FLINK-6725:
---------------------------------------
Github user wuchong commented on a diff in the pull request:
https://github.com/apache/flink/pull/3993#discussion_r119520730
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/utils/UserDefinedFunctionUtils.scala
---
@@ -329,6 +330,21 @@ object UserDefinedFunctionUtils {
}
/**
+ * Returns the value (boolean) of AggregateFunction#requiresOver() that
indicates if this
+ * AggregateFunction can only be used for over window aggregate. If
method requiresOver is not
+ * provided, return false as default value.
+ */
+ def getRequiresOverConfig(aggregateFunction: AggregateFunction[_, _]):
Boolean = {
+ try {
+ val method: Method =
aggregateFunction.getClass.getMethod("requiresOver")
--- End diff --
Yes, I think we should check the return type of `requiresOver` as well , in
order to give an explicit exception.
> make requiresOver as a contracted method in udagg
> -------------------------------------------------
>
> Key: FLINK-6725
> URL: https://issues.apache.org/jira/browse/FLINK-6725
> Project: Flink
> Issue Type: Improvement
> Components: Table API & SQL
> Reporter: Shaoxuan Wang
> Assignee: Shaoxuan Wang
>
> I realized requiresOver is defined in the udagg interface when I wrote up the
> udagg doc. I would like to put requiresOver as a contract method. This makes
> the entire udagg interface consistently and clean.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)