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 2021/06/14 07:08:50 UTC

[GitHub] [beam] lostluck commented on a change in pull request #14966: [BEAM-11086] Validate and Fix Go SDK windowing.

lostluck commented on a change in pull request #14966:
URL: https://github.com/apache/beam/pull/14966#discussion_r649600828



##########
File path: sdks/go/test/integration/driver/driver.go
##########
@@ -69,6 +69,13 @@ func main() {
 		// {"flatten:dup", primitives.FlattenDup()},
 		{"reshuffle:reshuffle", primitives.Reshuffle()},
 		{"reshuffle:reshufflekv", primitives.ReshuffleKV()},
+		{"window:sums", func() *beam.Pipeline {

Review comment:
       Seems reasonable, but definitely not in this PR. I wasn't entirely sure TBH.

##########
File path: sdks/go/pkg/beam/core/runtime/exec/hash.go
##########
@@ -101,13 +109,18 @@ func (h *stringHasher) Hash(element interface{}) (uint64, error) {
 	n := l - i
 	copy(b[:], s[i:])
 	h.hash.Write(b[:n])
+	h.we.EncodeSingle(w, h.hash)
 	return h.hash.Sum64(), nil
 }
 
 type numberHasher struct {
+	hash  hash.Hash64
+	we    WindowEncoder
+	cache []byte

Review comment:
       Good call.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org