Hi Soheil,

Yes, reduce function doesn't allow this. A ReduceFunction specifies how two
elements from the input are combined to produce an output element of the
same type.
You can use AggregateFunction or FoldFunction. More details here[1].

Best, Hequn

[1]
https://ci.apache.org/projects/flink/flink-docs-master/dev/stream/operators/windows.html#window-functions

On Sat, Jul 14, 2018 at 9:24 PM, Soheil Pourbafrani <soheil.i...@gmail.com>
wrote:

> Hi, I have a keyed datastream in the type of Tuple2<Long, byte[]>. I want
> to reduce it and merge all of the byte[] for a key. (the first filed (Long)
> is the key). So I need reduce function return the type Tuple2<Long,
> ArrayList<byte[]>>, but reduce function didn't allow that! How can I do
> such job in Flink?
>

Reply via email to