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 75644d8f5fa Fix BigQuery batch insertion loop (#27477)
75644d8f5fa is described below

commit 75644d8f5faf12ad4259880ab1352def8ecc0905
Author: Mahmud Ridwan <m...@hjr265.me>
AuthorDate: Thu Jul 13 05:33:42 2023 +0600

    Fix BigQuery batch insertion loop (#27477)
---
 sdks/go/pkg/beam/io/bigqueryio/bigquery.go | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sdks/go/pkg/beam/io/bigqueryio/bigquery.go 
b/sdks/go/pkg/beam/io/bigqueryio/bigquery.go
index 4ca64be8780..12beacd4a01 100644
--- a/sdks/go/pkg/beam/io/bigqueryio/bigquery.go
+++ b/sdks/go/pkg/beam/io/bigqueryio/bigquery.go
@@ -337,10 +337,9 @@ func (f *writeFn) ProcessElement(ctx context.Context, _ 
int, iter func(*beam.X)
                        }
                        data = nil
                        size = writeOverheadBytes
-               } else {
-                       data = append(data, reflect.ValueOf(val.(any)))
-                       size += current
                }
+               data = append(data, reflect.ValueOf(val.(any)))
+               size += current
        }
        if len(data) == 0 {
                return nil

Reply via email to