Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Beam-3208] Add Distinct PTransform to mirror Java SDK #7918

Merged
merged 1 commit into from Mar 8, 2019

Conversation

ttanay
Copy link
Contributor

@ttanay ttanay commented Feb 21, 2019

The Java SDK introduced a Distinct PTransform to replace the RemoveDuplicates PTransform.
But, the Python SDK still had the RemoveDuplicates PTransform.
A new Distinct PTransform was added which does the same thing as RemoveDuplicates. RemoveDuplicates is now an alias to the Distinct PTransform and is deprecated.

JIRA Issue: https://issues.apache.org/jira/browse/BEAM-3208


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement. (N/A)

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- --- --- --- ---
Java Build Status Build Status Build Status Build Status
Build Status
Build Status
Build Status Build Status Build Status
Python Build Status --- Build Status
Build Status
Build Status --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

@ttanay
Copy link
Contributor Author

ttanay commented Feb 21, 2019

Run Portable_Python PreCommit

@ttanay
Copy link
Contributor Author

ttanay commented Feb 21, 2019

Run RAT PreCommit

@ttanay
Copy link
Contributor Author

ttanay commented Feb 21, 2019

Run Portable_Python PreCommit

@ttanay ttanay force-pushed the beam-3208 branch 2 times, most recently from 42369f6 to 6ae5f5d Compare February 22, 2019 06:49
@ttanay ttanay changed the title [Beam-3208] Add Distinct PTransform to mirror Java SDK [WIP][Beam-3208] Add Distinct PTransform to mirror Java SDK Feb 22, 2019
@aaltay
Copy link
Member

aaltay commented Feb 23, 2019

@ttanay is this ready for review? (There is still WIP in the title.)

@ttanay
Copy link
Contributor Author

ttanay commented Feb 23, 2019

Thanks for checking this out @aaltay.
I realized there is a better way to do the same.
Hence, switched to WIP.
Need to make that change. Will let you know post that. :)

@ttanay ttanay force-pushed the beam-3208 branch 3 times, most recently from 93162ee to 227878e Compare February 26, 2019 22:40
@ttanay
Copy link
Contributor Author

ttanay commented Feb 26, 2019

Run Python_pytest PreCommit

@ttanay
Copy link
Contributor Author

ttanay commented Feb 26, 2019

Python_pytest is failing with message:

Task 'pytest' not found in root project 'beam'. Some candidates are: 'goTest', 'test'.

Did something change?

@ttanay ttanay changed the title [WIP][Beam-3208] Add Distinct PTransform to mirror Java SDK [Beam-3208] Add Distinct PTransform to mirror Java SDK Feb 26, 2019
@pabloem
Copy link
Member

pabloem commented Feb 26, 2019

Hi Tanay. The pytest thing showed up only today. I don't know where it came from, but it should be safe to ignore for now.

@aaltay
Copy link
Member

aaltay commented Feb 27, 2019

@udim might have an idea about the pytest.

@udim
Copy link
Member

udim commented Feb 27, 2019

Sorry, that is a test job of mine. It shouldn't be running automatically. 🤷‍♂️

@ttanay
Copy link
Contributor Author

ttanay commented Feb 27, 2019

Hi Tanay. The pytest thing showed up only today. I don't know where it came from, but it should be safe to ignore for now.

Cool. 🚀

@aaltay @pabloem This is ready for review now.

@pabloem
Copy link
Member

pabloem commented Feb 27, 2019

Hello Tanay. Happy to work on this PR together.

I like how you used the appropriate Beam deprecation marker for the old transform. That's great.

I believe that this new utility that you're adding is complex, and will be easy to misuse. Furthermore, the transform is quite simple. Would you consider using a different method to do this? (e.g. subclassing distinct, or having removeduplicates expand into distinct?) - we'd love to add the least complexity possible.

If you're in the ASF slack, feel free to ping me directly to chat.

@ttanay
Copy link
Contributor Author

ttanay commented Mar 1, 2019

Hey @pabloem
I made the changes.
Thank you for helping out!

@pabloem
Copy link
Member

pabloem commented Mar 8, 2019

Hi @ttanay - this is great. Would you please squash the commits so we can merge? - This LGTM

@ttanay
Copy link
Contributor Author

ttanay commented Mar 8, 2019

Hi @ttanay - this is great. Would you please squash the commits so we can merge? - This LGTM

@pabloem Should I change the deprecation version? It is currently "2.11" here:
https://github.com/apache/beam/pull/7918/files#diff-50f2e48308c52f12d0c907b571032195R206

@pabloem
Copy link
Member

pabloem commented Mar 8, 2019

Since 2.11 is released already, yeah, I'd think you want to set it to 2.12

@ttanay
Copy link
Contributor Author

ttanay commented Mar 8, 2019

Since 2.11 is released already, yeah, I'd think you want to set it to 2.12

Cool. I'll make the change.

The Java SDK introduced a Distinct PTransform to replace the
RemoveDuplicates PTransform. But, the Python SDK still had the
RemoveDuplicates PTransform. A new Distinct PTransform was added
which does the same thing as RemoveDuplicates. RemoveDuplicates is
now an alias to the Distinct PTransform and is deprecated.
@ttanay
Copy link
Contributor Author

ttanay commented Mar 8, 2019

@pabloem Squashed commits, changed deprecation version to "2.12":
https://github.com/apache/beam/pull/7918/files#diff-50f2e48308c52f12d0c907b571032195R206
PTAL

@pabloem pabloem merged commit 3b839c8 into apache:master Mar 8, 2019
@pabloem
Copy link
Member

pabloem commented Mar 8, 2019

Thanks Tanay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants