damondouglas commented on code in PR #31472:
URL: https://github.com/apache/beam/pull/31472#discussion_r1623075573
##########
sdks/go/pkg/beam/runners/prism/internal/jobservices/management.go:
##########
@@ -201,7 +201,13 @@ func (s *Server) Prepare(ctx context.Context, req
*jobpb.PrepareJobRequest) (*jo
check("WindowingStrategy.OutputTime",
ws.GetOutputTime(), pipepb.OutputTime_END_OF_WINDOW)
// Non nil triggers should fail.
if ws.GetTrigger().GetDefault() == nil {
- check("WindowingStrategy.Trigger",
ws.GetTrigger(), &pipepb.Trigger_Default{})
+ dt := &pipepb.Trigger{
+ Trigger: &pipepb.Trigger_Default_{},
+ }
+ nt := &pipepb.Trigger{
+ Trigger: &pipepb.Trigger_Never_{},
+ }
+ check("WindowingStrategy.Trigger",
ws.GetTrigger().String(), dt.String(), nt.String())
Review Comment:
The original `ws.GetTrigger()` returns a `*pipepb.Trigger` which would have
never passed `== &pipepb.Trigger_Default{}`. In order for the existing check to
evaluate equality would have needed cmp.Equals. Checking the `String()` was
easier and still achieves the desired outcome.
--
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]