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



##########
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:
       Nit: Cache seems to need a fixed size of 8 bytes for the Hash method to 
work correctly, so I'd just initialize it in a newNumberHasher() function or 
something similar, instead of leaving it to calling code.

##########
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:
       Is this driver still getting used somewhere? I think we disabled the 
gradle commands that were running this on Jenkins, and if so it might be time 
to delete this code.




-- 
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:
[email protected]


Reply via email to