Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Won't Do
-
None
-
None
-
None
Description
Currently there is no syntactic sugar for stateful functions in `ConnectedStreams` in Scala.
This makes stateful joins (aka `connect`) more verbose and exposes users to Java interfaces (by requiring a `RichCoMapFunction` implementation to access state in `ConnectedStreams`).
Looking at DriveTribe's codebase, we have implemented ~80% of our ConnectedStreams operators using this `coMapWithState` implementation:
A `coFlatMapWithState` can be trivially implemented on top.
This has been in production for so long I forgot it was our code and not Flink's.
I can easily add it if this is of interest.
I did the work, here is the diff https://github.com/apache/flink/compare/master...ariskk:FLINK-21421