kafka-connect-transform-common icon indicating copy to clipboard operation
kafka-connect-transform-common copied to clipboard

ExtractNestedField's output.field.name not working

Open LeonardoBonacci opened this issue 5 years ago • 1 comments

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.

LeonardoBonacci avatar Sep 06 '20 23:09 LeonardoBonacci

Just faced the same problem; would be great to have a fix for this.

typhoon2k avatar Sep 24 '21 10:09 typhoon2k