flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jark Wu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-7145) Flink SQL API should support multiple parameters for UserDefinedAggFunction
Date Tue, 11 Jul 2017 08:58:00 GMT

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

Jark Wu commented on FLINK-7145:
--------------------------------

Maybe you can implement the TopN using one class with two different `accumulate(...)` method,
one is {{accumulate(ACC acc, int a, int b)}} , another is {{accumulate(ACC acc, int a, double
b)}}.

> Flink SQL API should support multiple parameters for UserDefinedAggFunction
> ---------------------------------------------------------------------------
>
>                 Key: FLINK-7145
>                 URL: https://issues.apache.org/jira/browse/FLINK-7145
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: yuemeng
>
> UDAF such as topK and some other udaf with bloom filter need more than one parameters
,we should make flink sql support this.
> base on flink sql support DML and multiple parameters udaf,we can execute sql like:
> {code}
> CREATE TEMPORARY function 'TOPK' AS 'com.xxxx.aggregate.udaf.distinctUdaf.topk.ITopKUDAF';
> INSERT INTO db_sink SELECT id, TOPK(price, 5, 'DESC') FROM kafka_source GROUP BY id;
> {code}



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

Mime
View raw message