@query-farm/vgi 0.29.0 → 0.30.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.
Files changed (91) hide show
  1. package/README.md +26 -1
  2. package/dist/arguments/argument-spec.d.ts +4 -2
  3. package/dist/catalog/composite.d.ts +13 -13
  4. package/dist/catalog/descriptors.d.ts +7 -3
  5. package/dist/catalog/interface.d.ts +67 -40
  6. package/dist/catalog/read-only.d.ts +32 -15
  7. package/dist/client/client.d.ts +36 -29
  8. package/dist/client/types.d.ts +2 -0
  9. package/dist/client-entry.d.ts +1 -1
  10. package/dist/client-entry.js +442 -283
  11. package/dist/client-entry.js.map +12 -11
  12. package/dist/filter-pushdown/capabilities.d.ts +3 -0
  13. package/dist/filter-pushdown/deserialize.d.ts +14 -15
  14. package/dist/filter-pushdown/evaluate.d.ts +14 -44
  15. package/dist/filter-pushdown/index.d.ts +2 -2
  16. package/dist/filter-pushdown/types.d.ts +120 -68
  17. package/dist/functions/aggregate.d.ts +4 -0
  18. package/dist/functions/registry.d.ts +5 -5
  19. package/dist/functions/scalar.d.ts +6 -1
  20. package/dist/functions/table-buffering.d.ts +9 -0
  21. package/dist/functions/table-in-out.d.ts +13 -0
  22. package/dist/functions/table.d.ts +9 -2
  23. package/dist/functions/types.d.ts +22 -2
  24. package/dist/generated/vgi-client.d.ts +57 -31
  25. package/dist/generated/vgi-protocol-schemas.d.ts +15 -0
  26. package/dist/http/fetch.d.ts +7 -1
  27. package/dist/index.core.d.ts +2 -1
  28. package/dist/index.js +2320 -1363
  29. package/dist/index.js.map +44 -41
  30. package/dist/metadata/types.d.ts +15 -2
  31. package/dist/protocol/handlers/shared.d.ts +3 -1
  32. package/dist/protocol/serializers/splits.d.ts +1 -1
  33. package/dist/protocol/types.d.ts +9 -3
  34. package/dist/schema-path.d.ts +7 -0
  35. package/dist/serve-entry.d.ts +22 -1
  36. package/dist/serve-entry.js +414 -243
  37. package/dist/serve-entry.js.map +28 -27
  38. package/dist/split-token.d.ts +1 -1
  39. package/dist/types.d.ts +8 -0
  40. package/dist/worker-cf-entry.js +2033 -1210
  41. package/dist/worker-cf-entry.js.map +41 -37
  42. package/dist/worker.d.ts +1 -1
  43. package/package.json +3 -3
  44. package/src/arguments/argument-spec.ts +12 -4
  45. package/src/catalog/composite.ts +26 -26
  46. package/src/catalog/descriptors.ts +12 -3
  47. package/src/catalog/interface.ts +98 -48
  48. package/src/catalog/read-only.ts +125 -71
  49. package/src/client/client.ts +92 -72
  50. package/src/client/types.ts +2 -0
  51. package/src/client-entry.ts +2 -1
  52. package/src/filter-pushdown/capabilities.ts +13 -0
  53. package/src/filter-pushdown/collector.ts +22 -35
  54. package/src/filter-pushdown/deserialize.ts +657 -221
  55. package/src/filter-pushdown/evaluate.ts +410 -499
  56. package/src/filter-pushdown/index.ts +16 -2
  57. package/src/filter-pushdown/types.ts +88 -71
  58. package/src/functions/aggregate.ts +9 -1
  59. package/src/functions/registry.ts +24 -22
  60. package/src/functions/scalar.ts +26 -0
  61. package/src/functions/table-buffering.ts +46 -7
  62. package/src/functions/table-in-out.ts +187 -30
  63. package/src/functions/table.ts +58 -20
  64. package/src/functions/types.ts +24 -1
  65. package/src/generated/vgi-client.ts +62 -33
  66. package/src/generated/vgi-protocol-schemas.ts +226 -58
  67. package/src/http/client-bundle.ts +1 -1
  68. package/src/http/fetch.ts +12 -0
  69. package/src/index.core.ts +2 -0
  70. package/src/metadata/resolve.ts +43 -1
  71. package/src/metadata/serialize.ts +43 -5
  72. package/src/metadata/types.ts +17 -1
  73. package/src/protocol/dispatch.ts +1 -1
  74. package/src/protocol/handlers/aggregate.ts +13 -7
  75. package/src/protocol/handlers/catalog/admin.ts +6 -6
  76. package/src/protocol/handlers/catalog/index_methods.ts +2 -2
  77. package/src/protocol/handlers/catalog/macro.ts +4 -4
  78. package/src/protocol/handlers/catalog/shared.ts +2 -0
  79. package/src/protocol/handlers/catalog/table.ts +16 -16
  80. package/src/protocol/handlers/catalog/view.ts +5 -5
  81. package/src/protocol/handlers/function.ts +2 -2
  82. package/src/protocol/handlers/shared.ts +12 -3
  83. package/src/protocol/handlers/table-buffering.ts +4 -4
  84. package/src/protocol/serializers/bind.ts +15 -6
  85. package/src/protocol/serializers/splits.ts +4 -2
  86. package/src/protocol/types.ts +9 -3
  87. package/src/schema-path.ts +25 -0
  88. package/src/serve-entry.ts +65 -3
  89. package/src/split-token.ts +2 -2
  90. package/src/types.ts +9 -0
  91. package/src/worker.ts +49 -4
@@ -2,7 +2,7 @@
2
2
  // GENERATED by vgi.codegen.ts_client. DO NOT EDIT BY HAND.
3
3
  //
4
4
  // Generator: vgi-gen-ts-client v1
5
- // Content hash: bda03237975e
5
+ // Content hash: 69731fc31f09
6
6
  //
7
7
  // To regenerate:
8
8
  // uv run --project ~/Development/vgi-python vgi-gen-ts-client \
@@ -20,6 +20,7 @@ import {
20
20
  ViewInfoSchema,
21
21
  } from "./vgi-protocol-schemas.js";
22
22
 
23
+ export type ArgumentMonotonicity = "UNKNOWN" | "CONSTANT" | "NON_DECREASING" | "STRICTLY_INCREASING" | "NON_INCREASING" | "STRICTLY_DECREASING";
23
24
  export type DistinctDependence = "DISTINCT_DEPENDENT" | "NOT_DISTINCT_DEPENDENT";
24
25
  export type FunctionStability = "CONSISTENT" | "VOLATILE" | "CONSISTENT_WITHIN_QUERY";
25
26
  export type FunctionType = "SCALAR" | "TABLE" | "TABLE_BUFFERING" | "AGGREGATE";
@@ -56,7 +57,7 @@ export interface SchemaInfo {
56
57
  comment?: string | null;
57
58
  tags: Record<string, string>;
58
59
  attach_opaque_data: Uint8Array;
59
- name: string;
60
+ path: string[];
60
61
  estimated_object_count?: Record<string, number> | null;
61
62
  }
62
63
 
@@ -64,17 +65,14 @@ export interface TableInfo {
64
65
  comment?: string | null;
65
66
  tags: Record<string, string>;
66
67
  name: string;
67
- schema_name: string;
68
+ schema_path: string[];
68
69
  columns: Uint8Array;
69
70
  not_null_constraints: number[];
70
71
  unique_constraints: number[][];
71
72
  check_constraints: string[];
72
73
  primary_key_constraints: number[][];
73
74
  foreign_key_constraints: Uint8Array[];
74
- supports_insert: boolean;
75
- supports_update: boolean;
76
- supports_delete: boolean;
77
- supports_returning: boolean;
75
+ write_result_modes: Record<string, string>;
78
76
  supports_column_statistics: boolean;
79
77
  scan_function?: Uint8Array | null;
80
78
  insert_function?: Uint8Array | null;
@@ -91,7 +89,7 @@ export interface ViewInfo {
91
89
  comment?: string | null;
92
90
  tags: Record<string, string>;
93
91
  name: string;
94
- schema_name: string;
92
+ schema_path: string[];
95
93
  definition: string;
96
94
  column_comments: Record<string, string>;
97
95
  }
@@ -102,6 +100,23 @@ export interface CatalogExample {
102
100
  expected_output?: string | null;
103
101
  }
104
102
 
103
+ export interface FilterFunctionCapability {
104
+ namespace: string;
105
+ name: string;
106
+ version: number;
107
+ }
108
+
109
+ export interface RuntimeFilterAlgorithmCapability {
110
+ namespace: string;
111
+ name: string;
112
+ version: number;
113
+ }
114
+
115
+ export interface EvaluationContextCapability {
116
+ profile: string;
117
+ provider_fingerprint?: string | null;
118
+ }
119
+
105
120
  export interface SecretLookupEntry {
106
121
  secret_type: string;
107
122
  scope?: string | null;
@@ -112,12 +127,14 @@ export interface FunctionInfo {
112
127
  comment?: string | null;
113
128
  tags: Record<string, string>;
114
129
  name: string;
115
- schema_name: string;
130
+ schema_path: string[];
116
131
  function_type: FunctionType;
117
132
  arguments: Uint8Array;
118
133
  output_schema: Uint8Array;
134
+ parameter_default_values?: /** @record-batch */ Uint8Array | null;
119
135
  stability?: FunctionStability | null;
120
136
  null_handling?: NullHandling | null;
137
+ argument_monotonicity?: ArgumentMonotonicity[] | null;
121
138
  description: string;
122
139
  examples: CatalogExample[];
123
140
  categories: string[];
@@ -125,7 +142,10 @@ export interface FunctionInfo {
125
142
  filter_pushdown?: boolean | null;
126
143
  sampling_pushdown?: boolean | null;
127
144
  late_materialization?: boolean | null;
128
- supported_expression_filters: string[];
145
+ filter_semantic_profiles: string[];
146
+ additional_filter_functions: FilterFunctionCapability[];
147
+ runtime_filter_algorithms: RuntimeFilterAlgorithmCapability[];
148
+ filter_evaluation_contexts: EvaluationContextCapability[];
129
149
  order_preservation?: OrderPreservation | null;
130
150
  max_workers?: number | null;
131
151
  supports_batch_index: boolean;
@@ -151,7 +171,7 @@ export interface MacroInfo {
151
171
  comment?: string | null;
152
172
  tags: Record<string, string>;
153
173
  name: string;
154
- schema_name: string;
174
+ schema_path: string[];
155
175
  macro_type: MacroType;
156
176
  parameters: string[];
157
177
  parameter_default_values?: /** @record-batch */ Uint8Array | null;
@@ -163,7 +183,7 @@ export interface IndexInfo {
163
183
  comment?: string | null;
164
184
  tags: Record<string, string>;
165
185
  name: string;
166
- schema_name: string;
186
+ schema_path: string[];
167
187
  table_name: string;
168
188
  index_type: string;
169
189
  constraint_type: IndexConstraintType;
@@ -178,7 +198,8 @@ export interface AggregateBindRequest {
178
198
  settings?: /** @record-batch */ Uint8Array | null;
179
199
  secrets?: /** @record-batch */ Uint8Array | null;
180
200
  attach_opaque_data?: Uint8Array | null;
181
- schema_name?: string | null;
201
+ schema_path?: string[] | null;
202
+ argument_names?: (string | null)[] | null;
182
203
  }
183
204
 
184
205
  export interface AggregateBindResponse {
@@ -191,7 +212,7 @@ export interface AggregateCombineRequest {
191
212
  execution_id: Uint8Array;
192
213
  merge_batch: Uint8Array;
193
214
  attach_opaque_data?: Uint8Array | null;
194
- schema_name?: string | null;
215
+ schema_path?: string[] | null;
195
216
  }
196
217
 
197
218
  export interface AggregateCombineResponse {
@@ -202,7 +223,7 @@ export interface AggregateDestructorRequest {
202
223
  execution_id: Uint8Array;
203
224
  group_ids_batch: Uint8Array;
204
225
  attach_opaque_data?: Uint8Array | null;
205
- schema_name?: string | null;
226
+ schema_path?: string[] | null;
206
227
  }
207
228
 
208
229
  export interface AggregateDestructorResponse {
@@ -214,7 +235,7 @@ export interface AggregateFinalizeRequest {
214
235
  group_ids_batch: Uint8Array;
215
236
  output_schema: /** @arrow-schema */ Uint8Array;
216
237
  attach_opaque_data?: Uint8Array | null;
217
- schema_name?: string | null;
238
+ schema_path?: string[] | null;
218
239
  }
219
240
 
220
241
  export interface AggregateFinalizeResponse {
@@ -226,7 +247,7 @@ export interface AggregateStreamingChunkRequest {
226
247
  execution_id: Uint8Array;
227
248
  input_batch: Uint8Array;
228
249
  attach_opaque_data?: Uint8Array | null;
229
- schema_name?: string | null;
250
+ schema_path?: string[] | null;
230
251
  }
231
252
 
232
253
  export interface AggregateStreamingChunkResponse {
@@ -237,7 +258,7 @@ export interface AggregateStreamingCloseRequest {
237
258
  function_name: string;
238
259
  execution_id: Uint8Array;
239
260
  attach_opaque_data?: Uint8Array | null;
240
- schema_name?: string | null;
261
+ schema_path?: string[] | null;
241
262
  }
242
263
 
243
264
  export interface AggregateStreamingCloseResponse {
@@ -253,7 +274,7 @@ export interface AggregateStreamingOpenRequest {
253
274
  settings?: /** @record-batch */ Uint8Array | null;
254
275
  secrets?: /** @record-batch */ Uint8Array | null;
255
276
  attach_opaque_data?: Uint8Array | null;
256
- schema_name?: string | null;
277
+ schema_path?: string[] | null;
257
278
  }
258
279
 
259
280
  export interface AggregateStreamingOpenResponse {
@@ -265,7 +286,7 @@ export interface AggregateUpdateRequest {
265
286
  execution_id: Uint8Array;
266
287
  input_batch: Uint8Array;
267
288
  attach_opaque_data?: Uint8Array | null;
268
- schema_name?: string | null;
289
+ schema_path?: string[] | null;
269
290
  }
270
291
 
271
292
  export interface AggregateUpdateResponse {
@@ -279,7 +300,7 @@ export interface AggregateWindowRequest {
279
300
  frame_starts: number[];
280
301
  frame_ends: number[];
281
302
  attach_opaque_data?: Uint8Array | null;
282
- schema_name?: string | null;
303
+ schema_path?: string[] | null;
283
304
  }
284
305
 
285
306
  export interface AggregateWindowResponse {
@@ -296,7 +317,7 @@ export interface AggregateWindowBatchRequest {
296
317
  frame_starts: number[];
297
318
  frame_ends: number[];
298
319
  attach_opaque_data?: Uint8Array | null;
299
- schema_name?: string | null;
320
+ schema_path?: string[] | null;
300
321
  }
301
322
 
302
323
  export interface AggregateWindowBatchResponse {
@@ -308,7 +329,7 @@ export interface AggregateWindowDestructorRequest {
308
329
  execution_id: Uint8Array;
309
330
  partition_id: number;
310
331
  attach_opaque_data?: Uint8Array | null;
311
- schema_name?: string | null;
332
+ schema_path?: string[] | null;
312
333
  }
313
334
 
314
335
  export interface AggregateWindowDestructorResponse {
@@ -325,7 +346,7 @@ export interface AggregateWindowInitRequest {
325
346
  frame_stats: Uint8Array;
326
347
  all_valid: Uint8Array;
327
348
  attach_opaque_data?: Uint8Array | null;
328
- schema_name?: string | null;
349
+ schema_path?: string[] | null;
329
350
  }
330
351
 
331
352
  export interface AggregateWindowInitResponse {
@@ -356,7 +377,8 @@ export interface BindRequest {
356
377
  at_value?: string | null;
357
378
  copy_from?: CopyFromContext | null;
358
379
  copy_to?: CopyToContext | null;
359
- schema_name?: string | null;
380
+ schema_path?: string[] | null;
381
+ argument_names?: (string | null)[] | null;
360
382
  }
361
383
 
362
384
  export interface BindResponse {
@@ -367,12 +389,20 @@ export interface BindResponse {
367
389
  lookup_names: string[];
368
390
  }
369
391
 
392
+ export interface ClientCapabilities {
393
+ engine: string;
394
+ native_formats: string[];
395
+ catalogs: string[];
396
+ can_stream: boolean;
397
+ filter_encodings: string[];
398
+ }
399
+
370
400
  export interface CatalogAttachRequest {
371
401
  name: string;
372
402
  options?: /** @record-batch */ Uint8Array | null;
373
403
  data_version_spec?: string | null;
374
404
  implementation_version?: string | null;
375
- client_capabilities?: Uint8Array | null;
405
+ client_capabilities?: ClientCapabilities | null;
376
406
  }
377
407
 
378
408
  export interface CatalogAttachResult {
@@ -411,7 +441,7 @@ export interface CatalogCreateRequest {
411
441
 
412
442
  export interface IndexCreateRequest {
413
443
  attach_opaque_data: Uint8Array;
414
- schema_name: string;
444
+ schema_path: string[];
415
445
  name: string;
416
446
  table_name: string;
417
447
  index_type: string;
@@ -428,7 +458,7 @@ export interface IndexesResponse {
428
458
 
429
459
  export interface MacroCreateRequest {
430
460
  attach_opaque_data: Uint8Array;
431
- schema_name: string;
461
+ schema_path: string[];
432
462
  name: string;
433
463
  macro_type: MacroType;
434
464
  parameters: string[];
@@ -461,7 +491,7 @@ export interface SchemasResponse {
461
491
 
462
492
  export interface TableCreateRequest {
463
493
  attach_opaque_data: Uint8Array;
464
- schema_name: string;
494
+ schema_path: string[];
465
495
  name: string;
466
496
  columns: Uint8Array;
467
497
  on_conflict: OnConflict;
@@ -509,7 +539,7 @@ export interface TableBufferingCombineRequest {
509
539
  state_ids: Uint8Array[];
510
540
  attach_opaque_data?: Uint8Array | null;
511
541
  transaction_id?: Uint8Array | null;
512
- schema_name?: string | null;
542
+ schema_path?: string[] | null;
513
543
  }
514
544
 
515
545
  export interface TableBufferingCombineResponse {
@@ -521,7 +551,7 @@ export interface TableBufferingDestructorRequest {
521
551
  execution_id: Uint8Array;
522
552
  attach_opaque_data?: Uint8Array | null;
523
553
  transaction_id?: Uint8Array | null;
524
- schema_name?: string | null;
554
+ schema_path?: string[] | null;
525
555
  }
526
556
 
527
557
  export interface TableBufferingDestructorResponse {
@@ -534,7 +564,7 @@ export interface TableBufferingProcessRequest {
534
564
  attach_opaque_data?: Uint8Array | null;
535
565
  transaction_id?: Uint8Array | null;
536
566
  batch_index?: number | null;
537
- schema_name?: string | null;
567
+ schema_path?: string[] | null;
538
568
  }
539
569
 
540
570
  export interface TableBufferingProcessResponse {
@@ -640,4 +670,3 @@ export const encodeTableInfo = (v: TableInfo): Uint8Array => encodeASD(TableInfo
640
670
  export const decodeTableInfo = (b: Uint8Array): TableInfo => decodeASD<TableInfo>(TableInfoSchema, b);
641
671
  export const encodeViewInfo = (v: ViewInfo): Uint8Array => encodeASD(ViewInfoSchema, v);
642
672
  export const decodeViewInfo = (b: Uint8Array): ViewInfo => decodeASD<ViewInfo>(ViewInfoSchema, b);
643
-