Github user XuPingyong commented on the issue:
https://github.com/apache/flink/pull/2110
I do not agree with this pr as it always copy StreamRecord to downstream
operator.
StreamMap change the input StreamRecord, so this pr works well. But many
operators do not change/reuse the input StreamRecord, like StreamFlatMap.
The following code no not need the extra copy.
`DataStream<A> input = ...
input
.flatmap(FlatMapFunction<A,B>...)
.addSink(...);
input
.flatmap(FlatMapFunction<A,C>...)
â.addSink(...);`
So I think we can change StreamMap to not reuse the input StreamRecord.
And directly send the StreamRecord if objectReuse is set true.
What do you think?
---