Details
Description
When applying the InsertField transformation to a tombstone event, an exception is raised:
org.apache.kafka.connect.errors.DataException: Only Map objects supported in absence of schema for [field insertion], found: null at org.apache.kafka.connect.transforms.util.Requirements.requireMap(Requirements.java:38) at org.apache.kafka.connect.transforms.InsertField.applySchemaless(InsertField.java:138) at org.apache.kafka.connect.transforms.InsertField.apply(InsertField.java:131) at org.apache.kafka.connect.transforms.InsertFieldTest.tombstone(InsertFieldTest.java:128)
AFAICS, the transform can still be made working in in this case by simply building up a new value map from scratch.
Update as per the discussion in the comments: tombstones should be left as-is by this SMT, as any insertion would defeat their purpose of enabling log compaction.
Attachments
Attachments
Issue Links
- is fixed by
-
KAFKA-9707 InsertField.Key transformation should apply to tombstone records
- Resolved
- relates to
-
KAFKA-7052 ExtractField SMT throws NPE - needs clearer error message
- Resolved
- links to