@hypequery/protocol-conformance 0.11.2 → 0.12.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.
- package/fixtures/deployments-v2/README.md +15 -0
- package/fixtures/deployments-v2/rejections.json +874 -0
- package/fixtures/manifest.json +4 -0
- package/fixtures/query-implementations-v1/rejections.json +445 -6
- package/fixtures/query-implementations-v1/success.json +88 -12
- package/fixtures/query-schemas-v1/README.md +2 -0
- package/fixtures/query-schemas-v1/rejections.json +224 -13
- package/fixtures/sql-portability-v1/README.md +2 -0
- package/fixtures/sql-portability-v1/non-portable.json +121 -0
- package/fixtures/tagged-values-v1/rejections.json +18 -0
- package/package.json +2 -2
package/fixtures/manifest.json
CHANGED
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
{
|
|
21
21
|
"id": "implementation-unknown-kind",
|
|
22
22
|
"surface": "query-implementation",
|
|
23
|
-
"value": {
|
|
23
|
+
"value": {
|
|
24
|
+
"kind": "raw-sql"
|
|
25
|
+
},
|
|
24
26
|
"error": "HQ_QUERY_IMPLEMENTATION_UNKNOWN_KIND"
|
|
25
27
|
},
|
|
26
28
|
{
|
|
@@ -54,27 +56,464 @@
|
|
|
54
56
|
"operation": "select",
|
|
55
57
|
"statement": "SELECT * FROM trips WHERE tenant_id = {tenantId:UUID}",
|
|
56
58
|
"parameters": [],
|
|
57
|
-
"readSources": [
|
|
58
|
-
|
|
59
|
+
"readSources": [
|
|
60
|
+
"trips"
|
|
61
|
+
],
|
|
62
|
+
"tenant": {
|
|
63
|
+
"kind": "required",
|
|
64
|
+
"parameter": "tenantId"
|
|
65
|
+
}
|
|
59
66
|
},
|
|
60
67
|
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_REFERENCE"
|
|
61
68
|
},
|
|
62
69
|
{
|
|
63
70
|
"id": "compiled-sql-too-many-parameters",
|
|
64
71
|
"surface": "query-implementation",
|
|
65
|
-
"generator": {
|
|
72
|
+
"generator": {
|
|
73
|
+
"type": "parameters",
|
|
74
|
+
"count": 101
|
|
75
|
+
},
|
|
66
76
|
"error": "HQ_QUERY_IMPLEMENTATION_TOO_MANY_ITEMS"
|
|
67
77
|
},
|
|
68
78
|
{
|
|
69
79
|
"id": "sql-expression-too-large",
|
|
70
80
|
"surface": "sql-expression",
|
|
71
|
-
"generator": {
|
|
81
|
+
"generator": {
|
|
82
|
+
"type": "sql-expression",
|
|
83
|
+
"bytes": 65537
|
|
84
|
+
},
|
|
72
85
|
"error": "HQ_QUERY_IMPLEMENTATION_TOO_LARGE"
|
|
73
86
|
},
|
|
74
87
|
{
|
|
75
88
|
"id": "implementation-accessor",
|
|
76
89
|
"surface": "query-implementation",
|
|
77
|
-
"generator": {
|
|
90
|
+
"generator": {
|
|
91
|
+
"type": "unsafe-accessor"
|
|
92
|
+
},
|
|
78
93
|
"error": "HQ_QUERY_IMPLEMENTATION_UNSAFE_OBJECT"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "implementation-missing-field",
|
|
97
|
+
"surface": "query-implementation",
|
|
98
|
+
"value": {
|
|
99
|
+
"kind": "compiled-sql",
|
|
100
|
+
"dialect": "clickhouse",
|
|
101
|
+
"operation": "select",
|
|
102
|
+
"parameters": [],
|
|
103
|
+
"readSources": [],
|
|
104
|
+
"tenant": {
|
|
105
|
+
"kind": "not-required"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"error": "HQ_QUERY_IMPLEMENTATION_TYPE"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "implementation-unknown-field-precedes-invalid-value",
|
|
112
|
+
"surface": "query-implementation",
|
|
113
|
+
"value": {
|
|
114
|
+
"kind": "compiled-sql",
|
|
115
|
+
"dialect": "clickhouse",
|
|
116
|
+
"operation": "insert",
|
|
117
|
+
"statement": "SELECT 1",
|
|
118
|
+
"parameters": [],
|
|
119
|
+
"readSources": [],
|
|
120
|
+
"tenant": {
|
|
121
|
+
"kind": "not-required"
|
|
122
|
+
},
|
|
123
|
+
"bogus": 1
|
|
124
|
+
},
|
|
125
|
+
"error": "HQ_QUERY_IMPLEMENTATION_UNKNOWN_FIELD"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": "implementation-non-string-kind",
|
|
129
|
+
"surface": "query-implementation",
|
|
130
|
+
"value": {
|
|
131
|
+
"kind": 1
|
|
132
|
+
},
|
|
133
|
+
"error": "HQ_QUERY_IMPLEMENTATION_TYPE"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id": "implementation-sql-expression-is-not-in-the-union",
|
|
137
|
+
"surface": "query-implementation",
|
|
138
|
+
"value": {
|
|
139
|
+
"kind": "sql-expression"
|
|
140
|
+
},
|
|
141
|
+
"error": "HQ_QUERY_IMPLEMENTATION_UNKNOWN_KIND"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"id": "compiled-sql-invalid-operation",
|
|
145
|
+
"surface": "query-implementation",
|
|
146
|
+
"value": {
|
|
147
|
+
"kind": "compiled-sql",
|
|
148
|
+
"dialect": "clickhouse",
|
|
149
|
+
"operation": "insert",
|
|
150
|
+
"statement": "SELECT 1",
|
|
151
|
+
"parameters": [],
|
|
152
|
+
"readSources": [],
|
|
153
|
+
"tenant": {
|
|
154
|
+
"kind": "not-required"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_VALUE"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"id": "compiled-sql-invalid-dialect",
|
|
161
|
+
"surface": "query-implementation",
|
|
162
|
+
"value": {
|
|
163
|
+
"kind": "compiled-sql",
|
|
164
|
+
"dialect": "postgres",
|
|
165
|
+
"operation": "select",
|
|
166
|
+
"statement": "SELECT 1",
|
|
167
|
+
"parameters": [],
|
|
168
|
+
"readSources": [],
|
|
169
|
+
"tenant": {
|
|
170
|
+
"kind": "not-required"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_VALUE"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"id": "compiled-sql-blank-statement",
|
|
177
|
+
"surface": "query-implementation",
|
|
178
|
+
"value": {
|
|
179
|
+
"kind": "compiled-sql",
|
|
180
|
+
"dialect": "clickhouse",
|
|
181
|
+
"operation": "select",
|
|
182
|
+
"statement": " ",
|
|
183
|
+
"parameters": [],
|
|
184
|
+
"readSources": [],
|
|
185
|
+
"tenant": {
|
|
186
|
+
"kind": "not-required"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_VALUE"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"id": "compiled-sql-byte-order-mark-statement",
|
|
193
|
+
"surface": "query-implementation",
|
|
194
|
+
"value": {
|
|
195
|
+
"kind": "compiled-sql",
|
|
196
|
+
"dialect": "clickhouse",
|
|
197
|
+
"operation": "select",
|
|
198
|
+
"statement": "",
|
|
199
|
+
"parameters": [],
|
|
200
|
+
"readSources": [],
|
|
201
|
+
"tenant": {
|
|
202
|
+
"kind": "not-required"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_VALUE"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"id": "compiled-sql-control-in-clickhouse-type",
|
|
209
|
+
"surface": "query-implementation",
|
|
210
|
+
"value": {
|
|
211
|
+
"kind": "compiled-sql",
|
|
212
|
+
"dialect": "clickhouse",
|
|
213
|
+
"operation": "select",
|
|
214
|
+
"statement": "SELECT 1",
|
|
215
|
+
"parameters": [
|
|
216
|
+
{
|
|
217
|
+
"name": "a",
|
|
218
|
+
"source": {
|
|
219
|
+
"kind": "input",
|
|
220
|
+
"path": "a"
|
|
221
|
+
},
|
|
222
|
+
"clickHouseType": "Str\ting"
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
"readSources": [],
|
|
226
|
+
"tenant": {
|
|
227
|
+
"kind": "not-required"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_VALUE"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"id": "compiled-sql-control-in-read-source",
|
|
234
|
+
"surface": "query-implementation",
|
|
235
|
+
"value": {
|
|
236
|
+
"kind": "compiled-sql",
|
|
237
|
+
"dialect": "clickhouse",
|
|
238
|
+
"operation": "select",
|
|
239
|
+
"statement": "SELECT 1",
|
|
240
|
+
"parameters": [],
|
|
241
|
+
"readSources": [
|
|
242
|
+
"analytics\ttrips"
|
|
243
|
+
],
|
|
244
|
+
"tenant": {
|
|
245
|
+
"kind": "not-required"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_VALUE"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"id": "compiled-sql-duplicate-read-sources",
|
|
252
|
+
"surface": "query-implementation",
|
|
253
|
+
"value": {
|
|
254
|
+
"kind": "compiled-sql",
|
|
255
|
+
"dialect": "clickhouse",
|
|
256
|
+
"operation": "select",
|
|
257
|
+
"statement": "SELECT 1",
|
|
258
|
+
"parameters": [],
|
|
259
|
+
"readSources": [
|
|
260
|
+
"analytics.trips",
|
|
261
|
+
"analytics.trips"
|
|
262
|
+
],
|
|
263
|
+
"tenant": {
|
|
264
|
+
"kind": "not-required"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_VALUE"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"id": "compiled-sql-duplicate-parameter-names",
|
|
271
|
+
"surface": "query-implementation",
|
|
272
|
+
"value": {
|
|
273
|
+
"kind": "compiled-sql",
|
|
274
|
+
"dialect": "clickhouse",
|
|
275
|
+
"operation": "select",
|
|
276
|
+
"statement": "SELECT 1",
|
|
277
|
+
"parameters": [
|
|
278
|
+
{
|
|
279
|
+
"name": "a",
|
|
280
|
+
"source": {
|
|
281
|
+
"kind": "input",
|
|
282
|
+
"path": "a"
|
|
283
|
+
},
|
|
284
|
+
"clickHouseType": "String"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "a",
|
|
288
|
+
"source": {
|
|
289
|
+
"kind": "input",
|
|
290
|
+
"path": "a"
|
|
291
|
+
},
|
|
292
|
+
"clickHouseType": "String"
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
"readSources": [],
|
|
296
|
+
"tenant": {
|
|
297
|
+
"kind": "not-required"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_REFERENCE"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"id": "compiled-sql-not-required-with-tenant-parameter",
|
|
304
|
+
"surface": "query-implementation",
|
|
305
|
+
"value": {
|
|
306
|
+
"kind": "compiled-sql",
|
|
307
|
+
"dialect": "clickhouse",
|
|
308
|
+
"operation": "select",
|
|
309
|
+
"statement": "SELECT 1",
|
|
310
|
+
"parameters": [
|
|
311
|
+
{
|
|
312
|
+
"name": "a",
|
|
313
|
+
"source": {
|
|
314
|
+
"kind": "tenant"
|
|
315
|
+
},
|
|
316
|
+
"clickHouseType": "String"
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"readSources": [],
|
|
320
|
+
"tenant": {
|
|
321
|
+
"kind": "not-required"
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_REFERENCE"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"id": "compiled-sql-two-tenant-parameters",
|
|
328
|
+
"surface": "query-implementation",
|
|
329
|
+
"value": {
|
|
330
|
+
"kind": "compiled-sql",
|
|
331
|
+
"dialect": "clickhouse",
|
|
332
|
+
"operation": "select",
|
|
333
|
+
"statement": "SELECT 1",
|
|
334
|
+
"parameters": [
|
|
335
|
+
{
|
|
336
|
+
"name": "a",
|
|
337
|
+
"source": {
|
|
338
|
+
"kind": "tenant"
|
|
339
|
+
},
|
|
340
|
+
"clickHouseType": "String"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"name": "b",
|
|
344
|
+
"source": {
|
|
345
|
+
"kind": "tenant"
|
|
346
|
+
},
|
|
347
|
+
"clickHouseType": "String"
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
"readSources": [],
|
|
351
|
+
"tenant": {
|
|
352
|
+
"kind": "required",
|
|
353
|
+
"parameter": "a"
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_REFERENCE"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"id": "compiled-sql-required-tenant-names-an-input-parameter",
|
|
360
|
+
"surface": "query-implementation",
|
|
361
|
+
"value": {
|
|
362
|
+
"kind": "compiled-sql",
|
|
363
|
+
"dialect": "clickhouse",
|
|
364
|
+
"operation": "select",
|
|
365
|
+
"statement": "SELECT 1",
|
|
366
|
+
"parameters": [
|
|
367
|
+
{
|
|
368
|
+
"name": "a",
|
|
369
|
+
"source": {
|
|
370
|
+
"kind": "input",
|
|
371
|
+
"path": "a"
|
|
372
|
+
},
|
|
373
|
+
"clickHouseType": "String"
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
"readSources": [],
|
|
377
|
+
"tenant": {
|
|
378
|
+
"kind": "required",
|
|
379
|
+
"parameter": "a"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_REFERENCE"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"id": "parameter-source-non-string-kind",
|
|
386
|
+
"surface": "query-implementation",
|
|
387
|
+
"value": {
|
|
388
|
+
"kind": "compiled-sql",
|
|
389
|
+
"dialect": "clickhouse",
|
|
390
|
+
"operation": "select",
|
|
391
|
+
"statement": "SELECT 1",
|
|
392
|
+
"parameters": [
|
|
393
|
+
{
|
|
394
|
+
"name": "a",
|
|
395
|
+
"source": {
|
|
396
|
+
"kind": 1
|
|
397
|
+
},
|
|
398
|
+
"clickHouseType": "String"
|
|
399
|
+
}
|
|
400
|
+
],
|
|
401
|
+
"readSources": [],
|
|
402
|
+
"tenant": {
|
|
403
|
+
"kind": "not-required"
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"error": "HQ_QUERY_IMPLEMENTATION_TYPE"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"id": "parameter-source-unknown-kind",
|
|
410
|
+
"surface": "query-implementation",
|
|
411
|
+
"value": {
|
|
412
|
+
"kind": "compiled-sql",
|
|
413
|
+
"dialect": "clickhouse",
|
|
414
|
+
"operation": "select",
|
|
415
|
+
"statement": "SELECT 1",
|
|
416
|
+
"parameters": [
|
|
417
|
+
{
|
|
418
|
+
"name": "a",
|
|
419
|
+
"source": {
|
|
420
|
+
"kind": "environment"
|
|
421
|
+
},
|
|
422
|
+
"clickHouseType": "String"
|
|
423
|
+
}
|
|
424
|
+
],
|
|
425
|
+
"readSources": [],
|
|
426
|
+
"tenant": {
|
|
427
|
+
"kind": "not-required"
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"error": "HQ_QUERY_IMPLEMENTATION_UNKNOWN_KIND"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"id": "semantic-plan-invalid-query",
|
|
434
|
+
"surface": "query-implementation",
|
|
435
|
+
"value": {
|
|
436
|
+
"kind": "semantic-plan",
|
|
437
|
+
"query": {
|
|
438
|
+
"kind": "nope"
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_VALUE"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"id": "runtime-invalid-runtime",
|
|
445
|
+
"surface": "query-implementation",
|
|
446
|
+
"value": {
|
|
447
|
+
"kind": "runtime-reference",
|
|
448
|
+
"runtime": "deno",
|
|
449
|
+
"artifactSha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
|
|
450
|
+
"entrypoint": "queries.run"
|
|
451
|
+
},
|
|
452
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_VALUE"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"id": "sql-expression-blank",
|
|
456
|
+
"surface": "sql-expression",
|
|
457
|
+
"value": {
|
|
458
|
+
"kind": "sql-expression",
|
|
459
|
+
"dialect": "clickhouse",
|
|
460
|
+
"sql": " ",
|
|
461
|
+
"output": {
|
|
462
|
+
"kind": "string"
|
|
463
|
+
},
|
|
464
|
+
"dependencies": [
|
|
465
|
+
"x"
|
|
466
|
+
]
|
|
467
|
+
},
|
|
468
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_VALUE"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"id": "sql-expression-byte-order-mark",
|
|
472
|
+
"surface": "sql-expression",
|
|
473
|
+
"value": {
|
|
474
|
+
"kind": "sql-expression",
|
|
475
|
+
"dialect": "clickhouse",
|
|
476
|
+
"sql": "",
|
|
477
|
+
"output": {
|
|
478
|
+
"kind": "string"
|
|
479
|
+
},
|
|
480
|
+
"dependencies": [
|
|
481
|
+
"x"
|
|
482
|
+
]
|
|
483
|
+
},
|
|
484
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_VALUE"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"id": "sql-expression-duplicate-dependencies",
|
|
488
|
+
"surface": "sql-expression",
|
|
489
|
+
"value": {
|
|
490
|
+
"kind": "sql-expression",
|
|
491
|
+
"dialect": "clickhouse",
|
|
492
|
+
"sql": "toDate(x)",
|
|
493
|
+
"output": {
|
|
494
|
+
"kind": "string"
|
|
495
|
+
},
|
|
496
|
+
"dependencies": [
|
|
497
|
+
"x",
|
|
498
|
+
"x"
|
|
499
|
+
]
|
|
500
|
+
},
|
|
501
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_VALUE"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"id": "sql-expression-invalid-dependency",
|
|
505
|
+
"surface": "sql-expression",
|
|
506
|
+
"value": {
|
|
507
|
+
"kind": "sql-expression",
|
|
508
|
+
"dialect": "clickhouse",
|
|
509
|
+
"sql": "toDate(x)",
|
|
510
|
+
"output": {
|
|
511
|
+
"kind": "string"
|
|
512
|
+
},
|
|
513
|
+
"dependencies": [
|
|
514
|
+
"a/b"
|
|
515
|
+
]
|
|
516
|
+
},
|
|
517
|
+
"error": "HQ_QUERY_IMPLEMENTATION_INVALID_IDENTIFIER"
|
|
79
518
|
}
|
|
80
519
|
]
|
|
@@ -6,8 +6,12 @@
|
|
|
6
6
|
"kind": "sql-expression",
|
|
7
7
|
"dialect": "clickhouse",
|
|
8
8
|
"sql": "toDate(pickup_datetime)",
|
|
9
|
-
"output": {
|
|
10
|
-
|
|
9
|
+
"output": {
|
|
10
|
+
"kind": "string"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": [
|
|
13
|
+
"pickup_datetime"
|
|
14
|
+
]
|
|
11
15
|
}
|
|
12
16
|
},
|
|
13
17
|
{
|
|
@@ -17,8 +21,12 @@
|
|
|
17
21
|
"kind": "sql-expression",
|
|
18
22
|
"dialect": "clickhouse",
|
|
19
23
|
"sql": "quantileExact(0.95)(trip_distance)",
|
|
20
|
-
"output": {
|
|
21
|
-
|
|
24
|
+
"output": {
|
|
25
|
+
"kind": "number"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": [
|
|
28
|
+
"trip_distance"
|
|
29
|
+
]
|
|
22
30
|
}
|
|
23
31
|
},
|
|
24
32
|
{
|
|
@@ -29,8 +37,13 @@
|
|
|
29
37
|
"query": {
|
|
30
38
|
"kind": "dataset",
|
|
31
39
|
"dataset": "trips",
|
|
32
|
-
"dimensions": [
|
|
33
|
-
|
|
40
|
+
"dimensions": [
|
|
41
|
+
"pickup_date"
|
|
42
|
+
],
|
|
43
|
+
"measures": [
|
|
44
|
+
"count",
|
|
45
|
+
"total_revenue"
|
|
46
|
+
],
|
|
34
47
|
"limit": 100
|
|
35
48
|
}
|
|
36
49
|
}
|
|
@@ -46,12 +59,19 @@
|
|
|
46
59
|
"parameters": [
|
|
47
60
|
{
|
|
48
61
|
"name": "from",
|
|
49
|
-
"source": {
|
|
62
|
+
"source": {
|
|
63
|
+
"kind": "input",
|
|
64
|
+
"path": "range.from"
|
|
65
|
+
},
|
|
50
66
|
"clickHouseType": "Date"
|
|
51
67
|
}
|
|
52
68
|
],
|
|
53
|
-
"readSources": [
|
|
54
|
-
|
|
69
|
+
"readSources": [
|
|
70
|
+
"analytics.trips"
|
|
71
|
+
],
|
|
72
|
+
"tenant": {
|
|
73
|
+
"kind": "not-required"
|
|
74
|
+
}
|
|
55
75
|
}
|
|
56
76
|
},
|
|
57
77
|
{
|
|
@@ -65,12 +85,19 @@
|
|
|
65
85
|
"parameters": [
|
|
66
86
|
{
|
|
67
87
|
"name": "tenantId",
|
|
68
|
-
"source": {
|
|
88
|
+
"source": {
|
|
89
|
+
"kind": "tenant"
|
|
90
|
+
},
|
|
69
91
|
"clickHouseType": "UUID"
|
|
70
92
|
}
|
|
71
93
|
],
|
|
72
|
-
"readSources": [
|
|
73
|
-
|
|
94
|
+
"readSources": [
|
|
95
|
+
"trips"
|
|
96
|
+
],
|
|
97
|
+
"tenant": {
|
|
98
|
+
"kind": "required",
|
|
99
|
+
"parameter": "tenantId"
|
|
100
|
+
}
|
|
74
101
|
}
|
|
75
102
|
},
|
|
76
103
|
{
|
|
@@ -92,5 +119,54 @@
|
|
|
92
119
|
"artifactSha256": "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789",
|
|
93
120
|
"entrypoint": "queries.customer_revenue"
|
|
94
121
|
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "compiled-sql-formatted-statement",
|
|
125
|
+
"surface": "query-implementation",
|
|
126
|
+
"value": {
|
|
127
|
+
"kind": "compiled-sql",
|
|
128
|
+
"dialect": "clickhouse",
|
|
129
|
+
"operation": "select",
|
|
130
|
+
"statement": "SELECT 1\n FROM trips\n\tWHERE a = 1",
|
|
131
|
+
"parameters": [],
|
|
132
|
+
"readSources": [],
|
|
133
|
+
"tenant": {
|
|
134
|
+
"kind": "not-required"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "compiled-sql-tenant-required",
|
|
140
|
+
"surface": "query-implementation",
|
|
141
|
+
"value": {
|
|
142
|
+
"kind": "compiled-sql",
|
|
143
|
+
"dialect": "clickhouse",
|
|
144
|
+
"operation": "select",
|
|
145
|
+
"statement": "SELECT 1",
|
|
146
|
+
"parameters": [
|
|
147
|
+
{
|
|
148
|
+
"name": "tenantId",
|
|
149
|
+
"source": {
|
|
150
|
+
"kind": "tenant"
|
|
151
|
+
},
|
|
152
|
+
"clickHouseType": "UUID"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"readSources": [],
|
|
156
|
+
"tenant": {
|
|
157
|
+
"kind": "required",
|
|
158
|
+
"parameter": "tenantId"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"id": "runtime-reference-dotted-entrypoint",
|
|
164
|
+
"surface": "query-implementation",
|
|
165
|
+
"value": {
|
|
166
|
+
"kind": "runtime-reference",
|
|
167
|
+
"runtime": "node",
|
|
168
|
+
"artifactSha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
|
|
169
|
+
"entrypoint": "queries.reports.customer_revenue"
|
|
170
|
+
}
|
|
95
171
|
}
|
|
96
172
|
]
|
|
@@ -4,4 +4,6 @@ These RFC 0004 fixtures cover the declarative Serve/Zod schema features that can
|
|
|
4
4
|
|
|
5
5
|
`success.json` exercises every portable schema kind. `rejections.json` pins stable errors for invalid values plus generated depth, width, description-size, and unsafe-accessor boundaries.
|
|
6
6
|
|
|
7
|
+
Acceptance of RFC 0004 extended the rejection corpus to pin the constraint rules the accepted text now freezes: `void` rejecting a `default` as an unknown field, a `default` its own schema would reject, an untagged composite default, empty `enum.values`, a single-variant `union`, repeated `required` names, a missing `unknownProperties`, and the numeric and collection bound rules.
|
|
8
|
+
|
|
7
9
|
Every rejection contains exactly one literal value or deterministic generator.
|