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



##########
File path: 
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer.java
##########
@@ -216,7 +216,7 @@
     protected final Properties producerConfig;
 
     /** The name of the default topic this producer is writing data to. */
-    protected final String defaultTopicId;
+    @Nullable protected String defaultTopicId;

Review comment:
       I don't understand why we need to make default topic nullable. We could 
just set "unspecified" on table API if there is no other value. Potentially add 
some special character that kafka doesn't support to make sure writing fails.
   As is, we change quite a bit of API and semantics and introduce new bugs 
(there is no guard against `defaultTopicId = null` and `getTargetTopic = null`).
   Another idea would be to explicitly support default topic option with said 
default value.  




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to