You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by an...@apache.org on 2023/07/06 01:25:45 UTC
[beam] 01/01: Create empty ListBuffer when buffer is none
This is an automated email from the ASF dual-hosted git repository.
anandinguva pushed a commit to branch direct_runner_bug
in repository https://gitbox.apache.org/repos/asf/beam.git
commit aeb7661f2726c2fda62992f7b94453b04d53208f
Author: Anand Inguva <an...@gmail.com>
AuthorDate: Wed Jul 5 21:24:58 2023 -0400
Create empty ListBuffer when buffer is none
---
sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py b/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py
index 8d957068d08..4d5ff6b9986 100644
--- a/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py
+++ b/sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py
@@ -852,6 +852,9 @@ class FnApiRunner(runner.PipelineRunner):
(consuming_stage_name, consuming_transform, buffer_id))
# We enqueue all of the pending output buffers to be scheduled at the
# MAX_TIMESTAMP for the downstream stage.
+ # buffer is None. Empty PCollection. Bug
+ if not buffer:
+ buffer = ListBuffer(None)
runner_execution_context.queues.watermark_pending_inputs.enque(
((consuming_stage_name, timestamp.MAX_TIMESTAMP),
DataInput({consuming_transform: buffer}, {}))) # type: ignore