@query-farm/vgi 0.17.0 → 0.19.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/dist/arrow/impl-arrowjs/index.d.ts +1 -0
- package/dist/arrow/impl-arrowjs/metadata.d.ts +12 -0
- package/dist/arrow/impl-flechette/index.d.ts +1 -0
- package/dist/arrow/impl-flechette/metadata.d.ts +13 -0
- package/dist/arrow/index.d.ts +1 -1
- package/dist/catalog/descriptors.d.ts +13 -7
- package/dist/client-entry.js +16 -5
- package/dist/client-entry.js.map +9 -8
- package/dist/functions/scalar.d.ts +10 -0
- package/dist/functions/table-in-out.d.ts +121 -0
- package/dist/functions/types.d.ts +12 -0
- package/dist/generated/vgi-client.d.ts +3 -1
- package/dist/index.core.d.ts +1 -1
- package/dist/index.js +310 -21
- package/dist/index.js.map +16 -15
- package/dist/protocol/types.d.ts +12 -0
- package/dist/serve-entry.js +14 -4
- package/dist/serve-entry.js.map +8 -7
- package/dist/worker-cf-entry.js +188 -26
- package/dist/worker-cf-entry.js.map +14 -13
- package/dist/worker.d.ts +1 -1
- package/package.json +3 -3
- package/src/arrow/impl-arrowjs/index.ts +1 -0
- package/src/arrow/impl-arrowjs/metadata.ts +20 -0
- package/src/arrow/impl-flechette/index.ts +1 -0
- package/src/arrow/impl-flechette/metadata.ts +25 -0
- package/src/arrow/index.ts +2 -0
- package/src/catalog/descriptors.ts +13 -7
- package/src/catalog/read-only.ts +31 -14
- package/src/client/client.ts +1 -0
- package/src/functions/registry.ts +53 -5
- package/src/functions/scalar.ts +17 -1
- package/src/functions/table-in-out.ts +480 -4
- package/src/functions/types.ts +12 -0
- package/src/generated/vgi-client.ts +4 -2
- package/src/generated/vgi-protocol-schemas.ts +3 -2
- package/src/index.core.ts +11 -1
- package/src/protocol/serializers/init.ts +7 -0
- package/src/protocol/types.ts +12 -0
- package/src/worker.ts +1 -1
package/dist/protocol/types.d.ts
CHANGED
|
@@ -102,6 +102,18 @@ export interface InitRequest {
|
|
|
102
102
|
finalize_state_id: Uint8Array | null;
|
|
103
103
|
execution_id: Uint8Array | null;
|
|
104
104
|
init_opaque_data: Uint8Array | null;
|
|
105
|
+
/**
|
|
106
|
+
* Per-substream identity for parallel streaming table-in-out functions.
|
|
107
|
+
* A stable, CLIENT-minted id for one substream (one DuckDB PipelineExecutor),
|
|
108
|
+
* identical across this substream's init / every process tick / finalize.
|
|
109
|
+
* Unlike a worker-minted `execution_id`, it survives an HTTP load balancer
|
|
110
|
+
* dispatching each request to an arbitrary backend: a finalize that lands on
|
|
111
|
+
* a different backend than the process() calls can still key the substream's
|
|
112
|
+
* accumulated state (in shared storage) by `substream_id`. `null` when the
|
|
113
|
+
* client did not supply one (serial path, non-table-in-out functions, old
|
|
114
|
+
* clients). Mirrors vgi-python's `InitRequest.substream_id`.
|
|
115
|
+
*/
|
|
116
|
+
substream_id: Uint8Array | null;
|
|
105
117
|
order_by_column_name: string | null;
|
|
106
118
|
order_by_direction: OrderByDirection | null;
|
|
107
119
|
order_by_null_order: OrderByNullOrder | null;
|
package/dist/serve-entry.js
CHANGED
|
@@ -578,6 +578,7 @@ function isDecimal(t) {
|
|
|
578
578
|
// src/arrow/impl-arrowjs/index.ts
|
|
579
579
|
var exports_impl_arrowjs = {};
|
|
580
580
|
__export(exports_impl_arrowjs, {
|
|
581
|
+
withBatchMetadata: () => withBatchMetadata,
|
|
581
582
|
utf8: () => utf8,
|
|
582
583
|
union: () => union,
|
|
583
584
|
uint8: () => uint8,
|
|
@@ -2107,6 +2108,12 @@ function projectBatch(projectionIds, batch) {
|
|
|
2107
2108
|
});
|
|
2108
2109
|
return new RecordBatch3(projectedSchema, data);
|
|
2109
2110
|
}
|
|
2111
|
+
// src/arrow/impl-arrowjs/metadata.ts
|
|
2112
|
+
import { RecordBatch as RecordBatch4 } from "@query-farm/apache-arrow";
|
|
2113
|
+
function withBatchMetadata(batch, metadata) {
|
|
2114
|
+
const a = batch;
|
|
2115
|
+
return new RecordBatch4(a.schema, a.data, metadata);
|
|
2116
|
+
}
|
|
2110
2117
|
// src/arrow/impl-arrowjs/ipc.ts
|
|
2111
2118
|
import {
|
|
2112
2119
|
Schema as Schema4,
|
|
@@ -2151,7 +2158,7 @@ import {
|
|
|
2151
2158
|
Field as Field3,
|
|
2152
2159
|
Null,
|
|
2153
2160
|
makeData as makeData5,
|
|
2154
|
-
RecordBatch as
|
|
2161
|
+
RecordBatch as RecordBatch6,
|
|
2155
2162
|
Struct as Struct5,
|
|
2156
2163
|
SparseUnion,
|
|
2157
2164
|
Schema as Schema5,
|
|
@@ -2263,7 +2270,7 @@ function assemble(columnNames, minData, maxData, hasNull, hasNotNull, distinctCo
|
|
|
2263
2270
|
];
|
|
2264
2271
|
const structType = new Struct5(schema2.fields);
|
|
2265
2272
|
const data = makeData5({ type: structType, length: n, children, nullCount: 0 });
|
|
2266
|
-
return new
|
|
2273
|
+
return new RecordBatch6(schema2, data);
|
|
2267
2274
|
}
|
|
2268
2275
|
|
|
2269
2276
|
// src/arrow/impl-arrowjs/index.ts
|
|
@@ -3110,6 +3117,7 @@ var INIT_REQUEST_SCHEMA = schema2([
|
|
|
3110
3117
|
field2("phase", utf82(), true),
|
|
3111
3118
|
field2("execution_id", binary2(), true),
|
|
3112
3119
|
field2("init_opaque_data", binary2(), true),
|
|
3120
|
+
field2("substream_id", binary2(), true),
|
|
3113
3121
|
field2("order_by_column_name", utf82(), true),
|
|
3114
3122
|
field2("order_by_direction", utf82(), true),
|
|
3115
3123
|
field2("order_by_null_order", utf82(), true),
|
|
@@ -3174,6 +3182,7 @@ function deserializeInitRequest(params) {
|
|
|
3174
3182
|
finalize_state_id: params.finalize_state_id ? toUint8Array2(params.finalize_state_id) : null,
|
|
3175
3183
|
execution_id: params.execution_id ? toUint8Array2(params.execution_id) : null,
|
|
3176
3184
|
init_opaque_data: params.init_opaque_data ? toUint8Array2(params.init_opaque_data) : null,
|
|
3185
|
+
substream_id: params.substream_id ? toUint8Array2(params.substream_id) : null,
|
|
3177
3186
|
order_by_column_name: parseEnum(decodeDictValue(params.order_by_column_name)) ?? null,
|
|
3178
3187
|
order_by_direction: parseDirection(decodeDictValue(params.order_by_direction)),
|
|
3179
3188
|
order_by_null_order: parseNullOrder(decodeDictValue(params.order_by_null_order)),
|
|
@@ -3307,7 +3316,7 @@ var TableInfoSchema = schema2([
|
|
|
3307
3316
|
field2("cardinality_max", int642(), false),
|
|
3308
3317
|
field2("column_statistics", binary2(), false),
|
|
3309
3318
|
field2("bind_result", binary2(), false),
|
|
3310
|
-
field2("
|
|
3319
|
+
field2("required_filters", list2(field2("item", list2(field2("item", utf82(), true)), true)), false)
|
|
3311
3320
|
]);
|
|
3312
3321
|
var ViewInfoSchema = schema2([
|
|
3313
3322
|
field2("comment", utf82(), true),
|
|
@@ -3347,6 +3356,7 @@ var FunctionInfoSchema = schema2([
|
|
|
3347
3356
|
field2("source_order_dependent", bool2(), false),
|
|
3348
3357
|
field2("sink_order_dependent", bool2(), false),
|
|
3349
3358
|
field2("requires_input_batch_index", bool2(), false),
|
|
3359
|
+
field2("input_from_args", bool2(), false),
|
|
3350
3360
|
field2("required_settings", list2(field2("item", utf82(), true)), false),
|
|
3351
3361
|
field2("required_secrets", list2(field2("item", struct2([field2("secret_type", utf82(), false), field2("scope", utf82(), true), field2("secret_name", utf82(), true)]), true)), false)
|
|
3352
3362
|
]);
|
|
@@ -6425,4 +6435,4 @@ export {
|
|
|
6425
6435
|
DEFAULT_PORT
|
|
6426
6436
|
};
|
|
6427
6437
|
|
|
6428
|
-
//# debugId=
|
|
6438
|
+
//# debugId=51AA40F4C2F8087064756E2164756E21
|