@query-farm/vgi 0.29.0 → 0.29.1

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 (90) 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 +441 -279
  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 +56 -27
  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 +2317 -1354
  29. package/dist/index.js.map +43 -40
  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 +412 -238
  37. package/dist/serve-entry.js.map +27 -26
  38. package/dist/split-token.d.ts +1 -1
  39. package/dist/types.d.ts +8 -0
  40. package/dist/worker-cf-entry.js +2030 -1201
  41. package/dist/worker-cf-entry.js.map +40 -36
  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 +124 -67
  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 +61 -29
  66. package/src/generated/vgi-protocol-schemas.ts +225 -54
  67. package/src/http/fetch.ts +12 -0
  68. package/src/index.core.ts +2 -0
  69. package/src/metadata/resolve.ts +43 -1
  70. package/src/metadata/serialize.ts +43 -5
  71. package/src/metadata/types.ts +17 -1
  72. package/src/protocol/dispatch.ts +1 -1
  73. package/src/protocol/handlers/aggregate.ts +13 -7
  74. package/src/protocol/handlers/catalog/admin.ts +6 -6
  75. package/src/protocol/handlers/catalog/index_methods.ts +2 -2
  76. package/src/protocol/handlers/catalog/macro.ts +4 -4
  77. package/src/protocol/handlers/catalog/shared.ts +2 -0
  78. package/src/protocol/handlers/catalog/table.ts +16 -16
  79. package/src/protocol/handlers/catalog/view.ts +5 -5
  80. package/src/protocol/handlers/function.ts +2 -2
  81. package/src/protocol/handlers/shared.ts +12 -3
  82. package/src/protocol/handlers/table-buffering.ts +4 -4
  83. package/src/protocol/serializers/bind.ts +15 -6
  84. package/src/protocol/serializers/splits.ts +4 -2
  85. package/src/protocol/types.ts +9 -3
  86. package/src/schema-path.ts +25 -0
  87. package/src/serve-entry.ts +65 -3
  88. package/src/split-token.ts +2 -2
  89. package/src/types.ts +9 -0
  90. 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: 2833516bd990
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,7 +65,7 @@ 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[][];
@@ -91,7 +92,7 @@ export interface ViewInfo {
91
92
  comment?: string | null;
92
93
  tags: Record<string, string>;
93
94
  name: string;
94
- schema_name: string;
95
+ schema_path: string[];
95
96
  definition: string;
96
97
  column_comments: Record<string, string>;
97
98
  }
@@ -102,6 +103,23 @@ export interface CatalogExample {
102
103
  expected_output?: string | null;
103
104
  }
104
105
 
106
+ export interface FilterFunctionCapability {
107
+ namespace: string;
108
+ name: string;
109
+ version: number;
110
+ }
111
+
112
+ export interface RuntimeFilterAlgorithmCapability {
113
+ namespace: string;
114
+ name: string;
115
+ version: number;
116
+ }
117
+
118
+ export interface EvaluationContextCapability {
119
+ profile: string;
120
+ provider_fingerprint?: string | null;
121
+ }
122
+
105
123
  export interface SecretLookupEntry {
106
124
  secret_type: string;
107
125
  scope?: string | null;
@@ -112,12 +130,14 @@ export interface FunctionInfo {
112
130
  comment?: string | null;
113
131
  tags: Record<string, string>;
114
132
  name: string;
115
- schema_name: string;
133
+ schema_path: string[];
116
134
  function_type: FunctionType;
117
135
  arguments: Uint8Array;
118
136
  output_schema: Uint8Array;
137
+ parameter_default_values?: /** @record-batch */ Uint8Array | null;
119
138
  stability?: FunctionStability | null;
120
139
  null_handling?: NullHandling | null;
140
+ argument_monotonicity?: ArgumentMonotonicity[] | null;
121
141
  description: string;
122
142
  examples: CatalogExample[];
123
143
  categories: string[];
@@ -125,7 +145,10 @@ export interface FunctionInfo {
125
145
  filter_pushdown?: boolean | null;
126
146
  sampling_pushdown?: boolean | null;
127
147
  late_materialization?: boolean | null;
128
- supported_expression_filters: string[];
148
+ filter_semantic_profiles: string[];
149
+ additional_filter_functions: FilterFunctionCapability[];
150
+ runtime_filter_algorithms: RuntimeFilterAlgorithmCapability[];
151
+ filter_evaluation_contexts: EvaluationContextCapability[];
129
152
  order_preservation?: OrderPreservation | null;
130
153
  max_workers?: number | null;
131
154
  supports_batch_index: boolean;
@@ -151,7 +174,7 @@ export interface MacroInfo {
151
174
  comment?: string | null;
152
175
  tags: Record<string, string>;
153
176
  name: string;
154
- schema_name: string;
177
+ schema_path: string[];
155
178
  macro_type: MacroType;
156
179
  parameters: string[];
157
180
  parameter_default_values?: /** @record-batch */ Uint8Array | null;
@@ -163,7 +186,7 @@ export interface IndexInfo {
163
186
  comment?: string | null;
164
187
  tags: Record<string, string>;
165
188
  name: string;
166
- schema_name: string;
189
+ schema_path: string[];
167
190
  table_name: string;
168
191
  index_type: string;
169
192
  constraint_type: IndexConstraintType;
@@ -178,7 +201,8 @@ export interface AggregateBindRequest {
178
201
  settings?: /** @record-batch */ Uint8Array | null;
179
202
  secrets?: /** @record-batch */ Uint8Array | null;
180
203
  attach_opaque_data?: Uint8Array | null;
181
- schema_name?: string | null;
204
+ schema_path?: string[] | null;
205
+ argument_names?: (string | null)[] | null;
182
206
  }
183
207
 
184
208
  export interface AggregateBindResponse {
@@ -191,7 +215,7 @@ export interface AggregateCombineRequest {
191
215
  execution_id: Uint8Array;
192
216
  merge_batch: Uint8Array;
193
217
  attach_opaque_data?: Uint8Array | null;
194
- schema_name?: string | null;
218
+ schema_path?: string[] | null;
195
219
  }
196
220
 
197
221
  export interface AggregateCombineResponse {
@@ -202,7 +226,7 @@ export interface AggregateDestructorRequest {
202
226
  execution_id: Uint8Array;
203
227
  group_ids_batch: Uint8Array;
204
228
  attach_opaque_data?: Uint8Array | null;
205
- schema_name?: string | null;
229
+ schema_path?: string[] | null;
206
230
  }
207
231
 
208
232
  export interface AggregateDestructorResponse {
@@ -214,7 +238,7 @@ export interface AggregateFinalizeRequest {
214
238
  group_ids_batch: Uint8Array;
215
239
  output_schema: /** @arrow-schema */ Uint8Array;
216
240
  attach_opaque_data?: Uint8Array | null;
217
- schema_name?: string | null;
241
+ schema_path?: string[] | null;
218
242
  }
219
243
 
220
244
  export interface AggregateFinalizeResponse {
@@ -226,7 +250,7 @@ export interface AggregateStreamingChunkRequest {
226
250
  execution_id: Uint8Array;
227
251
  input_batch: Uint8Array;
228
252
  attach_opaque_data?: Uint8Array | null;
229
- schema_name?: string | null;
253
+ schema_path?: string[] | null;
230
254
  }
231
255
 
232
256
  export interface AggregateStreamingChunkResponse {
@@ -237,7 +261,7 @@ export interface AggregateStreamingCloseRequest {
237
261
  function_name: string;
238
262
  execution_id: Uint8Array;
239
263
  attach_opaque_data?: Uint8Array | null;
240
- schema_name?: string | null;
264
+ schema_path?: string[] | null;
241
265
  }
242
266
 
243
267
  export interface AggregateStreamingCloseResponse {
@@ -253,7 +277,7 @@ export interface AggregateStreamingOpenRequest {
253
277
  settings?: /** @record-batch */ Uint8Array | null;
254
278
  secrets?: /** @record-batch */ Uint8Array | null;
255
279
  attach_opaque_data?: Uint8Array | null;
256
- schema_name?: string | null;
280
+ schema_path?: string[] | null;
257
281
  }
258
282
 
259
283
  export interface AggregateStreamingOpenResponse {
@@ -265,7 +289,7 @@ export interface AggregateUpdateRequest {
265
289
  execution_id: Uint8Array;
266
290
  input_batch: Uint8Array;
267
291
  attach_opaque_data?: Uint8Array | null;
268
- schema_name?: string | null;
292
+ schema_path?: string[] | null;
269
293
  }
270
294
 
271
295
  export interface AggregateUpdateResponse {
@@ -279,7 +303,7 @@ export interface AggregateWindowRequest {
279
303
  frame_starts: number[];
280
304
  frame_ends: number[];
281
305
  attach_opaque_data?: Uint8Array | null;
282
- schema_name?: string | null;
306
+ schema_path?: string[] | null;
283
307
  }
284
308
 
285
309
  export interface AggregateWindowResponse {
@@ -296,7 +320,7 @@ export interface AggregateWindowBatchRequest {
296
320
  frame_starts: number[];
297
321
  frame_ends: number[];
298
322
  attach_opaque_data?: Uint8Array | null;
299
- schema_name?: string | null;
323
+ schema_path?: string[] | null;
300
324
  }
301
325
 
302
326
  export interface AggregateWindowBatchResponse {
@@ -308,7 +332,7 @@ export interface AggregateWindowDestructorRequest {
308
332
  execution_id: Uint8Array;
309
333
  partition_id: number;
310
334
  attach_opaque_data?: Uint8Array | null;
311
- schema_name?: string | null;
335
+ schema_path?: string[] | null;
312
336
  }
313
337
 
314
338
  export interface AggregateWindowDestructorResponse {
@@ -325,7 +349,7 @@ export interface AggregateWindowInitRequest {
325
349
  frame_stats: Uint8Array;
326
350
  all_valid: Uint8Array;
327
351
  attach_opaque_data?: Uint8Array | null;
328
- schema_name?: string | null;
352
+ schema_path?: string[] | null;
329
353
  }
330
354
 
331
355
  export interface AggregateWindowInitResponse {
@@ -356,7 +380,8 @@ export interface BindRequest {
356
380
  at_value?: string | null;
357
381
  copy_from?: CopyFromContext | null;
358
382
  copy_to?: CopyToContext | null;
359
- schema_name?: string | null;
383
+ schema_path?: string[] | null;
384
+ argument_names?: (string | null)[] | null;
360
385
  }
361
386
 
362
387
  export interface BindResponse {
@@ -367,12 +392,20 @@ export interface BindResponse {
367
392
  lookup_names: string[];
368
393
  }
369
394
 
395
+ export interface ClientCapabilities {
396
+ engine: string;
397
+ native_formats: string[];
398
+ catalogs: string[];
399
+ can_stream: boolean;
400
+ filter_encodings: string[];
401
+ }
402
+
370
403
  export interface CatalogAttachRequest {
371
404
  name: string;
372
405
  options?: /** @record-batch */ Uint8Array | null;
373
406
  data_version_spec?: string | null;
374
407
  implementation_version?: string | null;
375
- client_capabilities?: Uint8Array | null;
408
+ client_capabilities?: ClientCapabilities | null;
376
409
  }
377
410
 
378
411
  export interface CatalogAttachResult {
@@ -411,7 +444,7 @@ export interface CatalogCreateRequest {
411
444
 
412
445
  export interface IndexCreateRequest {
413
446
  attach_opaque_data: Uint8Array;
414
- schema_name: string;
447
+ schema_path: string[];
415
448
  name: string;
416
449
  table_name: string;
417
450
  index_type: string;
@@ -428,7 +461,7 @@ export interface IndexesResponse {
428
461
 
429
462
  export interface MacroCreateRequest {
430
463
  attach_opaque_data: Uint8Array;
431
- schema_name: string;
464
+ schema_path: string[];
432
465
  name: string;
433
466
  macro_type: MacroType;
434
467
  parameters: string[];
@@ -461,7 +494,7 @@ export interface SchemasResponse {
461
494
 
462
495
  export interface TableCreateRequest {
463
496
  attach_opaque_data: Uint8Array;
464
- schema_name: string;
497
+ schema_path: string[];
465
498
  name: string;
466
499
  columns: Uint8Array;
467
500
  on_conflict: OnConflict;
@@ -509,7 +542,7 @@ export interface TableBufferingCombineRequest {
509
542
  state_ids: Uint8Array[];
510
543
  attach_opaque_data?: Uint8Array | null;
511
544
  transaction_id?: Uint8Array | null;
512
- schema_name?: string | null;
545
+ schema_path?: string[] | null;
513
546
  }
514
547
 
515
548
  export interface TableBufferingCombineResponse {
@@ -521,7 +554,7 @@ export interface TableBufferingDestructorRequest {
521
554
  execution_id: Uint8Array;
522
555
  attach_opaque_data?: Uint8Array | null;
523
556
  transaction_id?: Uint8Array | null;
524
- schema_name?: string | null;
557
+ schema_path?: string[] | null;
525
558
  }
526
559
 
527
560
  export interface TableBufferingDestructorResponse {
@@ -534,7 +567,7 @@ export interface TableBufferingProcessRequest {
534
567
  attach_opaque_data?: Uint8Array | null;
535
568
  transaction_id?: Uint8Array | null;
536
569
  batch_index?: number | null;
537
- schema_name?: string | null;
570
+ schema_path?: string[] | null;
538
571
  }
539
572
 
540
573
  export interface TableBufferingProcessResponse {
@@ -640,4 +673,3 @@ export const encodeTableInfo = (v: TableInfo): Uint8Array => encodeASD(TableInfo
640
673
  export const decodeTableInfo = (b: Uint8Array): TableInfo => decodeASD<TableInfo>(TableInfoSchema, b);
641
674
  export const encodeViewInfo = (v: ViewInfo): Uint8Array => encodeASD(ViewInfoSchema, v);
642
675
  export const decodeViewInfo = (b: Uint8Array): ViewInfo => decodeASD<ViewInfo>(ViewInfoSchema, b);
643
-