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



##########
File path: 
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicTableFactory.java
##########
@@ -224,7 +224,7 @@ public DynamicTableSink createDynamicTableSink(Context 
context) {
                 keyProjection,
                 valueProjection,
                 keyPrefix,
-                tableOptions.get(TOPIC).get(0),
+                tableOptions.getOptional(TOPIC).isPresent() ? 
tableOptions.get(TOPIC).get(0) : null,

Review comment:
       @twalthr , this list couldn't be empty because this case is checked in 
`KafkaOptions#validateSinkTopic` method.




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