-
Notifications
You must be signed in to change notification settings - Fork 4.5k
CombinePerKey with gbek (Python) #36382
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
Conversation
…mccorm/combinePerKey
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #36382 +/- ##
============================================
- Coverage 36.22% 36.21% -0.01%
+ Complexity 1667 1666 -1
============================================
Files 1058 1058
Lines 165088 165213 +125
Branches 1190 1190
============================================
+ Hits 59796 59840 +44
- Misses 103116 103196 +80
- Partials 2176 2177 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Assigning reviewers: R: @shunping for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
shunping
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
As written right now, enabling the GBEK pipeline option doesn't work with CombinePerKey on runners which replace CombinePerKey. This is because CombinePerKey contains a GroupByKey; when runners replace this transform, they will either (a) notice that the transform structure doesn't match what they expect and fail (this is what the Dataflow runner does) or (b) silently replace the new GroupByEncryptedKey with whatever their default implementation is.
In fact, a naive optimized version of GroupByEncryptedKey cannot work at all since encryption happens before handing control to the runner, meaning that combiner lifting can't happen by default. For now, we'll work around this by not doing any lifting of CombinePerKey and using the default implementation, though this could be optimized in the future.
To achieve this, this PR simply doesn't return a URN for CombineValues when GBEK is used. This will cause all runners to use the Beam default implementation.
Example failing test before my changes to CombinePerKey: https://github.com/apache/beam/actions/runs/18232400391/job/51918702360. After my changes, this is succeeding. I'll do the same thing for Java once #36346 is in
Part of #36214
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.