Skip to content

Conversation

@tvalentyn
Copy link
Contributor

@tvalentyn tvalentyn commented Mar 18, 2023

@tvalentyn
Copy link
Contributor Author

R: @liferoad

@github-actions
Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

`return` statements in the same `process` method - this leads to [undefined behavior](https://github.com/apache/beam/issues/22969).
elements with `yield` statements, and use `yield from` to emit all elements from
an iterable, such as a list or a generator. Using `return` statement
with an iterable is also acceptable as long as you don't mix `yield` and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yield could cause the this error cannot pickle 'generator' object for some cases. This is why I did not update the doc in #25743

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed offline cannot pickle 'generator' object was happening in different contexts (outside of process methods). LMK if you think we should merge this, feel free to suggest a different wording.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks.

@tvalentyn tvalentyn merged commit d9321d8 into apache:master Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants