Area: sdk · query — footgun (DX); breaks the zero-config query path on BYOS tables · found via WaveHouse-Stats dogfooding (reproduced live on 71c2dc4)
Expected: wh.from(table).fetch() / .select(…) without an explicit .orderBy() works on any discovered table.
Actual: the SDK query builder injects ORDER BY received_timestamp DESC by default (also the pagination cursor: orderCol = this._state.orderBy[0]?.column ?? "received_timestamp"). On a table without that column it emits invalid SQL → ClickHouse code 47, Unknown expression identifier received_timestamp → HTTP 500. received_timestamp is the WaveHouse-Demo clicks column; for a bring-your-own-schema gateway it shouldn't be a hardcoded default.
Impact (Stats): gh_events uses event_ts (DateTime64), so every default-ordered query 500s naming a column they never referenced — looks like a setup bug. Workaround: always pass .orderBy('event_ts','desc').
Scope (DX): derive the default order/cursor from the table schema (e.g. its ORDER BY key), or make it per-client/per-table configurable; at minimum omit the default ORDER BY when that column isn't present.
Related: SDK epic #194; query-builder restructure #199; the 500-vs-4xx error-semantics issue (filed alongside) masks this as a server error.
From WaveHouse-Stats WAVEHOUSE-FEEDBACK.md dogfooding; reproduced live on dev 71c2dc4, 2026-06-04.
Area: sdk · query — footgun (DX); breaks the zero-config query path on BYOS tables · found via WaveHouse-Stats dogfooding (reproduced live on
71c2dc4)Expected:
wh.from(table).fetch()/.select(…)without an explicit.orderBy()works on any discovered table.Actual: the SDK query builder injects
ORDER BY received_timestamp DESCby default (also the pagination cursor:orderCol = this._state.orderBy[0]?.column ?? "received_timestamp"). On a table without that column it emits invalid SQL → ClickHousecode 47, Unknown expression identifier received_timestamp→ HTTP 500.received_timestampis the WaveHouse-Democlickscolumn; for a bring-your-own-schema gateway it shouldn't be a hardcoded default.Impact (Stats):
gh_eventsusesevent_ts(DateTime64), so every default-ordered query 500s naming a column they never referenced — looks like a setup bug. Workaround: always pass.orderBy('event_ts','desc').Scope (DX): derive the default order/cursor from the table schema (e.g. its
ORDER BYkey), or make it per-client/per-table configurable; at minimum omit the defaultORDER BYwhen that column isn't present.Related: SDK epic #194; query-builder restructure #199; the 500-vs-4xx error-semantics issue (filed alongside) masks this as a server error.
From WaveHouse-Stats
WAVEHOUSE-FEEDBACK.mddogfooding; reproduced live on dev71c2dc4, 2026-06-04.