You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lo...@apache.org on 2022/05/13 21:20:57 UTC
[beam] branch master updated: [BEAM-14469] Allow nil primary returns from TrySplit in a single-window context (#17667)
This is an automated email from the ASF dual-hosted git repository.
lostluck pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new c1103659b39 [BEAM-14469] Allow nil primary returns from TrySplit in a single-window context (#17667)
c1103659b39 is described below
commit c1103659b39a2cd08d99bc91a9dd1f3ac10840cf
Author: Jack McCluskey <34...@users.noreply.github.com>
AuthorDate: Fri May 13 17:20:49 2022 -0400
[BEAM-14469] Allow nil primary returns from TrySplit in a single-window context (#17667)
---
sdks/go/pkg/beam/core/runtime/exec/sdf.go | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/sdks/go/pkg/beam/core/runtime/exec/sdf.go b/sdks/go/pkg/beam/core/runtime/exec/sdf.go
index f5dd6a7431b..8ca57625573 100644
--- a/sdks/go/pkg/beam/core/runtime/exec/sdf.go
+++ b/sdks/go/pkg/beam/core/runtime/exec/sdf.go
@@ -665,15 +665,20 @@ func (n *ProcessSizedElementsAndRestrictions) singleWindowSplit(f float64, pWeSt
return []*FullValue{}, []*FullValue{}, nil
}
- pfv, err := n.newSplitResult(p, n.elm.Windows, pWeState)
- if err != nil {
- return nil, nil, err
+ var primaryResult []*FullValue
+ if p != nil {
+ pfv, err := n.newSplitResult(p, n.elm.Windows, pWeState)
+ if err != nil {
+ return nil, nil, err
+ }
+ primaryResult = append(primaryResult, pfv)
}
+
rfv, err := n.newSplitResult(r, n.elm.Windows, rWeState)
if err != nil {
return nil, nil, err
}
- return []*FullValue{pfv}, []*FullValue{rfv}, nil
+ return primaryResult, []*FullValue{rfv}, nil
}
// multiWindowSplit is intended for splitting multi-window elements in