[
https://issues.apache.org/jira/browse/BEAM-14347?focusedWorklogId=769930&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-769930
]
ASF GitHub Bot logged work on BEAM-14347:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 12/May/22 22:18
Start Date: 12/May/22 22:18
Worklog Time Spent: 10m
Work Description: 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.
```
Issue Time Tracking
-------------------
Worklog Id: (was: 769930)
Time Spent: 20h 50m (was: 20h 40m)
> [Go SDK] Allow users to optimize DoFns with a single generic registration
> function
> ----------------------------------------------------------------------------------
>
> Key: BEAM-14347
> URL: https://issues.apache.org/jira/browse/BEAM-14347
> Project: Beam
> Issue Type: New Feature
> Components: sdk-go
> Reporter: Danny McCormick
> Assignee: Danny McCormick
> Priority: P2
> Time Spent: 20h 50m
> Remaining Estimate: 0h
>
> Right now, to optimize DoFn execution, users have to use the code generator.
> This updates to allow them to use generics instead.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)