lostluck commented on code in PR #25203:
URL: https://github.com/apache/beam/pull/25203#discussion_r1108036547
##########
sdks/go/pkg/beam/core/funcx/sideinput_test.go:
##########
@@ -39,6 +39,7 @@ func TestIsIter(t *testing.T) {
{func(*typex.EventTime, *int, *string) bool { return false },
false}, // EventTimes disallowed
{func(*int, *typex.Y, *typex.Z) bool { return false }, false},
// too many values
{func(*typex.EventTime, *int, *typex.Y, *typex.Z) bool { return
false }, false}, // too many values, EventTimes disallowed
+ {func(any) bool { return false }, false},
// any is not allowed as a param
Review Comment:
Great question and point!
Yes emitter functions can take pointer elements. And similarly, since the
iterator function parameter is the pointer to an element type, you can pass in
a pointer to a pointer.
Those would be `func(*any)` and `func(**any) bool`
Pointers to pointers are generally rare in Go, but it's consistent with the
intended handling. If Go develops a standard approach to iterators, we'd also
support that more directly, and hopefully avoid the ** question.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]