@query-farm/vgi 0.22.0 → 0.23.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/index.js +16 -10
- package/dist/index.js.map +4 -4
- package/dist/serve-entry.js +16 -10
- package/dist/serve-entry.js.map +4 -4
- package/dist/worker-cf-entry.js +16 -10
- package/dist/worker-cf-entry.js.map +4 -4
- package/package.json +1 -1
- package/src/protocol/handlers/aggregate.ts +18 -6
- package/src/protocol/handlers/table-buffering.ts +10 -2
package/dist/serve-entry.js
CHANGED
|
@@ -5280,8 +5280,13 @@ function persistGroupStates(executionId, gids) {
|
|
|
5280
5280
|
|
|
5281
5281
|
// src/protocol/handlers/aggregate.ts
|
|
5282
5282
|
function registerAggregateMethods(protocol, registry) {
|
|
5283
|
-
function resolveAggregate(name) {
|
|
5284
|
-
const func = registry.get(name, {
|
|
5283
|
+
function resolveAggregate(name, schemaName) {
|
|
5284
|
+
const func = registry.get(name, {
|
|
5285
|
+
arguments: new Arguments,
|
|
5286
|
+
inputSchema: null,
|
|
5287
|
+
isScalar: false,
|
|
5288
|
+
schemaName: schemaName ?? null
|
|
5289
|
+
});
|
|
5285
5290
|
if (!func || func.kind !== "aggregate") {
|
|
5286
5291
|
throw new Error(`Function '${name}' is not an aggregate function`);
|
|
5287
5292
|
}
|
|
@@ -5293,7 +5298,7 @@ function registerAggregateMethods(protocol, registry) {
|
|
|
5293
5298
|
handler: async (params) => {
|
|
5294
5299
|
const innerParams = unwrapRequest(params.request);
|
|
5295
5300
|
const functionName = innerParams.function_name;
|
|
5296
|
-
const cfg = resolveAggregate(functionName);
|
|
5301
|
+
const cfg = resolveAggregate(functionName, innerParams.schema_name ?? null);
|
|
5297
5302
|
const argBytes = toUint8Array(innerParams.arguments);
|
|
5298
5303
|
const args = deserializeArguments(argBytes);
|
|
5299
5304
|
const inputSchema = innerParams.input_schema ? deserializeSchema(toUint8Array(innerParams.input_schema)) : null;
|
|
@@ -5326,7 +5331,7 @@ function registerAggregateMethods(protocol, registry) {
|
|
|
5326
5331
|
const innerParams = unwrapRequest(params.request);
|
|
5327
5332
|
const functionName = innerParams.function_name;
|
|
5328
5333
|
const executionId = toUint8Array(innerParams.execution_id);
|
|
5329
|
-
const cfg = resolveAggregate(functionName);
|
|
5334
|
+
const cfg = resolveAggregate(functionName, innerParams.schema_name ?? null);
|
|
5330
5335
|
const batch = readSingleBatch(toUint8Array(innerParams.input_batch));
|
|
5331
5336
|
if (!batch || batch.numRows === 0)
|
|
5332
5337
|
return wrapResult({}, schema2([]));
|
|
@@ -5379,7 +5384,7 @@ function registerAggregateMethods(protocol, registry) {
|
|
|
5379
5384
|
const innerParams = unwrapRequest(params.request);
|
|
5380
5385
|
const functionName = innerParams.function_name;
|
|
5381
5386
|
const executionId = toUint8Array(innerParams.execution_id);
|
|
5382
|
-
const cfg = resolveAggregate(functionName);
|
|
5387
|
+
const cfg = resolveAggregate(functionName, innerParams.schema_name ?? null);
|
|
5383
5388
|
const batch = readSingleBatch(toUint8Array(innerParams.merge_batch));
|
|
5384
5389
|
if (!batch || batch.numRows === 0)
|
|
5385
5390
|
return wrapResult({}, schema2([]));
|
|
@@ -5424,7 +5429,7 @@ function registerAggregateMethods(protocol, registry) {
|
|
|
5424
5429
|
const innerParams = unwrapRequest(params.request);
|
|
5425
5430
|
const functionName = innerParams.function_name;
|
|
5426
5431
|
const executionId = toUint8Array(innerParams.execution_id);
|
|
5427
|
-
const cfg = resolveAggregate(functionName);
|
|
5432
|
+
const cfg = resolveAggregate(functionName, innerParams.schema_name ?? null);
|
|
5428
5433
|
const outputSchema = deserializeSchema(toUint8Array(innerParams.output_schema));
|
|
5429
5434
|
const gidBatch = readSingleBatch(toUint8Array(innerParams.group_ids_batch));
|
|
5430
5435
|
const groupIds = [];
|
|
@@ -5570,11 +5575,12 @@ function splitLenPrefixed(buf, count) {
|
|
|
5570
5575
|
|
|
5571
5576
|
// src/protocol/handlers/table-buffering.ts
|
|
5572
5577
|
function registerTableBufferingMethods(protocol, registry, signingKey) {
|
|
5573
|
-
function resolveBuffering(name) {
|
|
5578
|
+
function resolveBuffering(name, schemaName) {
|
|
5574
5579
|
const func = registry.get(name, {
|
|
5575
5580
|
arguments: new Arguments,
|
|
5576
5581
|
inputSchema: null,
|
|
5577
|
-
isScalar: false
|
|
5582
|
+
isScalar: false,
|
|
5583
|
+
schemaName: schemaName ?? null
|
|
5578
5584
|
});
|
|
5579
5585
|
if (!func || func.kind !== "table_buffering") {
|
|
5580
5586
|
throw new Error(`Function '${name}' is not a table_buffering function`);
|
|
@@ -5587,7 +5593,7 @@ function registerTableBufferingMethods(protocol, registry, signingKey) {
|
|
|
5587
5593
|
const rawAttach = inner.attach_opaque_data ? toUint8Array(inner.attach_opaque_data) : null;
|
|
5588
5594
|
const attach = rawAttach && rawAttach.length > 0 ? await openAttach(rawAttach, ctx?.auth, signingKey) : rawAttach;
|
|
5589
5595
|
const transactionId = inner.transaction_id ? toUint8Array(inner.transaction_id) : null;
|
|
5590
|
-
const func = resolveBuffering(functionName);
|
|
5596
|
+
const func = resolveBuffering(functionName, inner.schema_name ?? null);
|
|
5591
5597
|
const bound = new BoundStorage(storage, executionId);
|
|
5592
5598
|
const payload = await bound.stateGet(FrameworkNS.BUFFERING_INIT, BoundStorage.packIntKey(-1));
|
|
5593
5599
|
if (payload == null) {
|
|
@@ -6462,4 +6468,4 @@ export {
|
|
|
6462
6468
|
DEFAULT_PORT
|
|
6463
6469
|
};
|
|
6464
6470
|
|
|
6465
|
-
//# debugId=
|
|
6471
|
+
//# debugId=21DF07825CC8B15864756E2164756E21
|