klam-shop commented on code in PR #109:
URL: 
https://github.com/apache/flink-connector-kafka/pull/109#discussion_r1695244304


##########
flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/DynamicKafkaRecordSerializationSchema.java:
##########
@@ -144,14 +147,36 @@ public void open(
         valueSerialization.open(context);
     }
 
+    private String getTargetTopic(RowData element) {
+        if (topics != null && topics.size() == 1) {
+            // If topics is a singleton list, we only return the provided 
topic.
+            return topics.get(0);
+        }
+        final String topic = readMetadata(element, 
KafkaDynamicSink.WritableMetadata.TOPIC);
+        if (topic == null && topics == null) {

Review Comment:
   For an empty list, all `topic` metadata will not be allowed. Though I'm not 
sure how you'd specify that since `""` -> `null`, I guess the user might 
specify something like `";"` 



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to