Search code examples
apache-flinkflink-streaming

Is the output stream of a keyedstream after passing through a connect with a broadcast stream keyed?


Is the output stream of a keyedstream after passing through a connect with a broadcast stream and then through process function still be a keyed stream?


Solution

  • No, it's not.

    The keys for keyed streams are not attached to the stream records or the stream partitions, but instead the key selector function that computes the keys is used wherever needed. This is why operators that produce entirely new stream records, such as windows and process functions, do not emit keyed streams. In general, the output of a process function may bear no resemblance to the input, so the original key selector function no longer applies.