logstash-filter-mutate icon indicating copy to clipboard operation
logstash-filter-mutate copied to clipboard

Merging Multiple Fields Fails

Open TotalKnob opened this issue 1 year ago • 0 comments

The merge mutation accepts an array of source fields to merge into a single destination field. However, this functionality is broken for an array of source fields with size >1. This is due to the merge function overwriting the destination field by the original destination field plus one field out of the array during each iteration, whereas the expected behavior is to merge all fields into the destination one after the other.

Steps to reproduce: mutate { merge => [ "list", [ "foo", "spam" ] ] } This produces the result ["list", "spam"] whereas the expected result would be ["list", "foo", "spam"]

TotalKnob avatar May 26 '23 13:05 TotalKnob