@hypequery/protocol-conformance 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"generators.d.ts","sourceRoot":"","sources":["../../src/adapters/generators.ts"],"names":[],"mappings":"AAIA,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAkBpC,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAuC1D;AAID,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAMxD;AAMD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAoCzD;AAID,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CA2BrD;AAgBD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAuB7D;AA4CD,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAsFjE;AAkBD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAyBpD;AAeD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAoB1D;AAmBD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAmBrD;AAaD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAgBtD"}
1
+ {"version":3,"file":"generators.d.ts","sourceRoot":"","sources":["../../src/adapters/generators.ts"],"names":[],"mappings":"AAIA,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAkBpC,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAuC1D;AAID,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAMxD;AAMD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CA0CzD;AAID,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CA2BrD;AAgBD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAuB7D;AA4CD,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAsFjE;AAkBD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAyBpD;AAeD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAoB1D;AAmBD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAmBrD;AAaD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAgBtD"}
@@ -89,6 +89,12 @@ export function materializeExpression(spec) {
89
89
  operands: Array.from({ length: groupIndex === 9 ? spec.lastGroupItems : 100 }, () => ({ ...EXPR_LITERAL })),
90
90
  })),
91
91
  };
92
+ case 'segments':
93
+ return {
94
+ kind: 'dataset',
95
+ dataset: 'orders',
96
+ segments: Array.from({ length: spec.count }, (_, index) => `s${index}`),
97
+ };
92
98
  case 'unsafe-accessor': {
93
99
  const value = { kind: 'reference' };
94
100
  Object.defineProperty(value, 'name', { enumerable: true, get: () => 'orders' });
@@ -9,7 +9,7 @@ export declare const REFERENCE_HOSTILE_OBJECT_SUITE: {
9
9
  readonly count: 7;
10
10
  readonly mechanisms: readonly ["getter", "toJSON", "proxy", "custom-prototype", "symbol-key", "sparse-array", "cycle"];
11
11
  };
12
- export declare const REFERENCE_FAMILIES: readonly ["cache-keys-v1", "tagged-values-v1", "identifiers-v1", "expressions-v1", "query-schemas-v1", "query-implementations-v1", "query-events-v1", "query-diagnostics-v1", "deployments-v2", "deployment-bundles-v1", "deployment-releases-v1", "semantic-invocations-v1"];
12
+ export declare const REFERENCE_FAMILIES: readonly ["cache-keys-v1", "tagged-values-v1", "identifiers-v1", "expressions-v1", "expressions-v2", "query-schemas-v1", "query-implementations-v1", "query-events-v1", "query-diagnostics-v1", "deployments-v2", "deployments-v3", "deployment-bundles-v1", "deployment-releases-v1", "semantic-invocations-v1", "semantic-invocations-v2"];
13
13
  export declare function referenceHandle(family: string, role: FixtureRole, c: Case, section?: string): HandlerResult;
14
14
  export {};
15
15
  //# sourceMappingURL=reference.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../src/adapters/reference.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAc9D,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AA0BpC;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;;CAWjC,CAAC;AAEX,eAAO,MAAM,kBAAkB,+QAarB,CAAC;AAEX,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,WAAW,EACjB,CAAC,EAAE,IAAI,EACP,OAAO,CAAC,EAAE,MAAM,GACf,aAAa,CAsCf"}
1
+ {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../src/adapters/reference.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAc9D,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AA0BpC;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;;CAWjC,CAAC;AAEX,eAAO,MAAM,kBAAkB,8UAgBrB,CAAC;AAEX,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,WAAW,EACjB,CAAC,EAAE,IAAI,EACP,OAAO,CAAC,EAAE,MAAM,GACf,aAAa,CA4Cf"}
@@ -2,7 +2,7 @@
2
2
  // root export of @hypequery/protocol and returns a wire result. Every operation
3
3
  // goes through the package's supported surface — this is exactly what a second
4
4
  // implementation must reproduce.
5
- import { decodeCanonicalValue, deriveProtocolCacheKey, deriveProtocolCacheNamespaceToken, encodeCanonicalValue, hashCanonicalValue, parseProtocolIdentifier, parseProtocolQualifiedIdentifier, prepareProtocolDeploymentBundleManifest, prepareProtocolDeploymentContract, prepareProtocolDeploymentReleaseEnvelope, splitProtocolQualifiedIdentifier, validateCanonicalValue, validateProtocolDeploymentBundleManifest, validateProtocolDeploymentContract, validateProtocolDeploymentReleaseEnvelope, validateProtocolExpression, validateProtocolQueryDiagnostics, validateProtocolQueryEvent, validateProtocolQueryImplementation, validateProtocolSchema, validateProtocolSemanticInvocation, validateProtocolSemanticInvocationFailure, validateProtocolSemanticInvocationResult, validateProtocolSemanticQuery, validateProtocolSqlExpression, } from '@hypequery/protocol';
5
+ import { decodeCanonicalValue, deriveProtocolCacheKey, deriveProtocolCacheNamespaceToken, encodeCanonicalValue, hashCanonicalValue, parseProtocolIdentifier, parseProtocolQualifiedIdentifier, prepareProtocolDeploymentBundleManifest, prepareProtocolDeploymentContract, prepareProtocolDeploymentContractV3, prepareProtocolDeploymentReleaseEnvelope, splitProtocolQualifiedIdentifier, validateCanonicalValue, validateProtocolDeploymentBundleManifest, validateProtocolDeploymentContract, validateProtocolDeploymentContractV3, validateProtocolDeploymentReleaseEnvelope, validateProtocolExpression, validateProtocolQueryDiagnostics, validateProtocolQueryEvent, validateProtocolQueryImplementation, validateProtocolSchema, validateProtocolSemanticInvocation, validateProtocolSemanticInvocationFailure, validateProtocolSemanticInvocationResult, validateProtocolSemanticInvocationV2, validateProtocolSemanticQuery, validateProtocolSqlExpression, } from '@hypequery/protocol';
6
6
  import { materializeBundle, materializeDiagnostics, materializeEvent, materializeSemanticInvocation, materializeExpression, materializeIdentifier, materializeImplementation, materializeRelease, materializeSchema, materializeTaggedValue, } from './generators.js';
7
7
  const STABLE_CODE = /^HQ_[A-Z0-9_]+$/;
8
8
  /** Turns a thrown protocol error into a wire rejection; rethrows anything else. */
@@ -47,14 +47,17 @@ export const REFERENCE_FAMILIES = [
47
47
  'tagged-values-v1',
48
48
  'identifiers-v1',
49
49
  'expressions-v1',
50
+ 'expressions-v2',
50
51
  'query-schemas-v1',
51
52
  'query-implementations-v1',
52
53
  'query-events-v1',
53
54
  'query-diagnostics-v1',
54
55
  'deployments-v2',
56
+ 'deployments-v3',
55
57
  'deployment-bundles-v1',
56
58
  'deployment-releases-v1',
57
59
  'semantic-invocations-v1',
60
+ 'semantic-invocations-v2',
58
61
  ];
59
62
  export function referenceHandle(family, role, c, section) {
60
63
  switch (family) {
@@ -63,7 +66,9 @@ export function referenceHandle(family, role, c, section) {
63
66
  case 'identifiers-v1':
64
67
  return handleIdentifier(role, c);
65
68
  case 'expressions-v1':
66
- return handleExpression(role, c, section);
69
+ return handleExpression(role, c, section, 1);
70
+ case 'expressions-v2':
71
+ return handleExpression(role, c, section, 2);
67
72
  case 'query-schemas-v1':
68
73
  return attempt(() => {
69
74
  validateProtocolSchema(validationInput(c, materializeSchema));
@@ -83,12 +88,16 @@ export function referenceHandle(family, role, c, section) {
83
88
  });
84
89
  case 'deployments-v2':
85
90
  return handleDeploymentV2(role, c);
91
+ case 'deployments-v3':
92
+ return handleDeploymentV3(role, c);
86
93
  case 'deployment-bundles-v1':
87
94
  return handleBundle(role, c);
88
95
  case 'deployment-releases-v1':
89
96
  return handleRelease(role, c);
90
97
  case 'semantic-invocations-v1':
91
- return handleSemanticInvocation(c);
98
+ return handleSemanticInvocation(c, 1);
99
+ case 'semantic-invocations-v2':
100
+ return handleSemanticInvocation(c, 2);
92
101
  case 'cache-keys-v1':
93
102
  return handleCacheKey(role, c);
94
103
  default:
@@ -99,9 +108,9 @@ export function referenceHandle(family, role, c, section) {
99
108
  * One family covers the invocation, result, and failure records, so each case
100
109
  * names which one it validates against.
101
110
  */
102
- function handleSemanticInvocation(c) {
111
+ function handleSemanticInvocation(c, version) {
103
112
  const validators = {
104
- invocation: validateProtocolSemanticInvocation,
113
+ invocation: version === 2 ? validateProtocolSemanticInvocationV2 : validateProtocolSemanticInvocation,
105
114
  result: validateProtocolSemanticInvocationResult,
106
115
  failure: validateProtocolSemanticInvocationFailure,
107
116
  };
@@ -185,17 +194,17 @@ function handleIdentifier(role, c) {
185
194
  return ACCEPT;
186
195
  });
187
196
  }
188
- function handleExpression(role, c, section) {
197
+ function handleExpression(role, c, section, extension) {
189
198
  const isQuery = section === '/queries' || c.mode === 'query';
190
199
  const validate = isQuery ? validateProtocolSemanticQuery : validateProtocolExpression;
191
200
  if (role === 'success') {
192
201
  return attempt(() => {
193
- validate(validationInput(c, materializeExpression));
202
+ validate(validationInput(c, materializeExpression), { extension });
194
203
  return ACCEPT;
195
204
  });
196
205
  }
197
206
  return attempt(() => {
198
- validate(validationInput(c, materializeExpression));
207
+ validate(validationInput(c, materializeExpression), { extension });
199
208
  return ACCEPT;
200
209
  });
201
210
  }
@@ -220,6 +229,18 @@ function handleDeploymentV2(role, c) {
220
229
  return ACCEPT;
221
230
  });
222
231
  }
232
+ function handleDeploymentV3(role, c) {
233
+ if (role === 'identity') {
234
+ return attempt(() => {
235
+ const prepared = prepareProtocolDeploymentContractV3(c.value);
236
+ return { ok: true, output: { canonical: prepared.canonical, sha256: prepared.identity } };
237
+ });
238
+ }
239
+ return attempt(() => {
240
+ validateProtocolDeploymentContractV3(c.value);
241
+ return ACCEPT;
242
+ });
243
+ }
223
244
  function handleBundle(role, c) {
224
245
  if (role === 'identity') {
225
246
  return attempt(() => {
@@ -0,0 +1,16 @@
1
+ # Deployment contract v3 fixtures
2
+
3
+ This family accompanies accepted RFC 0015. It covers what deployment contract 3 adds to contract 2:
4
+
5
+ - The dataset filter allow-list is renamed `allowedFilters`, and `filters` is an unknown field.
6
+ - Datasets may carry `segments`. Each predicate compares the dataset's own dimensions with literals, never relationship paths, aggregates, arithmetic, or the tenant field.
7
+ - The `approxCountDistinct` aggregation, with its required `approximate: true` marker. A derived measure carries the marker exactly when a measure it uses is approximate.
8
+ - `window` measures (exactly one of `trailing`, `toDate`, and `cumulative`) and `shift` measures. Each carries `requiresTimeRange: true`, wraps one base measure, needs a dataset `timeField`, and inherits `approximate`. `cumulative` wraps only `sum`, `count`, `min`, or `max`. Derived measures may use them.
9
+ - `minute` and `hour` default grains.
10
+ - The lowest-version rule. A contract 3 envelope that uses none of these features is rejected with `HQ_DEPLOYMENT_INVALID_VERSION`, because it must be published as contract 2.
11
+
12
+ `success.json` holds contracts every implementation must accept. `identity.json` pins the canonical bytes and the SHA-256 over the domain `hypequery:deployment:v3\0` for the success case with the same id. `rejections.json` pins a stable code for each rule. As in contract 2, an embedded expression that fails validation reports `HQ_DEPLOYMENT_INVALID_VALUE` at the field that holds it.
13
+
14
+ The rules that depend on the query grain are consumer checks at query time, not contract rules, so this family does not cover them. These are whole-bucket intervals, `toDate` coarser than the grain, the 1,000-bucket bound, and the required time range.
15
+
16
+ Every case was generated with, and checked against, the TypeScript reference implementation. The Python implementation also passes every case.
@@ -0,0 +1,12 @@
1
+ [
2
+ {"id": "segments", "canonical": "{\"datasets\":[{\"allowedFilters\":[{\"field\":\"status\",\"name\":\"status\",\"operators\":[\"eq\",\"in\"]}],\"dimensions\":[{\"filterable\":true,\"groupable\":true,\"name\":\"tier\",\"source\":{\"column\":\"tier\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"status\",\"source\":{\"column\":\"status\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"amount\",\"source\":{\"column\":\"amount\",\"kind\":\"column\"},\"type\":\"number\"},{\"filterable\":true,\"groupable\":true,\"name\":\"createdAt\",\"source\":{\"column\":\"created_at\",\"kind\":\"column\"},\"type\":\"timestamp\"}],\"measures\":[{\"aggregation\":\"sum\",\"field\":\"amount\",\"filters\":[],\"name\":\"revenue\"}],\"name\":\"orders\",\"relationships\":[],\"segments\":[{\"description\":\"Enterprise-tier customers\",\"name\":\"enterprise\",\"predicate\":{\"kind\":\"comparison\",\"left\":{\"kind\":\"reference\",\"name\":\"tier\"},\"operator\":\"eq\",\"right\":{\"kind\":\"literal\",\"value\":\"enterprise\"}}}],\"source\":\"orders\",\"tenant\":{\"kind\":\"not-required\"}}],\"kind\":\"hypequery-deployment\",\"version\":3}", "sha256": "9b25d42264fc990f597025003b1500e42b23d98e7fab89f5b12849d53f1382d0"},
3
+ {"id": "segment-logical-predicate", "canonical": "{\"datasets\":[{\"allowedFilters\":[{\"field\":\"status\",\"name\":\"status\",\"operators\":[\"eq\",\"in\"]}],\"dimensions\":[{\"filterable\":true,\"groupable\":true,\"name\":\"tier\",\"source\":{\"column\":\"tier\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"status\",\"source\":{\"column\":\"status\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"amount\",\"source\":{\"column\":\"amount\",\"kind\":\"column\"},\"type\":\"number\"},{\"filterable\":true,\"groupable\":true,\"name\":\"createdAt\",\"source\":{\"column\":\"created_at\",\"kind\":\"column\"},\"type\":\"timestamp\"}],\"measures\":[{\"aggregation\":\"sum\",\"field\":\"amount\",\"filters\":[],\"name\":\"revenue\"}],\"name\":\"orders\",\"relationships\":[],\"segments\":[{\"name\":\"bigPaid\",\"predicate\":{\"kind\":\"logical\",\"operands\":[{\"kind\":\"comparison\",\"left\":{\"kind\":\"reference\",\"name\":\"status\"},\"operator\":\"eq\",\"right\":{\"kind\":\"literal\",\"value\":\"paid\"}},{\"kind\":\"logical\",\"operand\":{\"kind\":\"comparison\",\"left\":{\"kind\":\"reference\",\"name\":\"amount\"},\"operator\":\"lt\",\"right\":{\"kind\":\"literal\",\"value\":100.5}},\"operator\":\"not\"}],\"operator\":\"and\"}}],\"source\":\"orders\",\"tenant\":{\"kind\":\"not-required\"}}],\"kind\":\"hypequery-deployment\",\"version\":3}", "sha256": "34bab49495f1d5323a8649f11bbe3a6a6b744bcf797c66b0a3c769ff3327e8eb"},
4
+ {"id": "segment-on-non-filterable-dimension", "canonical": "{\"datasets\":[{\"allowedFilters\":[],\"dimensions\":[{\"filterable\":true,\"groupable\":true,\"name\":\"status\",\"source\":{\"column\":\"status\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":false,\"groupable\":true,\"name\":\"tier\",\"source\":{\"column\":\"tier\",\"kind\":\"column\"},\"type\":\"string\"}],\"measures\":[{\"aggregation\":\"sum\",\"field\":\"amount\",\"filters\":[],\"name\":\"revenue\"}],\"name\":\"orders\",\"relationships\":[],\"segments\":[{\"description\":\"Enterprise-tier customers\",\"name\":\"enterprise\",\"predicate\":{\"kind\":\"comparison\",\"left\":{\"kind\":\"reference\",\"name\":\"tier\"},\"operator\":\"eq\",\"right\":{\"kind\":\"literal\",\"value\":\"enterprise\"}}}],\"source\":\"orders\",\"tenant\":{\"kind\":\"not-required\"}}],\"kind\":\"hypequery-deployment\",\"version\":3}", "sha256": "73890fd6a0d99f5e0ec0cc903bdb6b2b19f5512aae1daadef94aacb016411f17"},
5
+ {"id": "approx-count-distinct", "canonical": "{\"datasets\":[{\"allowedFilters\":[{\"field\":\"status\",\"name\":\"status\",\"operators\":[\"eq\",\"in\"]}],\"dimensions\":[{\"filterable\":true,\"groupable\":true,\"name\":\"tier\",\"source\":{\"column\":\"tier\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"status\",\"source\":{\"column\":\"status\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"amount\",\"source\":{\"column\":\"amount\",\"kind\":\"column\"},\"type\":\"number\"},{\"filterable\":true,\"groupable\":true,\"name\":\"createdAt\",\"source\":{\"column\":\"created_at\",\"kind\":\"column\"},\"type\":\"timestamp\"}],\"measures\":[{\"aggregation\":\"approxCountDistinct\",\"approximate\":true,\"field\":\"user_id\",\"filters\":[],\"name\":\"activeUsers\"},{\"aggregation\":\"approxCountDistinct\",\"approximate\":true,\"field\":\"user_id\",\"filters\":[{\"kind\":\"comparison\",\"left\":{\"kind\":\"reference\",\"name\":\"status\"},\"operator\":\"eq\",\"right\":{\"kind\":\"literal\",\"value\":\"paid\"}}],\"name\":\"approxActiveFiltered\"}],\"name\":\"orders\",\"relationships\":[],\"segments\":[],\"source\":\"orders\",\"tenant\":{\"kind\":\"not-required\"}}],\"kind\":\"hypequery-deployment\",\"version\":3}", "sha256": "68a24da8b95616ae507577dcbe86340e7a10cab374e926fad8d770b969f66b9f"},
6
+ {"id": "approximate-derived-measure", "canonical": "{\"datasets\":[{\"allowedFilters\":[{\"field\":\"status\",\"name\":\"status\",\"operators\":[\"eq\",\"in\"]}],\"dimensions\":[{\"filterable\":true,\"groupable\":true,\"name\":\"tier\",\"source\":{\"column\":\"tier\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"status\",\"source\":{\"column\":\"status\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"amount\",\"source\":{\"column\":\"amount\",\"kind\":\"column\"},\"type\":\"number\"},{\"filterable\":true,\"groupable\":true,\"name\":\"createdAt\",\"source\":{\"column\":\"created_at\",\"kind\":\"column\"},\"type\":\"timestamp\"}],\"measures\":[{\"aggregation\":\"approxCountDistinct\",\"approximate\":true,\"field\":\"user_id\",\"filters\":[],\"name\":\"activeUsers\"},{\"aggregation\":\"count\",\"field\":\"id\",\"filters\":[],\"name\":\"sessions\"},{\"approximate\":true,\"expression\":{\"kind\":\"binary\",\"left\":{\"kind\":\"reference\",\"name\":\"s\"},\"operator\":\"divide\",\"right\":{\"args\":[{\"kind\":\"reference\",\"name\":\"u\"}],\"function\":\"nullIfZero\",\"kind\":\"call\"}},\"kind\":\"derived\",\"name\":\"sessionsPerUser\",\"uses\":[{\"alias\":\"s\",\"measure\":\"sessions\"},{\"alias\":\"u\",\"measure\":\"activeUsers\"}]}],\"name\":\"orders\",\"relationships\":[],\"segments\":[],\"source\":\"orders\",\"tenant\":{\"kind\":\"not-required\"}}],\"kind\":\"hypequery-deployment\",\"version\":3}", "sha256": "61cfb01782df81e70f2b1ea5c9fe86e214dc292e07f34ba2d989587331c0a28c"},
7
+ {"id": "sub-day-default-grain", "canonical": "{\"datasets\":[{\"allowedFilters\":[{\"field\":\"status\",\"name\":\"status\",\"operators\":[\"eq\",\"in\"]}],\"defaults\":{\"timeGrain\":\"hour\"},\"dimensions\":[{\"filterable\":true,\"groupable\":true,\"name\":\"tier\",\"source\":{\"column\":\"tier\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"status\",\"source\":{\"column\":\"status\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"amount\",\"source\":{\"column\":\"amount\",\"kind\":\"column\"},\"type\":\"number\"},{\"filterable\":true,\"groupable\":true,\"name\":\"createdAt\",\"source\":{\"column\":\"created_at\",\"kind\":\"column\"},\"type\":\"timestamp\"}],\"measures\":[{\"aggregation\":\"sum\",\"field\":\"amount\",\"filters\":[],\"name\":\"revenue\"}],\"name\":\"orders\",\"relationships\":[],\"segments\":[],\"source\":\"orders\",\"tenant\":{\"kind\":\"not-required\"},\"timeField\":\"created_at\"}],\"kind\":\"hypequery-deployment\",\"version\":3}", "sha256": "1451ce592993d8195ceebc82c30659b8b7d7e5d635fe5f8c66dad71975c771c6"},
8
+ {"id": "tenant-dataset-segment", "canonical": "{\"datasets\":[{\"allowedFilters\":[{\"field\":\"status\",\"name\":\"status\",\"operators\":[\"eq\",\"in\"]}],\"dimensions\":[{\"filterable\":true,\"groupable\":true,\"name\":\"tier\",\"source\":{\"column\":\"tier\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"tenantId\",\"source\":{\"column\":\"tenant_id\",\"kind\":\"column\"},\"type\":\"string\"}],\"measures\":[{\"aggregation\":\"sum\",\"field\":\"amount\",\"filters\":[],\"name\":\"revenue\"}],\"name\":\"orders\",\"relationships\":[],\"segments\":[{\"description\":\"Enterprise-tier customers\",\"name\":\"enterprise\",\"predicate\":{\"kind\":\"comparison\",\"left\":{\"kind\":\"reference\",\"name\":\"tier\"},\"operator\":\"eq\",\"right\":{\"kind\":\"literal\",\"value\":\"enterprise\"}}}],\"source\":\"orders\",\"tenant\":{\"field\":\"tenant_id\",\"kind\":\"required\"}}],\"kind\":\"hypequery-deployment\",\"version\":3}", "sha256": "931bc22705679ac4d9ab38d7b805e82cded1a8bce02c22ef6814382e09a3df66"},
9
+ {"id":"window-and-shift-measures","canonical":"{\"datasets\":[{\"allowedFilters\":[{\"field\":\"status\",\"name\":\"status\",\"operators\":[\"eq\",\"in\"]}],\"dimensions\":[{\"filterable\":true,\"groupable\":true,\"name\":\"tier\",\"source\":{\"column\":\"tier\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"status\",\"source\":{\"column\":\"status\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"amount\",\"source\":{\"column\":\"amount\",\"kind\":\"column\"},\"type\":\"number\"},{\"filterable\":true,\"groupable\":true,\"name\":\"createdAt\",\"source\":{\"column\":\"created_at\",\"kind\":\"column\"},\"type\":\"timestamp\"}],\"measures\":[{\"aggregation\":\"sum\",\"field\":\"amount\",\"filters\":[],\"name\":\"revenue\"},{\"kind\":\"window\",\"measure\":\"revenue\",\"name\":\"revenue7d\",\"requiresTimeRange\":true,\"trailing\":{\"amount\":7,\"unit\":\"day\"}},{\"kind\":\"window\",\"measure\":\"revenue\",\"name\":\"revenueMtd\",\"requiresTimeRange\":true,\"toDate\":\"month\"},{\"cumulative\":true,\"kind\":\"window\",\"measure\":\"revenue\",\"name\":\"revenueRunning\",\"requiresTimeRange\":true},{\"interval\":{\"amount\":1,\"unit\":\"year\"},\"kind\":\"shift\",\"measure\":\"revenue\",\"name\":\"revenuePriorYear\",\"requiresTimeRange\":true},{\"expression\":{\"kind\":\"binary\",\"left\":{\"kind\":\"binary\",\"left\":{\"kind\":\"reference\",\"name\":\"now\"},\"operator\":\"subtract\",\"right\":{\"kind\":\"reference\",\"name\":\"before\"}},\"operator\":\"divide\",\"right\":{\"args\":[{\"kind\":\"reference\",\"name\":\"before\"}],\"function\":\"nullIfZero\",\"kind\":\"call\"}},\"kind\":\"derived\",\"name\":\"revenueGrowth\",\"uses\":[{\"alias\":\"now\",\"measure\":\"revenue\"},{\"alias\":\"before\",\"measure\":\"revenuePriorYear\"}]}],\"name\":\"orders\",\"relationships\":[],\"segments\":[],\"source\":\"orders\",\"tenant\":{\"kind\":\"not-required\"},\"timeField\":\"created_at\"}],\"kind\":\"hypequery-deployment\",\"version\":3}","sha256":"0fa473a785d5699f086b3512f7206ec1280dc8aefdbadacf2e3fbb903327a9b7"},
10
+ {"id":"approximate-window","canonical":"{\"datasets\":[{\"allowedFilters\":[{\"field\":\"status\",\"name\":\"status\",\"operators\":[\"eq\",\"in\"]}],\"dimensions\":[{\"filterable\":true,\"groupable\":true,\"name\":\"tier\",\"source\":{\"column\":\"tier\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"status\",\"source\":{\"column\":\"status\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"amount\",\"source\":{\"column\":\"amount\",\"kind\":\"column\"},\"type\":\"number\"},{\"filterable\":true,\"groupable\":true,\"name\":\"createdAt\",\"source\":{\"column\":\"created_at\",\"kind\":\"column\"},\"type\":\"timestamp\"}],\"measures\":[{\"aggregation\":\"approxCountDistinct\",\"approximate\":true,\"field\":\"user_id\",\"filters\":[],\"name\":\"activeUsers\"},{\"approximate\":true,\"kind\":\"window\",\"measure\":\"activeUsers\",\"name\":\"activeUsers7d\",\"requiresTimeRange\":true,\"trailing\":{\"amount\":7,\"unit\":\"day\"}},{\"approximate\":true,\"interval\":{\"amount\":1,\"unit\":\"week\"},\"kind\":\"shift\",\"measure\":\"activeUsers\",\"name\":\"activeUsersLastWeek\",\"requiresTimeRange\":true}],\"name\":\"orders\",\"relationships\":[],\"segments\":[],\"source\":\"orders\",\"tenant\":{\"kind\":\"not-required\"},\"timeField\":\"created_at\"}],\"kind\":\"hypequery-deployment\",\"version\":3}","sha256":"38248c985f7157ec7cf8fbbb1fe8257272e8930033401c18775f4ad8f7a2eb35"},
11
+ {"id":"approx-count-distinct-without-segments","canonical":"{\"datasets\":[{\"allowedFilters\":[{\"field\":\"status\",\"name\":\"status\",\"operators\":[\"eq\",\"in\"]}],\"dimensions\":[{\"filterable\":true,\"groupable\":true,\"name\":\"tier\",\"source\":{\"column\":\"tier\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"status\",\"source\":{\"column\":\"status\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"amount\",\"source\":{\"column\":\"amount\",\"kind\":\"column\"},\"type\":\"number\"},{\"filterable\":true,\"groupable\":true,\"name\":\"createdAt\",\"source\":{\"column\":\"created_at\",\"kind\":\"column\"},\"type\":\"timestamp\"}],\"measures\":[{\"aggregation\":\"approxCountDistinct\",\"approximate\":true,\"field\":\"user_id\",\"filters\":[],\"name\":\"activeUsers\"},{\"aggregation\":\"approxCountDistinct\",\"approximate\":true,\"field\":\"user_id\",\"filters\":[{\"kind\":\"comparison\",\"left\":{\"kind\":\"reference\",\"name\":\"status\"},\"operator\":\"eq\",\"right\":{\"kind\":\"literal\",\"value\":\"paid\"}}],\"name\":\"approxActiveFiltered\"}],\"name\":\"orders\",\"relationships\":[],\"source\":\"orders\",\"tenant\":{\"kind\":\"not-required\"}}],\"kind\":\"hypequery-deployment\",\"version\":3}","sha256":"6759733b17f8901ffe4a0421246406cdfff8c04bad71e989d1d8af1239515ab2"}
12
+ ]
@@ -0,0 +1,36 @@
1
+ [
2
+ {"id": "lowest-version-rule", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_VERSION"},
3
+ {"id": "contract-3-filters-renamed", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "segments": [{"name": "enterprise", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "tier"}, "right": {"kind": "literal", "value": "enterprise"}}, "description": "Enterprise-tier customers"}], "relationships": [], "filters": []}]}, "error": "HQ_DEPLOYMENT_UNKNOWN_FIELD"},
4
+ {"id": "contract-3-shape-under-version-2", "value": {"kind": "hypequery-deployment", "version": 2, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "enterprise", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "tier"}, "right": {"kind": "literal", "value": "enterprise"}}, "description": "Enterprise-tier customers"}], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_VERSION"},
5
+ {"id": "segment-duplicate-name", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "a", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "tier"}, "right": {"kind": "literal", "value": "x"}}}, {"name": "a", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "tier"}, "right": {"kind": "literal", "value": "y"}}}], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_REFERENCE"},
6
+ {"id": "segment-not-predicate", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "a", "predicate": {"kind": "literal", "value": true}}], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
7
+ {"id": "segment-aggregate-predicate", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "a", "predicate": {"kind": "comparison", "operator": "gt", "left": {"kind": "aggregate", "aggregation": "sum", "field": "amount"}, "right": {"kind": "literal", "value": 1.5}}}], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
8
+ {"id": "segment-arithmetic-operand", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "a", "predicate": {"kind": "comparison", "operator": "gt", "left": {"kind": "binary", "operator": "multiply", "left": {"kind": "reference", "name": "amount"}, "right": {"kind": "literal", "value": 2.5}}, "right": {"kind": "literal", "value": 1.5}}}], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
9
+ {"id": "segment-unknown-dimension", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "a", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "region"}, "right": {"kind": "literal", "value": "eu"}}}], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
10
+ {"id": "segment-relationship-reference", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "a", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "customer.tier"}, "right": {"kind": "literal", "value": "x"}}}], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
11
+ {"id": "segment-tenant-dimension", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "required", "field": "tenant_id"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "tenantId", "type": "string", "source": {"kind": "column", "column": "tenant_id"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "a", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "tenantId"}, "right": {"kind": "literal", "value": "t1"}}}], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
12
+ {"id": "segment-unknown-field", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "a", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "tier"}, "right": {"kind": "literal", "value": "x"}}, "sql": "1"}], "relationships": []}]}, "error": "HQ_DEPLOYMENT_UNKNOWN_FIELD"},
13
+ {"id": "approx-missing-marker", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "activeUsers", "aggregation": "approxCountDistinct", "field": "user_id", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
14
+ {"id": "approximate-marker-on-exact", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": [], "approximate": true}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "enterprise", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "tier"}, "right": {"kind": "literal", "value": "enterprise"}}, "description": "Enterprise-tier customers"}], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
15
+ {"id": "approximate-marker-false", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": [], "approximate": false}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "enterprise", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "tier"}, "right": {"kind": "literal", "value": "enterprise"}}, "description": "Enterprise-tier customers"}], "relationships": []}]}, "error": "HQ_DEPLOYMENT_TYPE"},
16
+ {"id": "approx-with-level", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "activeUsers", "aggregation": "approxCountDistinct", "field": "user_id", "filters": [], "approximate": true, "level": 0.5}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
17
+ {"id": "derived-missing-approximate", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "activeUsers", "aggregation": "approxCountDistinct", "field": "user_id", "filters": [], "approximate": true}, {"name": "n", "aggregation": "count", "field": "id", "filters": []}, {"kind": "derived", "name": "ratio", "uses": [{"alias": "n", "measure": "n"}, {"alias": "u", "measure": "activeUsers"}], "expression": {"kind": "binary", "operator": "divide", "left": {"kind": "reference", "name": "n"}, "right": {"kind": "reference", "name": "u"}}}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
18
+ {"id": "derived-spurious-approximate", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"name": "n", "aggregation": "count", "field": "id", "filters": []}, {"kind": "derived", "name": "aov", "uses": [{"alias": "r", "measure": "revenue"}, {"alias": "n", "measure": "n"}], "expression": {"kind": "binary", "operator": "divide", "left": {"kind": "reference", "name": "r"}, "right": {"kind": "reference", "name": "n"}}, "approximate": true}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "enterprise", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "tier"}, "right": {"kind": "literal", "value": "enterprise"}}, "description": "Enterprise-tier customers"}], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
19
+ {"id": "window-without-time-field", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"kind": "window", "requiresTimeRange": true, "name": "w", "measure": "revenue", "cumulative": true}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": []}]}, "error": "HQ_DEPLOYMENT_INVALID_REFERENCE"},
20
+ {"id": "window-unknown-measure", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"kind": "window", "requiresTimeRange": true, "name": "w", "measure": "nope", "cumulative": true}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}, "error": "HQ_DEPLOYMENT_INVALID_REFERENCE"},
21
+ {"id": "window-wraps-derived", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"name": "n", "aggregation": "count", "field": "id", "filters": []}, {"kind": "derived", "name": "d", "uses": [{"alias": "r", "measure": "revenue"}, {"alias": "n", "measure": "n"}], "expression": {"kind": "binary", "operator": "divide", "left": {"kind": "reference", "name": "r"}, "right": {"kind": "reference", "name": "n"}}}, {"kind": "window", "requiresTimeRange": true, "name": "w", "measure": "d", "cumulative": true}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}, "error": "HQ_DEPLOYMENT_INVALID_REFERENCE"},
22
+ {"id": "window-wraps-window", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"kind": "window", "requiresTimeRange": true, "name": "w1", "measure": "revenue", "cumulative": true}, {"kind": "window", "requiresTimeRange": true, "name": "w2", "measure": "w1", "cumulative": true}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}, "error": "HQ_DEPLOYMENT_INVALID_REFERENCE"},
23
+ {"id": "window-no-frame", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"kind": "window", "requiresTimeRange": true, "name": "w", "measure": "revenue"}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
24
+ {"id": "window-two-frames", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"kind": "window", "requiresTimeRange": true, "name": "w", "measure": "revenue", "cumulative": true, "toDate": "month"}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
25
+ {"id": "window-zero-interval", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"kind": "window", "requiresTimeRange": true, "name": "w", "measure": "revenue", "trailing": {"amount": 0, "unit": "day"}}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
26
+ {"id": "window-unknown-unit", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"kind": "window", "requiresTimeRange": true, "name": "w", "measure": "revenue", "trailing": {"amount": 7, "unit": "fortnight"}}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
27
+ {"id": "window-to-date-minute", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"kind": "window", "requiresTimeRange": true, "name": "w", "measure": "revenue", "toDate": "minute"}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
28
+ {"id": "window-cumulative-false", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"kind": "window", "requiresTimeRange": true, "name": "w", "measure": "revenue", "cumulative": false}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
29
+ {"id": "cumulative-over-avg", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"name": "avgAmount", "aggregation": "avg", "field": "amount", "filters": []}, {"kind": "window", "requiresTimeRange": true, "name": "w", "measure": "avgAmount", "cumulative": true}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
30
+ {"id": "window-approximate-not-inherited", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"name": "activeUsers", "aggregation": "approxCountDistinct", "field": "user_id", "filters": [], "approximate": true}, {"kind": "window", "requiresTimeRange": true, "name": "w", "measure": "activeUsers", "trailing": {"amount": 7, "unit": "day"}}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
31
+ {"id": "shift-missing-interval", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"kind": "shift", "requiresTimeRange": true, "name": "s", "measure": "revenue"}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}, "error": "HQ_DEPLOYMENT_TYPE"},
32
+ {"id": "shift-with-window-frame", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"kind": "shift", "requiresTimeRange": true, "name": "s", "measure": "revenue", "interval": {"amount": 1, "unit": "year"}, "cumulative": true}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}, "error": "HQ_DEPLOYMENT_UNKNOWN_FIELD"},
33
+ {"id": "default-grain-still-closed", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "enterprise", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "tier"}, "right": {"kind": "literal", "value": "enterprise"}}, "description": "Enterprise-tier customers"}], "relationships": [], "timeField": "created_at", "defaults": {"timeGrain": "second"}}]}, "error": "HQ_DEPLOYMENT_INVALID_VALUE"},
34
+ {"id":"window-missing-time-range-marker","value":{"kind":"hypequery-deployment","version":3,"datasets":[{"name":"orders","source":"orders","tenant":{"kind":"not-required"},"dimensions":[{"name":"tier","type":"string","source":{"kind":"column","column":"tier"},"filterable":true,"groupable":true},{"name":"status","type":"string","source":{"kind":"column","column":"status"},"filterable":true,"groupable":true},{"name":"amount","type":"number","source":{"kind":"column","column":"amount"},"filterable":true,"groupable":true},{"name":"createdAt","type":"timestamp","source":{"kind":"column","column":"created_at"},"filterable":true,"groupable":true}],"measures":[{"name":"revenue","aggregation":"sum","field":"amount","filters":[]},{"kind":"window","name":"revenue7d","measure":"revenue","trailing":{"amount":7,"unit":"day"}},{"kind":"window","requiresTimeRange":true,"name":"revenueMtd","measure":"revenue","toDate":"month"},{"kind":"window","requiresTimeRange":true,"name":"revenueRunning","measure":"revenue","cumulative":true},{"kind":"shift","requiresTimeRange":true,"name":"revenuePriorYear","measure":"revenue","interval":{"amount":1,"unit":"year"}},{"kind":"derived","name":"revenueGrowth","uses":[{"alias":"now","measure":"revenue"},{"alias":"before","measure":"revenuePriorYear"}],"expression":{"kind":"binary","operator":"divide","left":{"kind":"binary","operator":"subtract","left":{"kind":"reference","name":"now"},"right":{"kind":"reference","name":"before"}},"right":{"kind":"call","function":"nullIfZero","args":[{"kind":"reference","name":"before"}]}}}],"allowedFilters":[{"name":"status","field":"status","operators":["eq","in"]}],"segments":[],"relationships":[],"timeField":"created_at"}]},"error":"HQ_DEPLOYMENT_TYPE"},
35
+ {"id":"shift-false-time-range-marker","value":{"kind":"hypequery-deployment","version":3,"datasets":[{"name":"orders","source":"orders","tenant":{"kind":"not-required"},"dimensions":[{"name":"tier","type":"string","source":{"kind":"column","column":"tier"},"filterable":true,"groupable":true},{"name":"status","type":"string","source":{"kind":"column","column":"status"},"filterable":true,"groupable":true},{"name":"amount","type":"number","source":{"kind":"column","column":"amount"},"filterable":true,"groupable":true},{"name":"createdAt","type":"timestamp","source":{"kind":"column","column":"created_at"},"filterable":true,"groupable":true}],"measures":[{"name":"revenue","aggregation":"sum","field":"amount","filters":[]},{"kind":"window","requiresTimeRange":true,"name":"revenue7d","measure":"revenue","trailing":{"amount":7,"unit":"day"}},{"kind":"window","requiresTimeRange":true,"name":"revenueMtd","measure":"revenue","toDate":"month"},{"kind":"window","requiresTimeRange":true,"name":"revenueRunning","measure":"revenue","cumulative":true},{"kind":"shift","requiresTimeRange":false,"name":"revenuePriorYear","measure":"revenue","interval":{"amount":1,"unit":"year"}},{"kind":"derived","name":"revenueGrowth","uses":[{"alias":"now","measure":"revenue"},{"alias":"before","measure":"revenuePriorYear"}],"expression":{"kind":"binary","operator":"divide","left":{"kind":"binary","operator":"subtract","left":{"kind":"reference","name":"now"},"right":{"kind":"reference","name":"before"}},"right":{"kind":"call","function":"nullIfZero","args":[{"kind":"reference","name":"before"}]}}}],"allowedFilters":[{"name":"status","field":"status","operators":["eq","in"]}],"segments":[],"relationships":[],"timeField":"created_at"}]},"error":"HQ_DEPLOYMENT_INVALID_VALUE"}
36
+ ]
@@ -0,0 +1,12 @@
1
+ [
2
+ {"id": "segments", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "enterprise", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "tier"}, "right": {"kind": "literal", "value": "enterprise"}}, "description": "Enterprise-tier customers"}], "relationships": []}]}},
3
+ {"id": "segment-logical-predicate", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "bigPaid", "predicate": {"kind": "logical", "operator": "and", "operands": [{"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "status"}, "right": {"kind": "literal", "value": "paid"}}, {"kind": "logical", "operator": "not", "operand": {"kind": "comparison", "operator": "lt", "left": {"kind": "reference", "name": "amount"}, "right": {"kind": "literal", "value": 100.5}}}]}}], "relationships": []}]}},
4
+ {"id": "segment-on-non-filterable-dimension", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": false, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [], "segments": [{"name": "enterprise", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "tier"}, "right": {"kind": "literal", "value": "enterprise"}}, "description": "Enterprise-tier customers"}], "relationships": []}]}},
5
+ {"id": "approx-count-distinct", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "activeUsers", "aggregation": "approxCountDistinct", "field": "user_id", "filters": [], "approximate": true}, {"name": "approxActiveFiltered", "aggregation": "approxCountDistinct", "field": "user_id", "filters": [{"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "status"}, "right": {"kind": "literal", "value": "paid"}}], "approximate": true}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": []}]}},
6
+ {"id": "approximate-derived-measure", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "activeUsers", "aggregation": "approxCountDistinct", "field": "user_id", "filters": [], "approximate": true}, {"name": "sessions", "aggregation": "count", "field": "id", "filters": []}, {"kind": "derived", "name": "sessionsPerUser", "uses": [{"alias": "s", "measure": "sessions"}, {"alias": "u", "measure": "activeUsers"}], "expression": {"kind": "binary", "operator": "divide", "left": {"kind": "reference", "name": "s"}, "right": {"kind": "call", "function": "nullIfZero", "args": [{"kind": "reference", "name": "u"}]}}, "approximate": true}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": []}]}},
7
+ {"id": "sub-day-default-grain", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at", "defaults": {"timeGrain": "hour"}}]}},
8
+ {"id": "tenant-dataset-segment", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "required", "field": "tenant_id"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "tenantId", "type": "string", "source": {"kind": "column", "column": "tenant_id"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [{"name": "enterprise", "predicate": {"kind": "comparison", "operator": "eq", "left": {"kind": "reference", "name": "tier"}, "right": {"kind": "literal", "value": "enterprise"}}, "description": "Enterprise-tier customers"}], "relationships": []}]}},
9
+ {"id": "window-and-shift-measures", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "revenue", "aggregation": "sum", "field": "amount", "filters": []}, {"kind": "window", "requiresTimeRange": true, "name": "revenue7d", "measure": "revenue", "trailing": {"amount": 7, "unit": "day"}}, {"kind": "window", "requiresTimeRange": true, "name": "revenueMtd", "measure": "revenue", "toDate": "month"}, {"kind": "window", "requiresTimeRange": true, "name": "revenueRunning", "measure": "revenue", "cumulative": true}, {"kind": "shift", "requiresTimeRange": true, "name": "revenuePriorYear", "measure": "revenue", "interval": {"amount": 1, "unit": "year"}}, {"kind": "derived", "name": "revenueGrowth", "uses": [{"alias": "now", "measure": "revenue"}, {"alias": "before", "measure": "revenuePriorYear"}], "expression": {"kind": "binary", "operator": "divide", "left": {"kind": "binary", "operator": "subtract", "left": {"kind": "reference", "name": "now"}, "right": {"kind": "reference", "name": "before"}}, "right": {"kind": "call", "function": "nullIfZero", "args": [{"kind": "reference", "name": "before"}]}}}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}},
10
+ {"id": "approximate-window", "value": {"kind": "hypequery-deployment", "version": 3, "datasets": [{"name": "orders", "source": "orders", "tenant": {"kind": "not-required"}, "dimensions": [{"name": "tier", "type": "string", "source": {"kind": "column", "column": "tier"}, "filterable": true, "groupable": true}, {"name": "status", "type": "string", "source": {"kind": "column", "column": "status"}, "filterable": true, "groupable": true}, {"name": "amount", "type": "number", "source": {"kind": "column", "column": "amount"}, "filterable": true, "groupable": true}, {"name": "createdAt", "type": "timestamp", "source": {"kind": "column", "column": "created_at"}, "filterable": true, "groupable": true}], "measures": [{"name": "activeUsers", "aggregation": "approxCountDistinct", "field": "user_id", "filters": [], "approximate": true}, {"kind": "window", "requiresTimeRange": true, "name": "activeUsers7d", "measure": "activeUsers", "trailing": {"amount": 7, "unit": "day"}, "approximate": true}, {"kind": "shift", "requiresTimeRange": true, "name": "activeUsersLastWeek", "measure": "activeUsers", "interval": {"amount": 1, "unit": "week"}, "approximate": true}], "allowedFilters": [{"name": "status", "field": "status", "operators": ["eq", "in"]}], "segments": [], "relationships": [], "timeField": "created_at"}]}},
11
+ {"id":"approx-count-distinct-without-segments","value":{"kind":"hypequery-deployment","version":3,"datasets":[{"name":"orders","source":"orders","tenant":{"kind":"not-required"},"dimensions":[{"name":"tier","type":"string","source":{"kind":"column","column":"tier"},"filterable":true,"groupable":true},{"name":"status","type":"string","source":{"kind":"column","column":"status"},"filterable":true,"groupable":true},{"name":"amount","type":"number","source":{"kind":"column","column":"amount"},"filterable":true,"groupable":true},{"name":"createdAt","type":"timestamp","source":{"kind":"column","column":"created_at"},"filterable":true,"groupable":true}],"measures":[{"name":"activeUsers","aggregation":"approxCountDistinct","field":"user_id","filters":[],"approximate":true},{"name":"approxActiveFiltered","aggregation":"approxCountDistinct","field":"user_id","filters":[{"kind":"comparison","operator":"eq","left":{"kind":"reference","name":"status"},"right":{"kind":"literal","value":"paid"}}],"approximate":true}],"allowedFilters":[{"name":"status","field":"status","operators":["eq","in"]}],"relationships":[]}]}}
12
+ ]
@@ -0,0 +1,18 @@
1
+ # Portable expression v2 fixtures
2
+
3
+ This family accompanies accepted RFC 0015 and covers what expression extension 2 adds to extension 1:
4
+
5
+ - `minute` and `hour` grains;
6
+ - the `approxCountDistinct` aggregation;
7
+ - query `segments`;
8
+ - one-hop relationship-qualified `measures`.
9
+
10
+ Every case is validated under extension 2. Extension 2 is a strict superset of extension 1, so every `expressions-v1` success case must also pass under extension 2. The TypeScript reference implementation's unit tests replay them. The extension 1 rejections of the new features remain in `expressions-v1`. For example, `query-invalid-grain` rejects `hour` under extension 1.
11
+
12
+ Cases use the `expressions-v1` shape: exactly one `value` or `generator`, and rejections select the `expression` or `query` surface.
13
+
14
+ One generator is added:
15
+
16
+ - `segments` creates a dataset query `{ "kind": "dataset", "dataset": "orders", "segments": [...] }` with `count` distinct segment names `s0`, `s1`, and so on.
17
+
18
+ The `segments-validated-before-order-by` case pins RFC 0015's validation order. A duplicate segment reports before an invalid `orderBy` direction. Both report `HQ_EXPRESSION_INVALID_QUERY`, so an implementation passes it either way. The case documents the order rather than distinguishing it.
@@ -0,0 +1,13 @@
1
+ [
2
+ { "id": "approxCountDistinct-with-arg-field", "mode": "expression", "value": { "kind": "aggregate", "aggregation": "approxCountDistinct", "field": "user_id", "argField": "created_at" }, "error": "HQ_EXPRESSION_INVALID_AGGREGATION" },
3
+ { "id": "approxCountDistinct-with-level", "mode": "expression", "value": { "kind": "aggregate", "aggregation": "approxCountDistinct", "field": "user_id", "level": 0.5 }, "error": "HQ_EXPRESSION_INVALID_AGGREGATION" },
4
+ { "id": "approxCountDistinct-filter-not-predicate", "mode": "expression", "value": { "kind": "aggregate", "aggregation": "approxCountDistinct", "field": "user_id", "filters": [{ "kind": "literal", "value": true }] }, "error": "HQ_EXPRESSION_INVALID_AGGREGATION" },
5
+ { "id": "aggregation-still-closed", "mode": "expression", "value": { "kind": "aggregate", "aggregation": "uniq", "field": "user_id" }, "error": "HQ_EXPRESSION_INVALID_AGGREGATION" },
6
+ { "id": "grain-still-closed", "mode": "query", "value": { "kind": "dataset", "dataset": "orders", "by": "second" }, "error": "HQ_EXPRESSION_INVALID_QUERY" },
7
+ { "id": "segments-duplicate", "mode": "query", "value": { "kind": "dataset", "dataset": "orders", "segments": ["enterprise", "enterprise"] }, "error": "HQ_EXPRESSION_INVALID_QUERY" },
8
+ { "id": "segments-qualified", "mode": "query", "value": { "kind": "dataset", "dataset": "orders", "segments": ["customer.enterprise"] }, "error": "HQ_EXPRESSION_INVALID_IDENTIFIER" },
9
+ { "id": "segments-not-array", "mode": "query", "value": { "kind": "dataset", "dataset": "orders", "segments": "enterprise" }, "error": "HQ_EXPRESSION_TYPE" },
10
+ { "id": "segments-too-many-items", "mode": "query", "generator": { "type": "segments", "count": 101 }, "error": "HQ_EXPRESSION_TOO_MANY_ITEMS" },
11
+ { "id": "segments-validated-before-order-by", "mode": "query", "value": { "kind": "dataset", "dataset": "orders", "segments": ["a", "a"], "orderBy": [{ "field": "revenue", "direction": "sideways" }] }, "error": "HQ_EXPRESSION_INVALID_QUERY" },
12
+ { "id": "measure-invalid-qualified", "mode": "query", "value": { "kind": "dataset", "dataset": "orders", "measures": ["customer..count"] }, "error": "HQ_EXPRESSION_INVALID_IDENTIFIER" }
13
+ ]
@@ -0,0 +1,17 @@
1
+ {
2
+ "expressions": [
3
+ { "id": "aggregate-approxCountDistinct", "value": { "kind": "aggregate", "aggregation": "approxCountDistinct", "field": "user_id" } },
4
+ { "id": "aggregate-approxCountDistinct-filtered", "value": { "kind": "aggregate", "aggregation": "approxCountDistinct", "field": "user_id", "filters": [{ "kind": "comparison", "operator": "eq", "left": { "kind": "reference", "name": "status" }, "right": { "kind": "literal", "value": "active" } }] } },
5
+ { "id": "aggregate-approxCountDistinct-empty-filters", "value": { "kind": "aggregate", "aggregation": "approxCountDistinct", "field": "user_id", "filters": [] } },
6
+ { "id": "aggregate-v1-registry-unchanged", "value": { "kind": "aggregate", "aggregation": "percentile", "field": "amount", "level": 0.95 } }
7
+ ],
8
+ "queries": [
9
+ { "id": "grain-minute", "value": { "kind": "dataset", "dataset": "events", "by": "minute" } },
10
+ { "id": "grain-hour", "value": { "kind": "metric", "dataset": "events", "metric": "sessions", "by": "hour" } },
11
+ { "id": "segments-dataset", "value": { "kind": "dataset", "dataset": "orders", "measures": ["revenue"], "filters": [], "segments": ["enterprise", "activeLast30Days"], "orderBy": [{ "field": "revenue", "direction": "desc" }] } },
12
+ { "id": "segments-metric", "value": { "kind": "metric", "dataset": "orders", "metric": "revenue", "segments": ["enterprise"] } },
13
+ { "id": "segments-empty", "value": { "kind": "dataset", "dataset": "orders", "segments": [] } },
14
+ { "id": "relationship-measure", "value": { "kind": "dataset", "dataset": "orders", "dimensions": ["status"], "measures": ["revenue", "customer.customerCount"] } },
15
+ { "id": "all-v2-query-features", "value": { "kind": "dataset", "dataset": "orders", "dimensions": ["customer.country"], "measures": ["customer.customerCount"], "filters": [{ "kind": "comparison", "operator": "eq", "left": { "kind": "reference", "name": "status" }, "right": { "kind": "literal", "value": "paid" } }], "segments": ["enterprise"], "orderBy": [{ "field": "period", "direction": "asc" }], "limit": 100, "offset": 0, "by": "hour", "includeMeta": true } }
16
+ ]
17
+ }
@@ -57,6 +57,27 @@
57
57
  }
58
58
  ]
59
59
  },
60
+ {
61
+ "name": "expressions-v2",
62
+ "rfc": "0015",
63
+ "codePrefixes": [
64
+ "HQ_EXPRESSION_"
65
+ ],
66
+ "files": [
67
+ {
68
+ "path": "expressions-v2/success.json",
69
+ "role": "success",
70
+ "sections": [
71
+ "/expressions",
72
+ "/queries"
73
+ ]
74
+ },
75
+ {
76
+ "path": "expressions-v2/rejections.json",
77
+ "role": "rejection"
78
+ }
79
+ ]
80
+ },
60
81
  {
61
82
  "name": "query-schemas-v1",
62
83
  "rfc": "0004",
@@ -112,6 +133,27 @@
112
133
  }
113
134
  ]
114
135
  },
136
+ {
137
+ "name": "deployments-v3",
138
+ "rfc": "0015",
139
+ "codePrefixes": [
140
+ "HQ_DEPLOYMENT_"
141
+ ],
142
+ "files": [
143
+ {
144
+ "path": "deployments-v3/success.json",
145
+ "role": "success"
146
+ },
147
+ {
148
+ "path": "deployments-v3/rejections.json",
149
+ "role": "rejection"
150
+ },
151
+ {
152
+ "path": "deployments-v3/identity.json",
153
+ "role": "identity"
154
+ }
155
+ ]
156
+ },
115
157
  {
116
158
  "name": "deployment-bundles-v1",
117
159
  "rfc": "0007",
@@ -238,6 +280,23 @@
238
280
  "role": "rejection"
239
281
  }
240
282
  ]
283
+ },
284
+ {
285
+ "name": "semantic-invocations-v2",
286
+ "rfc": "0015",
287
+ "codePrefixes": [
288
+ "HQ_INVOCATION_"
289
+ ],
290
+ "files": [
291
+ {
292
+ "path": "semantic-invocations-v2/success.json",
293
+ "role": "success"
294
+ },
295
+ {
296
+ "path": "semantic-invocations-v2/rejections.json",
297
+ "role": "rejection"
298
+ }
299
+ ]
241
300
  }
242
301
  ],
243
302
  "fuzz": [
@@ -0,0 +1,9 @@
1
+ # Semantic invocation v2 fixtures
2
+
3
+ This family accompanies accepted RFC 0015. Semantic invocation 2 is identical to invocation 1 (RFC 0014), except that the `operation` is validated under expression extension 2. It may therefore name segments, `minute`/`hour` grains, and relationship-qualified measures.
4
+
5
+ Only the invocation request has a version 2. Results and failures remain version 1, and `semantic-invocations-v1` covers them.
6
+
7
+ The lowest-version rule applies. A version 2 request whose operation uses no extension 2 feature must be sent as version 1, and is rejected with `HQ_INVOCATION_INVALID_VERSION`. An empty `segments` array names no segment, so it does not count as a feature.
8
+
9
+ Every case was checked against the TypeScript reference implementation. The Python implementation does not announce this family yet.
@@ -0,0 +1,9 @@
1
+ [
2
+ {"id": "lowest-version-rule", "record": "invocation", "value": {"kind": "hypequery-semantic-invocation", "version": 2, "target": {"project": "acme", "environment": "production"}, "operation": {"kind": "dataset", "dataset": "orders", "measures": ["revenue"]}}, "error": "HQ_INVOCATION_INVALID_VERSION"},
3
+ {"id": "lowest-version-empty-segments", "record": "invocation", "value": {"kind": "hypequery-semantic-invocation", "version": 2, "target": {"project": "acme", "environment": "production"}, "operation": {"kind": "dataset", "dataset": "orders", "segments": []}}, "error": "HQ_INVOCATION_INVALID_VERSION"},
4
+ {"id": "version-1-under-v2", "record": "invocation", "value": {"kind": "hypequery-semantic-invocation", "version": 1, "target": {"project": "acme", "environment": "production"}, "operation": {"kind": "dataset", "dataset": "orders", "segments": ["enterprise"]}}, "error": "HQ_INVOCATION_INVALID_VERSION"},
5
+ {"id": "unknown-version", "record": "invocation", "value": {"kind": "hypequery-semantic-invocation", "version": 3, "target": {"project": "acme", "environment": "production"}, "operation": {"kind": "dataset", "dataset": "orders", "segments": ["enterprise"]}}, "error": "HQ_INVOCATION_INVALID_VERSION"},
6
+ {"id": "duplicate-segment", "record": "invocation", "value": {"kind": "hypequery-semantic-invocation", "version": 2, "target": {"project": "acme", "environment": "production"}, "operation": {"kind": "dataset", "dataset": "orders", "segments": ["a", "a"]}}, "error": "HQ_INVOCATION_INVALID_VALUE"},
7
+ {"id": "grain-still-closed", "record": "invocation", "value": {"kind": "hypequery-semantic-invocation", "version": 2, "target": {"project": "acme", "environment": "production"}, "operation": {"kind": "dataset", "dataset": "orders", "by": "second"}}, "error": "HQ_INVOCATION_INVALID_VALUE"},
8
+ {"id": "tenant-field-still-forbidden", "record": "invocation", "value": {"kind": "hypequery-semantic-invocation", "version": 2, "target": {"project": "acme", "environment": "production"}, "operation": {"kind": "dataset", "dataset": "orders", "segments": ["enterprise"]}, "tenant": "t1"}, "error": "HQ_INVOCATION_UNKNOWN_FIELD"}
9
+ ]
@@ -0,0 +1,5 @@
1
+ [
2
+ {"id": "segments", "record": "invocation", "value": {"kind": "hypequery-semantic-invocation", "version": 2, "target": {"project": "acme", "environment": "production"}, "operation": {"kind": "dataset", "dataset": "orders", "measures": ["revenue"], "segments": ["enterprise"]}}},
3
+ {"id": "sub-day-grain-metric", "record": "invocation", "value": {"kind": "hypequery-semantic-invocation", "version": 2, "target": {"project": "acme", "environment": "production"}, "operation": {"kind": "metric", "dataset": "events", "metric": "sessions", "by": "hour", "limit": 24}}},
4
+ {"id": "relationship-measure", "record": "invocation", "value": {"kind": "hypequery-semantic-invocation", "version": 2, "target": {"project": "acme", "environment": "production"}, "operation": {"kind": "dataset", "dataset": "orders", "dimensions": ["status"], "measures": ["customer.customerCount"]}, "budget": {"maxRows": 100}}}
5
+ ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypequery/protocol-conformance",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Cross-language conformance runner for the Hypequery analytics security protocol",
5
5
  "keywords": [
6
6
  "hypequery",
@@ -31,7 +31,7 @@
31
31
  "README.md"
32
32
  ],
33
33
  "dependencies": {
34
- "@hypequery/protocol": "^0.15.0"
34
+ "@hypequery/protocol": "^0.16.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^22.5.0",