riteshghorse commented on code in PR #26101:
URL: https://github.com/apache/beam/pull/26101#discussion_r1170796960
##########
sdks/go/pkg/beam/core/graph/fn.go:
##########
@@ -1350,6 +1393,42 @@ func validateState(fn *DoFn, numIn mainInputs) error {
return nil
}
+func validateTimer(fn *DoFn) error {
+ if fn.Fn == nil {
+ return nil
+ }
+
+ pt := fn.PipelineTimers()
+
+ if _, ok := fn.Fn.TimerProvider(); ok {
+ if len(pt) == 0 {
+ err := errors.Errorf("ProcessElement uses a
TimerProvider, but no timer struct-tags are attached to the DoFn")
+ return errors.SetTopLevelMsgf(err, "ProcessElement uses
a TimerProvider, but no timer struct-tags are attached to the DoFn"+
Review Comment:
Yeah.. it should be timer fields.. wrote this error message a long ago when
we were thinking of struct tags
--
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]