問題文
A grouping must collect one field of each element instead of the whole element. Which downstream collector expresses that?
選択肢
- flatMapping, because it is the only downstream collector that can change the type of the elements that reach the collector placed after it in the chain of collectors.
- A map step placed before the grouping in the pipeline itself, and an already converted value then reaches whichever classifier is used.
- filtering, because it also takes a function and applies it to each element of the group before handing the result over to the collector that comes after it in the chain.
- mapping, which applies a function to each element and then passes the results on to another downstream collector.