kafka-connect-transform-common
kafka-connect-transform-common copied to clipboard
ExtractNestedField's output.field.name not working
Playing around with the ExtractNestedFieldTest - more specifically: changing the output field name - showed a little bug. The inner.field.name is always used.
Cause of this are two 'typos' ExtractNestedField (line 74): builder.field(this.config.innerFieldName, innerField.schema()); should be builder.field(this.config.outputFieldName, innerField.schema());
and
ExtractNestedField (line 83): outputStruct.put(this.config.innerFieldName, innerFieldValue); should be outputStruct.put(this.config.outputFieldName, innerFieldValue);
These line references are slightly cumbersome, but I'm sure it should not be hard to trace the cause of this behaviour.
Just faced the same problem; would be great to have a fix for this.