Github user ggevay commented on the pull request:

    https://github.com/apache/flink/pull/910#issuecomment-121671071
  
    Oh, I see. :) I'm actually glad that you brought this up, because I was not 
really sure how should this be done. At first I also thought to just return a 
`DataStream[Long]`, but then it occured to me that if someone wants to do 
something with the result that also involves the original data, then it gets 
kind of awkward to reconnect them. Or would they just do a `CoMap` in that 
case? I don't know...
    
    Note, that now the newly added overload that works with the entire record 
actually does return a `DataStream[Long]`, so the user also has the option to 
do a project to one field and then call that overload to get a stream of Longs.
    
    By the way, I think one could also ask the same question about 
`WindowedDataStream.sum` (and similar methods): why does that does its thing on 
one field and not just work with the entire records? Could you give some 
details of that design decision, and how it would or would not apply here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to