Currently KTable.toStream does not take any parameters and hence users who wants to set the key need to do two steps:
in order to do so. We can make it in one step by providing the mapper parameter in toStream.
And similarly today users usually need to call
in order to select the key before aggregation-by-key operation if the original stream is does not contain keys.
We can consider adding a specific function in KStream to do so:
which essential is the same as