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



##########
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:
       @AHeise , if the user doesn't define the `TOPIC` table option, the value 
of `defaultTopicId` in the constructor is null and the value of 
`defaultTopicId` is depended on the `getTargetTopic`. the return value of 
`getTargetTopic` is depended on the value of `TOPIC` metadata column, and 
@twalthr mentioned that If `TOPIC` option is not defined any value is supported 
in the metadata column. For @AHeise 's opinion, if `TOPIC` option is not 
defined and the value of `TOPIC` metadata column is null, the `defaultTopicId` 
should be a default value like `unspecified`, right?




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