Map attribute columns are labelled `arrayElement(LogAttributes, 'key')` in the results table instead of the field name
Selecting a map attribute as a column labels it with the raw ClickHouse function form. A user who adds LogAttributes['constructor.index_builder_ac_res_id'] gets a results-table header reading:
arrayElement(LogAttributes, 'constructor.index_builder_ac_res_id')At our column widths that header is wider than the value it sits over, and several such columns make the table unreadable. The same string shows up in the SELECT box and in chart legends.
Cause. The generated SQL emits the subscript expression with no alias, so ClickHouse names the result column with the canonical function form. That naming is ClickHouse behaviour, not a bug — it happens for any unaliased Map subscript:
DESCRIBE (SELECT LogAttributes['constructor.index_builder_ac_res_id'],
ResourceAttributes['service.name']
FROM otel.otel_logs LIMIT 0)arrayElement(LogAttributes, 'constructor.index_builder_ac_res_id') String
arrayElement(ResourceAttributes, 'service.name') StringExpected. The column is labelled with the field name the user picked — constructor.index_builder_ac_res_id, or LogAttributes.constructor.index_builder_ac_res_id if the prefix is wanted for disambiguation. Adding AS to the generated select is enough; the display name is already known at the point the SQL is built.
Environment. ClickHouse Cloud 26.4.1.2212, Map(LowCardinality(String), String) attribute columns, standard OTel logs schema.
Source: hyperdxio/hyperdx