Skip to content

Commit

Permalink
Addressed Charles's FIXME - using iter.
Browse files Browse the repository at this point in the history
  • Loading branch information
alxmrs committed Nov 7, 2024
1 parent 28c26bb commit 3058876
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sdks/python/apache_beam/runners/dask/transform_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ class DaskBagWindowedIterator:
window_fn: WindowFn

def __iter__(self):
# FIXME(cisaacstern): list() is likely inefficient, since it presumably
# materializes the full result before iterating over it. doing this for
# now as a proof-of-concept. can we can generate results incrementally?
for result in list(self.bag):
for result in iter(self.bag):
yield get_windowed_value(result, self.window_fn)


Expand Down

0 comments on commit 3058876

Please sign in to comment.