wangpeibin713 commented on issue #7786: [FLINK-11706] Add the SumFunction to 
support KeyedStream.sum
URL: https://github.com/apache/flink/pull/7786#issuecomment-465958395
 
 
   > @wangpeibin713 thank you for your contribution, but I think this is not 
needed. I think `flatMap` cloud solve the problem you described in the issue.
   
   @klion26 thanks for your review. I think this pr will help the user to sum 
the value for convenience.
   
   with `flatMap`, people have to convert the tuple (such as Tuple2<Long, 
Integer[]>  while the length of the  Integer[] is 3 ) to a flat tuple ( 
Tuple4<Long, Integer, Integer,Integer>) then sum with fields (1,2,3). 
   
   In my opinion,  It's too heavy for user. And When the length of the  
Integer[] changed, we have to change the Tuple4 to TupleX in java code ?
   
   If I make some mistake with your review. please let me know. Thanks very 
much.
    

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to