You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Map attribute columns are labelled arrayElement(LogAttributes, 'key') in the results table instead of the field name #3095
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:
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:
Expected. 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.
Thanks for reporting @tefimov. Agreed that it would be nicer to have just the property name as the column header by default, and that adding AS "<property>" would be the way to do this. We can probably generate the aliases when updating the query, we'll just need to be careful with quoting and escaping. We'll add this to the backlog, and would welcome external contributions.
Activity
pulpdrew commentedon Sep 8, 2026
Thanks for reporting @tefimov. Agreed that it would be nicer to have just the property name as the column header by default, and that adding
AS "<property>"would be the way to do this. We can probably generate the aliases when updating the query, we'll just need to be careful with quoting and escaping. We'll add this to the backlog, and would welcome external contributions.fix: label Map attribute columns by their key instead of arrayElement…