[ 
https://issues.apache.org/jira/browse/FLINK-5906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995187#comment-15995187
 ] 

ASF GitHub Bot commented on FLINK-5906:
---------------------------------------

Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3809#discussion_r114593800
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/java/BatchTableEnvironment.scala
 ---
    @@ -178,4 +178,24 @@ class BatchTableEnvironment(
     
         registerTableFunctionInternal[T](name, tf)
       }
    +
    +  /**
    +    * Registers an [[AggregateFunction]] under a unique name in the 
TableEnvironment's catalog.
    +    * Registered functions can be referenced in Table API and SQL queries.
    +    *
    +    * @param name The name under which the function is registered.
    +    * @param f The AggregateFunction to register.
    +    * @tparam T The type of the output value.
    +    * @tparam ACC The type of aggregate accumulator.
    +    */
    +  def registerFunction[T, ACC](
    +      name: String,
    +      f: AggregateFunction[T, ACC])
    +  : Unit = {
    +    implicit val typeInfo: TypeInformation[T] = TypeExtractor
    --- End diff --
    
    Yes, the Row type is a good example for type extraction problems. A user 
usually doesn't want to use `GenericType<Row>`. Other cases need for custom 
serializers or types with complex generics.


> Add support to register UDAGG in Table and SQL API
> --------------------------------------------------
>
>                 Key: FLINK-5906
>                 URL: https://issues.apache.org/jira/browse/FLINK-5906
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>            Reporter: Fabian Hueske
>            Assignee: Shaoxuan Wang
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to