Re: reduce a data stream to other type

2018-07-15 Thread Hequn Cheng
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]

reduce a data stream to other type

2018-07-14 Thread Soheil Pourbafrani
Hi, I have a keyed datastream in the type of Tuple2. 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>, but reduce function didn't allow that! How can I do such job in Flink?