[
https://issues.apache.org/jira/browse/BEAM-11109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kenneth Knowles updated BEAM-11109:
-----------------------------------
Status: Open (was: Triage Needed)
> Go SDF - Add optional params and return values to SDF methods.
> --------------------------------------------------------------
>
> Key: BEAM-11109
> URL: https://issues.apache.org/jira/browse/BEAM-11109
> Project: Beam
> Issue Type: New Feature
> Components: sdk-go
> Reporter: Daniel Oliveira
> Priority: P3
>
> Currently, the following Go SDF methods don't accept any kind of optional
> parameters or return values:
> * CreateInitialRestriction(element) restriction
> * SplitRestriction(elem, restriction) []restriction
> * RestrictionSize(elem, restriction) float64
> * CreateTracker(restriction) restrictionTracker
> There is room for adding optional parameters and return values that are
> currently already supported for the ProcessElement method, [as described
> here|https://github.com/apache/beam/blob/f7647ad37a30aa2f907db4eef025815bec0345c7/sdks/go/pkg/beam/core/funcx/fn.go#L379].
> The important ones to start with being Context as a parameter and errors as
> return values.
> Implementing this will involve the following steps:
> * Adjusting the validation in
> [graph/fn.go|https://github.com/apache/beam/blob/master/sdks/go/pkg/beam/core/graph/fn.go]
> to allow the optional parameters and return values.
> * Adjust the SDF invokers in
> [sdf_invokers.go|https://github.com/apache/beam/blob/master/sdks/go/pkg/beam/core/runtime/exec/sdf_invokers.go]
> to support the new params/returns.
> * Adjust the execution code in
> [exec/sdf.go|https://github.com/apache/beam/blob/master/sdks/go/pkg/beam/core/runtime/exec/sdf.go]
> to properly pass in the new params and appropriately handle the new return
> values (such as failing on errors).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)