-
Notifications
You must be signed in to change notification settings - Fork 526
Add collect method to SCollectionWithSideInput #5666
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
Add collect method to SCollectionWithSideInput #5666
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5666 +/- ##
==========================================
+ Coverage 61.31% 61.47% +0.15%
==========================================
Files 314 314
Lines 11279 11324 +45
Branches 815 801 -14
==========================================
+ Hits 6916 6961 +45
Misses 4363 4363 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
scio-core/src/test/scala/com/spotify/scio/values/SCollectionWithSideInputTest.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Claire McGinty <[email protected]>
… of github.com:spotify/scio into ctan/SCIO-5533/add-collect-to-SCollectionWithSideInput
| trait SideInputDoFnWithResource[T, U, R] extends DoFnWithResource[T, U, R] with NamedFn { | ||
| def sideInputContext(c: DoFn[T, U]#ProcessContext, w: BoundedWindow): SideInputContext[T] = | ||
| // Workaround for type inference limit | ||
| new SideInputContext(c.asInstanceOf[DoFn[T, AnyRef]#ProcessContext], w) | ||
| } |
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.
Curious what you think about adding an additional trait here. I couldn't create classes such as MapFnWithWithResource extends DoFnWithResource with SideInputDoFn because SideInputDoFn extends NamedDoFn andDoFnWithResource is not a subclass of NamedDoFn.
clairemcginty
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.
nice! appreciate the thorough tests!
scio-core/src/main/scala/com/spotify/scio/values/SCollectionWithSideInput.scala
Outdated
Show resolved
Hide resolved
scio-core/src/main/scala/com/spotify/scio/values/SCollectionWithSideInput.scala
Outdated
Show resolved
Hide resolved
…thSideInput.scala Co-authored-by: Claire McGinty <[email protected]>
… of github.com:spotify/scio into ctan/SCIO-5533/add-collect-to-SCollectionWithSideInput
clairemcginty
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!
Relates to #5533
Adds
collectmethod toSCollectionWithSideInput.