回复: DataStream API min max aggregation on other fields

2019-12-19 Thread Lu Weizheng
! 发件人: Biao Liu 发送时间: 2019年12月19日 18:10 收件人: vino yang 抄送: Lu Weizheng ; user@flink.apache.org 主题: Re: DataStream API min max aggregation on other fields Hi Lu, @vino yang<mailto:yanghua1...@gmail.com> I think what he means is that the "max" s

Re: DataStream API min max aggregation on other fields

2019-12-19 Thread Biao Liu
Hi Lu, @vino yang I think what he means is that the "max" semantics between window and non-window are different. It changes non-aggregated fields unpredictably. That's really an interesting question. I take a look at the relevant implementation. From the perspective of codes, "max" always keeps

Re: DataStream API min max aggregation on other fields

2019-12-19 Thread vino yang
Hi weizheng, IMHO, I do not know where is not clear to you? Is the result not correct? Can you share the correct result based on your understanding? The "keyBy" specifies group field and min/max do the aggregation in the other field based on the position you specified. Best, Vino Lu Weizheng 于

DataStream API min max aggregation on other fields

2019-12-19 Thread Lu Weizheng
Hi all, On a KeyedStream, when I use maxBy or minBy, I will get the max or min element. It means other fields will be kept as the max or min element. This is quite clear. However, when I use max or min, how do Flink do on other fields? val tupleStream = senv.fromElements( (0, 0, 0), (0, 1, 1