I'm assuming what you're trying to do is essentially sum over two different fields of your data. I would do this with my own ReduceFunction.
stream .keyBy("someKey") .reduce(CustomReduceFunction) // sum whatever fields you want and return the result I think it does make sense that Flink could provide a generic sum function that could sum over multiple fields, though. -Jamie On Tue, Jun 7, 2016 at 5:41 AM, Al-Isawi Rami <rami.al-is...@comptel.com> wrote: > Hi, > > Is there any reason why “keyBy" accepts multi-field, while for example > “sum” does not. > > -Rami > Disclaimer: This message and any attachments thereto are intended solely > for the addressed recipient(s) and may contain confidential information. If > you are not the intended recipient, please notify the sender by reply > e-mail and delete the e-mail (including any attachments thereto) without > producing, distributing or retaining any copies thereof. Any review, > dissemination or other use of, or taking of any action in reliance upon, > this information by persons or entities other than the intended > recipient(s) is prohibited. Thank you. > -- Jamie Grier data Artisans, Director of Applications Engineering @jamiegrier <https://twitter.com/jamiegrier> ja...@data-artisans.com