Description
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
Attachments
Issue Links
- links to