[ https://issues.apache.org/jira/browse/BEAM-9825?focusedWorklogId=431973&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-431973 ]
ASF GitHub Bot logged work on BEAM-9825: ---------------------------------------- Author: ASF GitHub Bot Created on: 08/May/20 05:10 Start Date: 08/May/20 05:10 Worklog Time Spent: 10m Work Description: 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 431973) Remaining Estimate: 91h 20m (was: 91.5h) Time Spent: 4h 40m (was: 4.5h) > Transforms for Intersect, IntersectAll, Except, ExceptAll, Union, UnionAll > -------------------------------------------------------------------------- > > Key: BEAM-9825 > URL: https://issues.apache.org/jira/browse/BEAM-9825 > Project: Beam > Issue Type: New Feature > Components: sdk-java-core > Reporter: Darshan Jani > Assignee: Darshan Jani > Priority: Major > Original Estimate: 96h > Time Spent: 4h 40m > Remaining Estimate: 91h 20m > > I'd like to propose following new high-level transforms. > * Intersect > Compute the intersection between elements of two PCollection. > Given _leftCollection_ and _rightCollection_, this transform returns a > collection containing elements that common to both _leftCollection_ and > _rightCollection_ > > * Except > Compute the difference between elements of two PCollection. > Given _leftCollection_ and _rightCollection_, this transform returns a > collection containing elements that are in _leftCollection_ but not in > _rightCollection_ > * Union > Find the elements that are either of two PCollection. > Implement IntersetAll, ExceptAll and UnionAll variants of transforms. -- This message was sent by Atlassian Jira (v8.3.4#803005)