This is an automated email from the ASF dual-hosted git repository. lostluck pushed a commit to branch lostluck-patch-3 in repository https://gitbox.apache.org/repos/asf/beam.git
commit 8e5b9e3356f4131b3fc4f0862203662f7a495f84 Author: Robert Burke <[email protected]> AuthorDate: Mon Sep 9 16:46:01 2019 -0700 [go-sdk] Never split on the 0th element. That is, don't split if no elements have been processed yet. Always process at least one element. --- sdks/go/pkg/beam/core/runtime/exec/datasource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/go/pkg/beam/core/runtime/exec/datasource.go b/sdks/go/pkg/beam/core/runtime/exec/datasource.go index 1a0371f..e1da517 100644 --- a/sdks/go/pkg/beam/core/runtime/exec/datasource.go +++ b/sdks/go/pkg/beam/core/runtime/exec/datasource.go @@ -270,7 +270,7 @@ func (n *DataSource) Split(splits []int64, frac float32) (int64, error) { // Find the smallest split index that we haven't yet processed, and set // the promised split position to this value. for _, s := range splits { - if s >= c && s < n.splitPos { + if s > 0 && s >= c && s < n.splitPos { n.splitPos = s fs := n.splitPos n.mu.Unlock()
