youngoli commented on a change in pull request #11327: [BEAM-9642] Add SDF
execution units.
URL: https://github.com/apache/beam/pull/11327#discussion_r407828960
##########
File path: sdks/go/pkg/beam/core/runtime/exec/sdf_invokers_test.go
##########
@@ -273,7 +287,9 @@ func (fn *KvSdf) CreateTracker(rest Restriction) *RTracker
{
return &RTracker{rest, 2}
}
-// ProcessElement is a no-op, it's only included to pass validation.
-func (fn *KvSdf) ProcessElement(*RTracker, int, int) int {
- return 0
+// ProcessElement emits two ints. The first is the first input (key) +
+// RTracker.Rest.Val. The second is the second input (value) + RTracker.Val.
+func (fn *KvSdf) ProcessElement(rt *RTracker, i1 int, i2 int, emit func(int,
int)) {
+ emit(i1+rt.Rest.Val, i2+rt.Val)
+ return
Review comment:
Done.
----------------------------------------------------------------
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]
With regards,
Apache Git Services