flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wuchong <...@git.apache.org>
Subject [GitHub] flink pull request #3993: [FLINK-6725][table] make requiresOver as a contrac...
Date Thu, 01 Jun 2017 03:18:58 GMT
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. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message