Clarifying GroupBy Documentation


(Maatary) #1

Hi There, trying to understand the doc of groupBy it seems that it need to be re-written a bit better. In the mean time i have the following questions on the documentation:

emits an element for which the grouping function returns a group that has not yet been created. Emits the new group there is an element pending for a group whose substream backpressures completes when upstream completes (Until the end of stream it is not possible to know whether new substreams will be needed or not)

In particular what does this means:

Emits the new group there is an element pending for a group whose substream backpressures
???

When we talk about Complete, are we talking about completing individual sub-streams, or completing the all set of sub-streams ?

Please i hope you can help clarify that


(Martynas Mickevičius) #2

Hi,

when it comes to completion, individual substreams are completed. Then it depends what is being done with those substreams. If they are merged back to a single stream, it is completed as a result of that. You can think of completion propagation similar to element propagation, but it can overtake elements in the stream.