You could implement aggregation functions that just do AVG, COUNT, etc. and
a parameterizable aggregation function that can be configured to call the
avg, count, etc. functions.

When configuring, you would specify the input and output, for example like
this:
input: [int, int, double]
key: input.1
output: [key, count(*), sum(input.2), avg(input.3)]

This is pretty much what the SQL optimizer would do when translating the
relational aggregation operator into a Flink function.

Am Mo., 29. Apr. 2019 um 18:43 Uhr schrieb deklanw <[email protected]>:

> Hi,
>
> Thanks for the reply.
>
> I had already almost completely lost hope in using Flink SQL. You have
> confirmed that.
>
> But, like I said, I don't know how to reduce the large amount of
> boilerplate
> I foresee this requiring with the DataStream API. Can you help me with
> that?
> You mention "parameterizable aggregation functions", can you show an
> example? I don't know how to do this without reinventing AVG and COUNT over
> and over again.
>
> Thanks
>
>
>
> --
> Sent from:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
>

Reply via email to