Skip to content

Commit

Permalink
Fix flatmap bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNeuralBit committed Jun 22, 2022
1 parent 52834cd commit 92a57ce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sdks/python/apache_beam/runners/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,8 @@ def handle_process_outputs(
A value wrapped in a TaggedOutput object will be unwrapped and
then dispatched to the appropriate indexed output.
"""
results = results or []
if results is None:
results = []

# TODO(https://github.com/apache/beam/issues/20404): Verify that the
# results object is a valid iterable type if
Expand Down Expand Up @@ -1614,7 +1615,9 @@ def handle_process_batch_outputs(
A value wrapped in a TaggedOutput object will be unwrapped and
then dispatched to the appropriate indexed output.
"""
results = results or []
if results is None:
results = []

output_element_count = 0
for result in results:
tag, result = self._handle_tagged_output(result)
Expand Down

0 comments on commit 92a57ce

Please sign in to comment.