AHeise commented on a change in pull request #17870:
URL: https://github.com/apache/flink/pull/17870#discussion_r757293064
##########
File path:
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/ReducingUpsertSink.java
##########
@@ -96,4 +97,6 @@
public Optional<SimpleVersionedSerializer<Void>>
getGlobalCommittableSerializer() {
return Optional.empty();
}
+
+ interface ValueCopyFunction<INPUT, OUTPUT> extends Function<INPUT,
OUTPUT>, Serializable {}
Review comment:
You could use `SerializableFunction`.
##########
File path:
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSink.java
##########
@@ -227,11 +226,13 @@ public SinkRuntimeProvider getSinkRuntimeProvider(Context
context) {
keyProjection,
flushMode,
objectReuse
- ? createRowDataTypeSerializer(
- context,
-
dataStream.getExecutionConfig())
- ::copy
- : Function.identity());
+ ? (rowData) ->
+
createRowDataTypeSerializer(
+
context,
+
dataStream
+
.getExecutionConfig())
+ .copy(rowData)
Review comment:
Afaik a method lambda should also work (if not I'm happy to learn that
;)), so you wouldn't need to change that part.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]