@query-farm/vgi 0.22.0 → 0.24.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/catalog/descriptors.d.ts +18 -0
- package/dist/catalog/read-only.d.ts +20 -0
- package/dist/client-entry.js +5 -1
- package/dist/client-entry.js.map +5 -5
- package/dist/generated/vgi-client.d.ts +2 -0
- package/dist/index.js +94 -60
- package/dist/index.js.map +9 -9
- package/dist/serve-entry.js +20 -10
- package/dist/serve-entry.js.map +7 -7
- package/dist/worker-cf-entry.js +92 -61
- package/dist/worker-cf-entry.js.map +8 -8
- package/package.json +3 -3
- package/src/catalog/descriptors.ts +18 -0
- package/src/catalog/read-only.ts +51 -2
- package/src/client/client.ts +4 -0
- package/src/generated/vgi-client.ts +3 -1
- package/src/generated/vgi-protocol-schemas.ts +3 -1
- package/src/protocol/handlers/aggregate.ts +18 -6
- package/src/protocol/handlers/catalog/admin.ts +6 -0
- package/src/protocol/handlers/table-buffering.ts +10 -2
package/dist/serve-entry.js
CHANGED
|
@@ -3471,6 +3471,8 @@ var CatalogAttachResultSchema = schema2([
|
|
|
3471
3471
|
field2("comment", utf82(), true),
|
|
3472
3472
|
field2("tags", map2(field2("key", utf82(), false), field2("value", utf82(), true), false), false),
|
|
3473
3473
|
field2("supports_column_statistics", bool2(), false),
|
|
3474
|
+
field2("global_functions", list2(field2("item", binary2(), true)), false),
|
|
3475
|
+
field2("global_function_prefix", utf82(), false),
|
|
3474
3476
|
field2("resolved_data_version", utf82(), true),
|
|
3475
3477
|
field2("resolved_implementation_version", utf82(), true)
|
|
3476
3478
|
]);
|
|
@@ -5280,8 +5282,13 @@ function persistGroupStates(executionId, gids) {
|
|
|
5280
5282
|
|
|
5281
5283
|
// src/protocol/handlers/aggregate.ts
|
|
5282
5284
|
function registerAggregateMethods(protocol, registry) {
|
|
5283
|
-
function resolveAggregate(name) {
|
|
5284
|
-
const func = registry.get(name, {
|
|
5285
|
+
function resolveAggregate(name, schemaName) {
|
|
5286
|
+
const func = registry.get(name, {
|
|
5287
|
+
arguments: new Arguments,
|
|
5288
|
+
inputSchema: null,
|
|
5289
|
+
isScalar: false,
|
|
5290
|
+
schemaName: schemaName ?? null
|
|
5291
|
+
});
|
|
5285
5292
|
if (!func || func.kind !== "aggregate") {
|
|
5286
5293
|
throw new Error(`Function '${name}' is not an aggregate function`);
|
|
5287
5294
|
}
|
|
@@ -5293,7 +5300,7 @@ function registerAggregateMethods(protocol, registry) {
|
|
|
5293
5300
|
handler: async (params) => {
|
|
5294
5301
|
const innerParams = unwrapRequest(params.request);
|
|
5295
5302
|
const functionName = innerParams.function_name;
|
|
5296
|
-
const cfg = resolveAggregate(functionName);
|
|
5303
|
+
const cfg = resolveAggregate(functionName, innerParams.schema_name ?? null);
|
|
5297
5304
|
const argBytes = toUint8Array(innerParams.arguments);
|
|
5298
5305
|
const args = deserializeArguments(argBytes);
|
|
5299
5306
|
const inputSchema = innerParams.input_schema ? deserializeSchema(toUint8Array(innerParams.input_schema)) : null;
|
|
@@ -5326,7 +5333,7 @@ function registerAggregateMethods(protocol, registry) {
|
|
|
5326
5333
|
const innerParams = unwrapRequest(params.request);
|
|
5327
5334
|
const functionName = innerParams.function_name;
|
|
5328
5335
|
const executionId = toUint8Array(innerParams.execution_id);
|
|
5329
|
-
const cfg = resolveAggregate(functionName);
|
|
5336
|
+
const cfg = resolveAggregate(functionName, innerParams.schema_name ?? null);
|
|
5330
5337
|
const batch = readSingleBatch(toUint8Array(innerParams.input_batch));
|
|
5331
5338
|
if (!batch || batch.numRows === 0)
|
|
5332
5339
|
return wrapResult({}, schema2([]));
|
|
@@ -5379,7 +5386,7 @@ function registerAggregateMethods(protocol, registry) {
|
|
|
5379
5386
|
const innerParams = unwrapRequest(params.request);
|
|
5380
5387
|
const functionName = innerParams.function_name;
|
|
5381
5388
|
const executionId = toUint8Array(innerParams.execution_id);
|
|
5382
|
-
const cfg = resolveAggregate(functionName);
|
|
5389
|
+
const cfg = resolveAggregate(functionName, innerParams.schema_name ?? null);
|
|
5383
5390
|
const batch = readSingleBatch(toUint8Array(innerParams.merge_batch));
|
|
5384
5391
|
if (!batch || batch.numRows === 0)
|
|
5385
5392
|
return wrapResult({}, schema2([]));
|
|
@@ -5424,7 +5431,7 @@ function registerAggregateMethods(protocol, registry) {
|
|
|
5424
5431
|
const innerParams = unwrapRequest(params.request);
|
|
5425
5432
|
const functionName = innerParams.function_name;
|
|
5426
5433
|
const executionId = toUint8Array(innerParams.execution_id);
|
|
5427
|
-
const cfg = resolveAggregate(functionName);
|
|
5434
|
+
const cfg = resolveAggregate(functionName, innerParams.schema_name ?? null);
|
|
5428
5435
|
const outputSchema = deserializeSchema(toUint8Array(innerParams.output_schema));
|
|
5429
5436
|
const gidBatch = readSingleBatch(toUint8Array(innerParams.group_ids_batch));
|
|
5430
5437
|
const groupIds = [];
|
|
@@ -5570,11 +5577,12 @@ function splitLenPrefixed(buf, count) {
|
|
|
5570
5577
|
|
|
5571
5578
|
// src/protocol/handlers/table-buffering.ts
|
|
5572
5579
|
function registerTableBufferingMethods(protocol, registry, signingKey) {
|
|
5573
|
-
function resolveBuffering(name) {
|
|
5580
|
+
function resolveBuffering(name, schemaName) {
|
|
5574
5581
|
const func = registry.get(name, {
|
|
5575
5582
|
arguments: new Arguments,
|
|
5576
5583
|
inputSchema: null,
|
|
5577
|
-
isScalar: false
|
|
5584
|
+
isScalar: false,
|
|
5585
|
+
schemaName: schemaName ?? null
|
|
5578
5586
|
});
|
|
5579
5587
|
if (!func || func.kind !== "table_buffering") {
|
|
5580
5588
|
throw new Error(`Function '${name}' is not a table_buffering function`);
|
|
@@ -5587,7 +5595,7 @@ function registerTableBufferingMethods(protocol, registry, signingKey) {
|
|
|
5587
5595
|
const rawAttach = inner.attach_opaque_data ? toUint8Array(inner.attach_opaque_data) : null;
|
|
5588
5596
|
const attach = rawAttach && rawAttach.length > 0 ? await openAttach(rawAttach, ctx?.auth, signingKey) : rawAttach;
|
|
5589
5597
|
const transactionId = inner.transaction_id ? toUint8Array(inner.transaction_id) : null;
|
|
5590
|
-
const func = resolveBuffering(functionName);
|
|
5598
|
+
const func = resolveBuffering(functionName, inner.schema_name ?? null);
|
|
5591
5599
|
const bound = new BoundStorage(storage, executionId);
|
|
5592
5600
|
const payload = await bound.stateGet(FrameworkNS.BUFFERING_INIT, BoundStorage.packIntKey(-1));
|
|
5593
5601
|
if (payload == null) {
|
|
@@ -5752,6 +5760,8 @@ function registerCatalogAdminMethods(protocol, getCatalog, signingKey) {
|
|
|
5752
5760
|
comment: result.comment ?? null,
|
|
5753
5761
|
tags: result.tags ?? {},
|
|
5754
5762
|
supports_column_statistics: result.supports_column_statistics ?? true,
|
|
5763
|
+
global_functions: result.global_functions ?? [],
|
|
5764
|
+
global_function_prefix: result.global_function_prefix ?? "",
|
|
5755
5765
|
resolved_data_version: result.resolved_data_version ?? null,
|
|
5756
5766
|
resolved_implementation_version: result.resolved_implementation_version ?? null
|
|
5757
5767
|
}, CatalogAttachResultSchema);
|
|
@@ -6462,4 +6472,4 @@ export {
|
|
|
6462
6472
|
DEFAULT_PORT
|
|
6463
6473
|
};
|
|
6464
6474
|
|
|
6465
|
-
//# debugId=
|
|
6475
|
+
//# debugId=FBD13B7363E61A7B64756E2164756E21
|