There is no such restriction on connected streams; either input may modify
the keyed state. Regarding performance, the difference between the two
should be negligible and I would go with the option with the cleanest
semantics. If both streams are the same type *and* you do not care which
input an e
In my situation, the streams are of the same type, which means union is an
option.
However, will creating new stream with union perform more slowly than
processing connected streams?
I want to use the option that performs better.
The logic on the data is actually very simple. But both streams w
Union can be an option if you want to unify the streams first and then
apply a key by on the common stream.
Otherwise connect() is the way to go. See an example for joining here:
https://github.com/twalthr/flink-api-examples/blob/main/src/main/java/com/ververica/Example_06_DataStream_Join.java
Union creates a new stream containing all elements of the unioned
streams:
https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/dev/datastream/operators/overview/#union
On 05.11.21 14:25, Marco Villalobos wrote:
Can two different streams flow to the same operator (an operator with
t
Can two different streams flow to the same operator (an operator with the
same name, uid, and implementation) and then share keyed state or will that
require joining the streams first?