AHeise commented on a change in pull request #16142:
URL: https://github.com/apache/flink/pull/16142#discussion_r659735774
##########
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:
Here at this place, you could use `unspecified!` instead of null. Then
you don't need to change anything in the `KafkaProducer`. If you use a special
character like `!`, this will fail hard if the user row does not specify the
column.
--
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]