[
https://issues.apache.org/jira/browse/BEAM-11106?focusedWorklogId=775226&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-775226
]
ASF GitHub Bot logged work on BEAM-11106:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 26/May/22 20:03
Start Date: 26/May/22 20:03
Worklog Time Spent: 10m
Work Description: riteshghorse commented on code in PR #17770:
URL: https://github.com/apache/beam/pull/17770#discussion_r883030058
##########
sdks/go/pkg/beam/core/graph/fn.go:
##########
@@ -1003,6 +1003,14 @@ func validateSdfSigTypes(fn *Fn, num int) error {
"Ensure that all restrictions in an SDF
are the same type.",
truncateRestrictionName, 0,
method.Ret[0].T, restrictionT, createInitialRestrictionName)
}
+ processFn := fn.methods[processElementName]
+ if len(processFn.Ret) > 0 &&
processFn.Ret[len(processFn.Ret)-1].T !=
reflect.TypeOf((*sdf.ProcessContinuation)(nil)).Elem() {
+ err := errors.Errorf("mismatched output type in
method %v, return %v: got: %v, want: %v",
+ processElementName,
len(processFn.Ret)-1, method.Ret[len(processFn.Ret)-1].T,
reflect.TypeOf((*sdf.ProcessContinuation)(nil)).Elem())
+ return errors.SetTopLevelMsgf(err, "Mismatched
output type in method %v, "+
+ "return value at index %v. Got: %v,
Want: %v (from method %v).",
+ processElementName,
len(processFn.Ret)-1, method.Ret[len(processFn.Ret)-1].T,
reflect.TypeOf((*sdf.ProcessContinuation)(nil)).Elem(), truncateRestrictionName)
+ }
Review Comment:
oh, got it. Done.
Issue Time Tracking
-------------------
Worklog Id: (was: 775226)
Time Spent: 10h 20m (was: 10h 10m)
> [Go SDK] Truncating SDFs during drain
> -------------------------------------
>
> Key: BEAM-11106
> URL: https://issues.apache.org/jira/browse/BEAM-11106
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-go
> Reporter: Robert Burke
> Assignee: Ritesh Ghorse
> Priority: P3
> Fix For: 2.39.0
>
> Time Spent: 10h 20m
> Remaining Estimate: 0h
>
> Allow SDFs to specify a restriction truncation method to permit faster drains.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)