Re: to join or not to join, that is the question...

2021-11-08 Thread Seth Wiesman
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

Re: to join or not to join, that is the question...

2021-11-05 Thread Marco Villalobos
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

Re: to join or not to join, that is the question...

2021-11-05 Thread Timo Walther
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

Re: to join or not to join, that is the question...

2021-11-05 Thread Dario Heinisch
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

to join or not to join, that is the question...

2021-11-05 Thread Marco Villalobos
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?