apache / beam

Apache Beam is a unified programming model for Batch and Streaming data processing.
https://beam.apache.org/
Apache License 2.0
7.7k stars 4.2k forks source link

[Feature Request]: Issue the warning messages when the `process` method in `DoFn` does not return anything #28061

Open liferoad opened 11 months ago

liferoad commented 11 months ago

What would you like to happen?

When creating a DoFn, if the process method returns None, we can issue a warning, such as no iterator is returned by the process method in DoFn. This could help users debug whether returning None is expected. Possible code changes could be in _check_fn_use_yield_and_return from https://github.com/apache/beam/blob/master/sdks/python/apache_beam/transforms/core.py.

Issue Priority

Priority: 3 (nice-to-have improvement)

Issue Components

timgrein commented 11 months ago

.take-issue