batch-stream icon indicating copy to clipboard operation
batch-stream copied to clipboard

Should be able to return the rest of the batch when the stream end

Open bobylito opened this issue 10 years ago • 5 comments

When a stream contains a number of items that is not a strict multiply of the batch size, it results in some items that are not passed to then next stream process.

bobylito avatar Sep 18 '15 13:09 bobylito

That would be great to have fixed.

eric-radiant avatar Aug 15 '17 22:08 eric-radiant

Totally agree. I published a package that solves this issue: batched-stream

roccomuso avatar Jul 17 '18 10:07 roccomuso

I think it already does https://github.com/segmentio/batch-stream/blob/master/lib/index.js#L38?

richardscarrott avatar Nov 29 '19 16:11 richardscarrott

I think it already does https://github.com/segmentio/batch-stream/blob/master/lib/index.js#L38?

When I initially reported the issue, it was not working like I expected as far as I can recall. The file was last modified before I opened the issue. So either it is not fixed, or I reported something incorrectly 😅

I think I should provide a test case for that :)

bobylito avatar Dec 06 '19 11:12 bobylito

I think I should provide a test case for that :)

On the other hand, is it even worth it? There is a PR hanging sincw 2014 😅

bobylito avatar Dec 06 '19 11:12 bobylito