Open maininformer opened 10 months ago
I expect both Yielder and Returner to have the same behavior.
This is wrong here.
yield is used in python generators. It returns a value and pauses execution so that it can be resumed later to produce successive values.
returns exits the function. When a function returns, its execution completely stops.
In the Returner class, only the first batch will be returned where as in Yielder, it will yield one batch at a time. I haven't run the code yet to reproduce.
I expect both Yielder and Returner to have the same behavior.
This is wrong here. ...
You are correct. I should have added, in the context of this code*. Both output the same type, yield one list at a time and return one list total. As far as the downstream transformer is concerned it is the same input.
What happened?
Beam version is 2.52.0
Please see the test below:
I expect both
Yielder
andReturner
to have the same behavior, however inparquetio.py:L119
,row
is a list forYielder
and adict
forReturner
. Thus,Yielder
produces:While
Returner
succeeds.Please run the test to reproduce. Many thanks.
Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
Issue Components