Skip to content

Commit 92a57ce

Browse files
committed
Fix flatmap bug
1 parent 52834cd commit 92a57ce

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

sdks/python/apache_beam/runners/common.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,8 @@ def handle_process_outputs(
15611561
A value wrapped in a TaggedOutput object will be unwrapped and
15621562
then dispatched to the appropriate indexed output.
15631563
"""
1564-
results = results or []
1564+
if results is None:
1565+
results = []
15651566

15661567
# TODO(https://github.com/apache/beam/issues/20404): Verify that the
15671568
# results object is a valid iterable type if
@@ -1614,7 +1615,9 @@ def handle_process_batch_outputs(
16141615
A value wrapped in a TaggedOutput object will be unwrapped and
16151616
then dispatched to the appropriate indexed output.
16161617
"""
1617-
results = results or []
1618+
if results is None:
1619+
results = []
1620+
16181621
output_element_count = 0
16191622
for result in results:
16201623
tag, result = self._handle_tagged_output(result)

0 commit comments

Comments
 (0)