v.23.4Improvement

In AggregateFunction types, exclude unused arena bytes from read_bytes

In AggregateFunction types, don't count unused arena bytes as read_bytes. #48745 (Raúl Marín).
Exclude unused arena bytes from read_bytes metric in AggregateFunction types.

Why it matters

Currently, the read_bytes metric in AggregateFunction types counts all arena bytes allocated, including those unused, which can inflate the reported data read size. This change ensures that only actually used bytes are counted, providing more accurate resource usage statistics.

How to use it

This improvement is applied internally to AggregateFunction types and requires no user configuration. Users will automatically see corrected read_bytes values when monitoring query resource consumption.