lostluck commented on a change in pull request #17045:
URL: https://github.com/apache/beam/pull/17045#discussion_r837965604
##########
File path: sdks/go/pkg/beam/core/runtime/graphx/translate.go
##########
@@ -445,6 +446,9 @@ func (m *marshaller) addMultiEdge(edge NamedEdge)
([]string, error) {
payload.RestrictionCoderId = coderId
m.requirements[URNRequiresSplittableDoFn] = true
}
+ if _, ok :=
edge.Edge.DoFn.ProcessElementFn().BundleFinalization(); ok {
+ m.requirements[URNRequiresBundleFinalization] = true
Review comment:
Tiniest note:
Out of an abundance of caution, I paranoid check how we handle requirements
on serialization.
Could you add a sort.Strings() call on the returned slice of requirement
urns from getRequirements? It will help avoid spurious diffs in pipeline protos
at some time later.
https://github.com/apache/beam/blob/35490f37bf17510b7516591c191045b77a567d21/sdks/go/pkg/beam/core/runtime/graphx/translate.go#L218
##########
File path: sdks/go/pkg/beam/core/runtime/graphx/v1/v1.pb.go
##########
@@ -212,18 +212,19 @@ const (
Type_CONTEXT Type_Special = 2
Type_TYPE Type_Special = 3
// Beam
- Type_EVENTTIME Type_Special = 10
- Type_WINDOW Type_Special = 22
- Type_KV Type_Special = 11
- Type_COGBK Type_Special = 13
- Type_WINDOWEDVALUE Type_Special = 14
- Type_T Type_Special = 15
- Type_U Type_Special = 16
- Type_V Type_Special = 17
- Type_W Type_Special = 18
- Type_X Type_Special = 19
- Type_Y Type_Special = 20
- Type_Z Type_Special = 21
+ Type_EVENTTIME Type_Special = 10
+ Type_WINDOW Type_Special = 22
+ Type_KV Type_Special = 11
+ Type_COGBK Type_Special = 13
+ Type_WINDOWEDVALUE Type_Special = 14
+ Type_BUNDLEFINALIZATION Type_Special = 23
Review comment:
I'm fine with adding it now, I was merely hoping the other PR would get
in. Merge conflicts happen, and it's not a hard merge, especially since the PR
simplifies the generation step anyway.
--
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]