[ https://issues.apache.org/jira/browse/BEAM-13757?focusedWorklogId=720193&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-720193 ]
ASF GitHub Bot logged work on BEAM-13757: ----------------------------------------- Author: ASF GitHub Bot Created on: 03/Feb/22 14:57 Start Date: 03/Feb/22 14:57 Worklog Time Spent: 10m Work Description: riteshghorse commented on a change in pull request #16629: URL: https://github.com/apache/beam/pull/16629#discussion_r798649495 ########## File path: sdks/go/pkg/beam/core/funcx/fn_test.go ########## @@ -291,6 +301,96 @@ func TestEmits(t *testing.T) { } } +func TestPane(t *testing.T) { + tests := []struct { + Name string + Params []FnParamKind + Pos int + Exists bool + }{ + { + Name: "pane input", + Params: []FnParamKind{FnContext, FnPane}, + Pos: 1, + Exists: true, + }, + { + Name: "no pane input", + Params: []FnParamKind{FnContext, FnEventTime}, + Pos: -1, + Exists: false, + }, + } + + for _, test := range tests { + test := test + t.Run(test.Name, func(t *testing.T) { + // Create a Fn with a filled params list. + params := make([]FnParam, len(test.Params)) + for i, kind := range test.Params { + params[i].Kind = kind + params[i].T = nil + } + fn := new(Fn) + fn.Param = params Review comment: I agree. -- 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: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 720193) Time Spent: 4.5h (was: 4h 20m) > Pane observation in user DoFN > ----------------------------- > > Key: BEAM-13757 > URL: https://issues.apache.org/jira/browse/BEAM-13757 > Project: Beam > Issue Type: Bug > Components: sdk-go > Reporter: Ritesh Ghorse > Assignee: Ritesh Ghorse > Priority: P2 > Time Spent: 4.5h > Remaining Estimate: 0h > > Handle pane propagation in exec package and pane observation in user DoFns so > that users can access additional parameter [PaneInfo > |https://github.com/apache/beam/blob/b0e9f2638cbaca822ee6a58bd8ec0e61db8e799e/sdks/go/pkg/beam/core/typex/special.go#L77]from > DoFn. This would help in knowing whether the pane is fired on-time, late, > early or first and last. -- This message was sent by Atlassian Jira (v8.20.1#820001)