You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/11/14 12:31:00 UTC

[jira] [Commented] (FLINK-8013) Check of AggregateFunction merge function signature is too strict.

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

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

GitHub user twalthr opened a pull request:

    https://github.com/apache/flink/pull/5011

    [FLINK-8013] [table] Support aggregate functions with generic arrays

    ## What is the purpose of the change
    
    Adds supports for aggregate functions with generic arrays and fixes other bugs.
    
    ## Brief change log
    
    - Changes to the type extraction at several locations.
    
    ## Verifying this change
    
    Complex aggregation function added.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): no
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
      - The serializers: no
      - The runtime per-record code paths (performance sensitive): no
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: no
      - The S3 file system connector: no
    
    ## Documentation
    
      - Does this pull request introduce a new feature? no
      - If yes, how is the feature documented? not applicable


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/twalthr/flink FLINK-8013

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/5011.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5011
    
----
commit 5a18f5e697ad67d1aa08873a5ba65e4eb0bad210
Author: twalthr <tw...@apache.org>
Date:   2017-11-14T10:06:54Z

    [FLINK-8013] [table] Support aggregate functions with generic arrays

----


> Check of AggregateFunction merge function signature is too strict.
> ------------------------------------------------------------------
>
>                 Key: FLINK-8013
>                 URL: https://issues.apache.org/jira/browse/FLINK-8013
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>    Affects Versions: 1.4.0
>            Reporter: Fabian Hueske
>            Assignee: Timo Walther
>
> The {{AggregationCodeGenerator}} checks that a user-defined {{AggregateFunction}} implements all required methods. However, the check for the {{merge(accumulator: ACC, its: java.lang.Iterable\[ACC\]): Unit}} method is too strict and rejects valid UDAGGs. 
> This happens for more complex accumulators such as {{Array\[org.apache.flink.api.java.tuple.Tuple2\[java.lang.Integer, java.lang.Float\]\]}} because generic types are lost such that the check of the argument types of {{merge}} fails.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)