You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by pa...@apache.org on 2021/01/15 19:59:23 UTC

[beam] branch master updated: [BEAM-11497] Avoid zerodivision error in custom BQ source

This is an automated email from the ASF dual-hosted git repository.

pabloem 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 cff7fc6  [BEAM-11497] Avoid zerodivision error in custom BQ source
     new 4bdafec  Merge pull request #13734 from [BEAM-11497] Avoid zerodivision error in custom BQ source
cff7fc6 is described below

commit cff7fc6f61600533f7f14b72ac851ec51d00909f
Author: Pablo Estrada <pa...@apache.org>
AuthorDate: Tue Jan 12 09:24:13 2021 -0800

    [BEAM-11497] Avoid zerodivision error in custom BQ source
---
 sdks/python/apache_beam/io/gcp/bigquery.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sdks/python/apache_beam/io/gcp/bigquery.py b/sdks/python/apache_beam/io/gcp/bigquery.py
index a5ceb5b..c15b902 100644
--- a/sdks/python/apache_beam/io/gcp/bigquery.py
+++ b/sdks/python/apache_beam/io/gcp/bigquery.py
@@ -803,7 +803,7 @@ class _CustomBigQuerySource(BoundedSource):
         bq.clean_up_temporary_dataset(self._get_project())
 
     for source in self.split_result:
-      yield SourceBundle(0, source, None, None)
+      yield SourceBundle(1.0, source, None, None)
 
   def get_range_tracker(self, start_position, stop_position):
     class CustomBigQuerySourceRangeTracker(RangeTracker):