Yash Mayya created KAFKA-14162:
----------------------------------
Summary: HoistField SMT should not return an immutable map for
schemaless key/value
Key: KAFKA-14162
URL: https://issues.apache.org/jira/browse/KAFKA-14162
Project: Kafka
Issue Type: Improvement
Components: KafkaConnect
Reporter: Yash Mayya
The HoistField SMT currently returns an immutable map for schemaless keys and
values -
https://github.com/apache/kafka/blob/22007fba7c7346c5416f4db4e104434fdab265ee/connect/transforms/src/main/java/org/apache/kafka/connect/transforms/HoistField.java#L62.
This can cause issues in connectors if they attempt to modify the
SourceRecord's key or value since Kafka Connect doesn't document that these
keys/values are immutable. Furthermore, no other SMT does this.
An example of a connector that would fail when schemaless values are used with
this SMT is Microsoft's Cosmos DB Sink Connector -
https://github.com/microsoft/kafka-connect-cosmosdb/blob/368566367a1dcbf9a91213067f1b9219a530bb16/src/main/java/com/azure/cosmos/kafka/connect/sink/CosmosDBSinkTask.java#L123-L130
--
This message was sent by Atlassian Jira
(v8.20.10#820010)