Github user aljoscha commented on the issue:
https://github.com/apache/flink/pull/2982
@chenqin
I rebased and consolidated your PR a bit and played around with the APIs.
Some of the changes:
- Separation into internal changes/window operator changes and
user-function changes. I have a prototype commit that exposes side outputs
using `ProcessFunction`.
- I removed `CollectorWrapper`/`RichCollector` in favour of the
`ProcessFunction` approach
- The internal implementation now doesn't store the `OutputTag` on the
`StreamRecord` but instead adds an additional method on `Output` that should be
used for emitting data to a side output. Side outputs now also work with
chaining.
- `WindowedStream` is changed to add a `sideOutputLateData()` method that
is used to specify that late data side output is required. This is more general
than putting it into the method signature of `apply()` because it will simply
work for all different window types.
I quickly talked to @StephanEwen and we agreed that we need to further
think about how we want to expose side outputs for user-defined functions.
Especially, we have to think about what this addition means for the
`split()`/`select()` pattern. I will also do another change where
`sideOutputLateData()` is not required but instead will be added when the
late-date stream is requested.
What do you think?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---