AHeise commented on code in PR #258:
URL: 
https://github.com/apache/flink-connector-kafka/pull/258#discussion_r3318947131


##########
flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/DynamicKafkaRecordSerializationSchema.java:
##########
@@ -285,4 +289,14 @@ private <T> T readMetadata(RowData consumedRow, 
KafkaDynamicSink.WritableMetadat
         }
         return (T) metadata.converter.read(consumedRow, pos);
     }
+
+    private static @Nullable List<Header> resolveHeaders(
+            @Nullable List<Header> mapHeaders, @Nullable List<Header> 
arrayHeaders) {
+        if (mapHeaders != null && arrayHeaders != null) {
+            throw new IllegalStateException(

Review Comment:
   What do you suggest the semantics are? The user both wrote header and 
multi-header entries. Shall we simply concat?
   
   I'd rather fail here: the user would need to choose between those two 
METADATA column for write, the other may remain available as a VIRTUAL METADATA 
column for read.
   
   If we merge the entries, stuff becomes asymmetric. If you have a header 
[k1->v1], you'd end up with 1 entry in both METADATA on read side. If you 
forward the record, you end up with two entries [k1->v1, k1->v1].



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

Reply via email to