You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/05/12 22:18:40 UTC
[GitHub] [beam] lostluck commented on a diff in pull request #17650: [BEAM-14347] Add function for simple function registration
lostluck commented on code in PR #17650:
URL: https://github.com/apache/beam/pull/17650#discussion_r871851514
##########
sdks/go/pkg/beam/register/register.tmpl:
##########
@@ -194,11 +194,18 @@ func registerDoFn{{$processElementIn}}x{{$processElementOut}}StructWrappersAndFu
reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn)
}
-// DoFn{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut true)}} registers your DoFn to optimize execution at runtime.
+// DoFn{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut true)}} registers your structural DoFn to optimize execution at runtime.
{{if (or $processElementIn $processElementOut)}}// DoFn input and output parameter types should be provided in order as the generic constraints.
{{end}}func DoFn{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut true)}}(doFn genericDoFn{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut false)}}) {
registerDoFnTypes(doFn)
registerDoFn{{$processElementIn}}x{{$processElementOut}}StructWrappersAndFuncs{{(genericTypingRepresentation $processElementIn $processElementOut false)}}(doFn)
+}
+
+// Function{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut true)}} registers your non-structural DoFn to optimize execution at runtime.
Review Comment:
```suggestion
// Function{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut true)}} registers your functional DoFn to optimize execution at runtime.
```
--
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-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org