[
https://issues.apache.org/jira/browse/BEAM-7444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Burke updated BEAM-7444:
-------------------------------
Resolution: Abandoned
Status: Resolved (was: Open)
The code generator will be re-written to use Go Generics, which obsoletes this
issue.
> Support ReIterators in the code generator.
> ------------------------------------------
>
> Key: BEAM-7444
> URL: https://issues.apache.org/jira/browse/BEAM-7444
> Project: Beam
> Issue Type: Bug
> Components: sdk-go
> Reporter: Robert Burke
> Priority: P3
> Labels: easyfix
>
> Currently trying to generate re-iterators for the Go SDK will generate
> incorrect Go code (it won't compile).
> Specifically, an iterator are parameters of the shape: func(*T) bool
> while a re-iterator is of the shape func() func(*T) bool
> That is, a re-iterator is a function that returns iterators.
> The code generator's NameType method [1] should be updated to recognize the
> signature of a re-iterator, have an added makeReIterator method that verifies
> that it's a ReIterator, similar to makeInput for iterators [2]. Likely
> makeReIterator will need to use makeInput to properly handle the check,
> similar to how UnforldReIter is implemented.
> [https://github.com/apache/beam/blob/a2b0ad14f1525d1a645cb26f5b8ec45692d9d54e/sdks/go/pkg/beam/core/funcx/sideinput.go#L92]
> The returned iterator would need it's code generated for performance, by
> recursively registring the return type.
> [[1]https://github.com/apache/beam/blob/master/sdks/go/pkg/beam/util/starcgenx/starcgenx.go#L596|https://github.com/apache/beam/blob/master/sdks/go/pkg/beam/util/starcgenx/starcgenx.go#L596]
> [2][https://github.com/apache/beam/blob/master/sdks/go/pkg/beam/util/starcgenx/starcgenx.go#L532]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)