Row details panel hides MATERIALIZED and ALIAS columns because it runs SELECT *
What happened?
The row details panel does not show any MATERIALIZED or ALIAS columns. It fetches the row with SELECT *, and ClickHouse leaves those two column kinds out of * by default. So the panel shows only the plain columns.
The stock otel_logs schema already hits this: its 8 __hdx_materialized_* columns and 3 *AttributeItems ALIAS columns never appear. On a table where we added our own columns, the panel shows 16 of 48 and hides 32. For MATERIALIZED columns copied straight from a map key, you can still find the value in LogAttributes or ResourceAttributes. For computed columns (casts, multiIf, dictionary lookups in an ALIAS), the panel has no way to show the value. Users read this as missing data.
Expected: the row details panel shows every column the table has, including MATERIALIZED and ALIAS columns.
Steps to reproduce
- Use the default
otel_logsschema, or add a column to it:ALTER TABLE otel_logs ADD COLUMN HttpStatusCode UInt16 MATERIALIZED toUInt16OrZero(LogAttributes['http.response.status_code']); ALTER TABLE otel_logs ADD COLUMN StatusClass String ALIAS multiIf(HttpStatusCode >= 500, '5xx', HttpStatusCode >= 400, '4xx', 'other'); - Send a few log lines, then open the Logs source in Search.
- Click a row to open the details panel.
HttpStatusCode,StatusClass,__hdx_materialized_k8s.*andLogAttributeItemsare not listed.SELECT HttpStatusCode, StatusClass FROM otel_logs LIMIT 1returns them fine.
How are you running HyperDX?
ClickStack Cloud. The code path is the same on main at 6767349.
Where does it show up?
UI: Search page, row details side panel (any browser).
Logs
None. The query succeeds. It just doesn't ask for these columns. The panel sends:
SELECT *, Timestamp AS __hdx_timestamp, ... FROM <db>.otel_logs WHERE ...Root cause
useRowDataselectsknownColumnsListExpression || '*': DBRowDataPanel.tsx#L89-L103- The query sets neither
asterisk_include_materialized_columnsnorasterisk_include_alias_columns. Neither setting appears anywhere underpackages/. - The default schema ships columns that
*skips: 00002_otel_logs.sql#L20-L30
The only workaround is to list every column in the source's "known columns" field (LogTableModelForm.tsx#L258). That field is meant for Distributed/Merge tables, and you have to keep it in sync by hand whenever the schema changes.
Suggested fix
Either of these would work:
- Pass
asterisk_include_materialized_columns=1andasterisk_include_alias_columns=1as query settings on the row data query. This is the smallest change. ALIAS columns are computed at read time, so this adds some cost for one row, and a Distributed/Merge table may need the same care that the known-columns path already takes. - Build the select list from the table metadata HyperDX already loads (
default_typeis read incommon-utils/src/core/metadata.ts), so every column is named explicitly.
It may also help to group or label MATERIALIZED and ALIAS columns in the panel, so the __hdx_materialized_* copies don't crowd out the rest.
Related: #1400 (the same SELECT * query runs twice when the panel opens).
Source: hyperdxio/hyperdx