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


##########
flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/KafkaDynamicSource.java:
##########
@@ -623,6 +625,42 @@ public Object read(ConsumerRecord<?, ?> record) {
                     }
                 }),
 
+        /**
+         * Wire-faithful alternative to {@code headers}: preserves duplicate 
keys and insertion
+         * order using {@code ARRAY<ROW<key STRING, value BYTES>>} instead of 
a lossy MAP.
+         */
+        MULTI_HEADERS(
+                "multi-headers",

Review Comment:
   My favorite version was `header-list` but we also had `headers-list` (your 
proposal) and `headers-raw` in discussion. As always: names are hard so I 
appreciate feedback. Here is an AI summary:
   
   - header-list — singular header matches Kafka's own Header Java type; -list 
signals an ordered, duplicate-allowing sequence. Pro: unambiguous item-type 
semantics, follows hyphen convention. Con: visually disconnected from the 
existing headers
     key.  
   - headers-list — pairs directly with headers, making the relationship 
obvious. Pro: clear pairing, hyphen convention. Con: encodes structure ("list") 
in the key name; plural root still suggests MAP-like semantics.
   - headers-raw — "raw" signals the lossless, wire-faithful representation vs. 
the lossy MAP projection (duplicate keys collapsed, order lost). Pro: 
semantically precise. Con: "raw" isn't established in the Flink connector 
vocabulary.
   - multi-headers (chosen) — the prefix multi- directly conveys what is new: 
multiple headers per key are preserved. Reads naturally alongside headers 
without encoding implementation detail.
   



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