darshanj commented on pull request #11610:
URL: https://github.com/apache/beam/pull/11610#issuecomment-625633642


   > > > Thanks!
   > > > In terms of naming, I found it surprising that union (for example) 
does deduplication. Maybe name them distinctUnion and multisetUnion or 
something like that?
   > > 
   > > 
   > > > Thanks!
   > > > In terms of naming, I found it surprising that union (for example) 
does deduplication. Maybe name them distinctUnion and multisetUnion or 
something like that?
   > > 
   > > 
   > > I don't have strong view here but I feel that as it is inside `SetFns` 
and will be used like `SetFns.union`, it follows SET DISTINCT semantics. It is 
equivalent of UNION in SQL like `A U B`.Also all other functions in `SetFns` 
follow SET DISTINCT semantics. What is your view, how do we make it better?
   > 
   > I am wondering if you can use a bool flag to indicate it is "ALL" or 
"DISTINCT" semantics. By doing so there is no naming problem.
   
   I think as java doesn't have default parameters, either we need to use 
builders or API may have always have sent the boolean. I lean towards to rename 
`union` to `distinctUnion`. That way it is simple to call and also gives 
clarity on intent.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to