SteNicholas commented on a change in pull request #16142:
URL: https://github.com/apache/flink/pull/16142#discussion_r659774179
##########
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:
@AHeise , I agree with this approach but I'm confused about why not this
uses null? I don't understand the difference between `unspecified!` and null.
##########
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:
@AHeise , I agree with this approach but I'm confused about why not this
uses null? I don't understand the difference between `unspecified!` and null.
--
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]