riteshghorse commented on code in PR #26101:
URL: https://github.com/apache/beam/pull/26101#discussion_r1177996241
##########
sdks/go/pkg/beam/core/runtime/exec/pardo.go:
##########
@@ -345,6 +355,41 @@ func (n *ParDo) invokeDataFn(ctx context.Context, pn
typex.PaneInfo, ws []typex.
return val, nil
}
+func (n *ParDo) InvokeTimerFn(ctx context.Context, fn *funcx.Fn, timerFamilyID
string, tmap TimerRecv) (*FullValue, error) {
+ // Defer side input clean-up in case of panic
+ var err error
+ defer func() {
+ if postErr := n.postInvoke(); postErr != nil {
+ err = postErr
+ }
+ }()
+ if err := n.preInvoke(ctx, tmap.Windows, tmap.HoldTimestamp); err !=
nil {
+ return nil, err
+ }
+
+ var extra []any
+ extra = append(extra, timerFamilyID)
+
+ if tmap.Tag != "" {
+ extra = append(extra, tmap.Tag)
+ }
+ extra = append(extra, n.cache.extra...)
+ val, err := InvokeWithOpts(ctx, fn, tmap.Pane, tmap.Windows,
tmap.HoldTimestamp, InvokeOpts{
+ opt: &MainInput{Key: *tmap.Key},
+ bf: n.bf,
+ we: n.we,
+ sa: n.UState,
+ sr: n.reader,
+ ta: n.Timer,
+ tm: n.timerManager,
+ extra: extra,
+ })
Review Comment:
Done
--
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]