Minor changes
- 872713e
buildClientContractno longer advertiseshavingpredicates or a per-requesttimezoneby default. They are off unless the host's route passes them through to the data plane: a route that builds its operation from a fixed list of fields drops them, so a generated client could send them and get unfiltered rows. Hosts that pass them through opt in withcapabilities: { having: true, timezone: true }.Both flags are part of each endpoint's hashed schema, so upgrading moves the
schemaHashof every endpoint with a time field or a numeric measure. Regenerate clients (hypequery generate:client) after upgrading; until thengenerate:client --checkreports drift, and a host that validates requests against the new contract refuses an old client'stimezoneinstead of ignoring it. - b99de97
Type dimension values in dataset and metric result rows (
DatasetRow,DatasetRowFor,MetricRow,MetricRowFor, and the results ofcreateDatasetClient(...).execute()) as what queries actually return. Numeric dimensions are nownumber | string | null, because the built-in ClickHouse adapter returnsInt64,UInt64and wider integers as JSON strings to keep their precision. Every dimension, andperiod, also includesnull, becauseNullablecolumns return SQL NULL. A newDimensionResultValue<T>type describes these values;@hypequery/servere-exports it.InferDimensionTypeis unchanged and still describes a dimension's declared type.This is a breaking type change. Code that read a numeric dimension as
number, or any dimension orperiodwithout handlingnull, now fails to compile. Convert withNumber(value)orBigInt(value)as needed, and check fornull. - 3bb485c
Stream dataset and metric results.
createDatasetClient(...).stream(target, query, context)returns{ data, meta }, wheredatais aReadableStreamof row batches with the same row types and wire values asexecute(), so memory stays flat however many rows there are.streamArrow(target, query, context)returns the result as Arrow IPC stream bytes with native column types. Both apply the same validation and tenant scoping asexecute(). Their row ceiling islimits.maxResultSize, or the newlimits.maxStreamRowswhere a dataset declares one, so exports can be allowed more rows than pages and agents;meta.resultLimitreports when the ceiling bounded a query. Streams skip the result cache and report no pagination. They need@hypequery/clickhouse2.15.0 or later; the query builder protocol gains optionalstream,streamArrow,rawStreamandrawArrowStreammethods. - ae3a5fd
Add
buildDatasetClientContract(endpoints, { mountPath }). It builds an RFC 0018 client contract from dataset definitions and metrics. It mirrors Python'sexport_client_contract, so an equivalent definition exports the same contract in both languages.
Patch changes
- 8d02067
Client contracts built from a deployment keep
isNullandisNotNullon boolean filters that allow them, as RFC 0023 specifies. They were previously dropped, so a boolean filter allowing only null checks disappeared from the contract. - 4c7cc13
A relationship join to a resolved (
FINAL) target whose deleted column is named_hq_matchno longer drops every target row: the join's match marker now avoids the current-row column's name. - d8829e6
Portable semantic queries accept
havingandtimezone(RFC 0025), so a host running through the semantic data plane can execute what the MCPquery_datasettool and client contracts already advertise.@hypequery/protocol:validateProtocolSemanticQueryacceptshaving(dataset queries; each condition names a selected measure, with a numeric comparison) andtimezone(RFC 0018's pinned registry) under extensions 1 and 2. NewProtocolHavingConditionandProtocolHavingComparisonOperatortypes. Cache preimages refuse a non-emptyhavingor a non-UTCtimezonerather than leave them out of the key;"UTC"normalizes as if absent, so no existing preimage changes.@hypequery/deployment: the semantic data plane countshavingconditions againstmaxFilterstogether with filters and enforced constraints, refuses atimezoneon a dataset with no visible time field, and refuseshavingon a hidden measure exactly as it refuses selecting one.@hypequery/datasets: the portable executor passeshavingandtimezoneto the dataset client.
- 5537990
Sub-day window and shift queries run on ClickHouse 25.x. The time-column type check selected an empty row tuple as a scalar, which servers before 26 refuse; it now selects the time element.