You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2021/01/05 17:13:01 UTC

[jira] [Commented] (BEAM-11109) Go SDF - Add optional params and return values to SDF methods.

    [ https://issues.apache.org/jira/browse/BEAM-11109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17259065#comment-17259065 ] 

Beam JIRA Bot commented on BEAM-11109:
--------------------------------------

This issue was marked "stale-P2" and has not received a public comment in 14 days. It is now automatically moved to P3. If you are still affected by it, you can comment and move it back to P2.

> 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)