You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Chris Egerton (Jira)" <ji...@apache.org> on 2022/08/23 14:21:00 UTC

[jira] [Updated] (KAFKA-14162) HoistField and MaskField SMTs should not return immutable maps/lists

     [ https://issues.apache.org/jira/browse/KAFKA-14162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Egerton updated KAFKA-14162:
----------------------------------
    Summary: HoistField and MaskField SMTs should not return immutable maps/lists  (was: HoistField SMT should not return an immutable map for schemaless key/value)

> HoistField and MaskField SMTs should not return immutable maps/lists
> --------------------------------------------------------------------
>
>                 Key: KAFKA-14162
>                 URL: https://issues.apache.org/jira/browse/KAFKA-14162
>             Project: Kafka
>          Issue Type: Improvement
>          Components: KafkaConnect
>            Reporter: Yash Mayya
>            Assignee: Yash Mayya
>            Priority: Minor
>
> 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)