You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "riteshghorse (via GitHub)" <gi...@apache.org> on 2023/07/21 14:32:07 UTC
[GitHub] [beam] riteshghorse commented on a diff in pull request #27585: [prism] Fix top for unfused execution. Move to register.
riteshghorse commented on code in PR #27585:
URL: https://github.com/apache/beam/pull/27585#discussion_r1270745269
##########
sdks/go/pkg/beam/transforms/top/top.go:
##########
@@ -157,10 +154,13 @@ func accumEnc() func(accum) ([]byte, error) {
panic(err)
}
return func(a accum) ([]byte, error) {
- if a.enc == nil {
- return nil, errors.Errorf("top.accum: element encoder unspecified")
+ if len(a.list) > 0 && a.enc == nil {
+ return nil, errors.Errorf("top.accum: element encoder unspecified with non-zero elements: %v data available", len(a.data))
}
var values [][]byte
+ if len(a.list) == 0 && len(a.data) > 0 {
+ values = a.data
+ }
Review Comment:
More of an understanding question if `a.data` could also be assigned to nil as we do for `a.list` after this if block
--
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