AHeise commented on a change in pull request #17870:
URL: https://github.com/apache/flink/pull/17870#discussion_r758107290



##########
File path: 
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/sink/TopicSelector.java
##########
@@ -18,14 +18,12 @@
 package org.apache.flink.connector.kafka.sink;
 
 import org.apache.flink.annotation.PublicEvolving;
-
-import java.io.Serializable;
-import java.util.function.Function;
+import org.apache.flink.util.function.SerializableFunction;
 
 /**
  * Selects a topic for the incoming record.
  *
  * @param <IN> type of the incoming record
  */
 @PublicEvolving
-public interface TopicSelector<IN> extends Function<IN, String>, Serializable 
{}
+public interface TopicSelector<IN> extends SerializableFunction<IN, String> {}

Review comment:
       This is a probably breaking change (just double check if user code is 
affected or not). Since this PR is aimed as a bugfix to 1.14.0, I'd remove it 
for now. Please also double-check the other migrations.
   
   In general, I think that `TopicSelector` should not have inherited from 
`Function` to begin with. :/

##########
File path: 
flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/ReducingUpsertWriterTest.java
##########
@@ -320,8 +319,8 @@ public void registerProcessingTimer(
                             long time, ProcessingTimeCallback 
processingTimerCallback) {}
                 },
                 enableObjectReuse
-                        ? typeInformation.createSerializer(new 
ExecutionConfig())::copy
-                        : Function.identity());
+                        ? r -> typeInformation.createSerializer(new 
ExecutionConfig()).copy(r)

Review comment:
       You can revert that line as well. 




-- 
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]


Reply via email to