In case you pass array in VALUES section (ValuesBlockInputFormat), it
will be copied after it had been created.
This is not significant if array is small, however if you have huge
enough array, then this can become significant (especially for array of
bool, since for each element will be used Field anyway, and it's size is
56 byte).
Here is a simple reproducer:
$ curl -sS 'http://127.1:8123/?input_format_values_deduce_templates_of_expressions=0' -d@- <<<"insert into function null('_ Int') values (length([0,$(yes 1, | head -n2000000 | tr -d '\n')1]))"
But note, that there is lots of work (evalute constant expressions from #6781)
after parsing collection, and so total memory usage for query does not
changed a lot (hence - no test).
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>