@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/worker-cf-entry.js
CHANGED
|
@@ -5398,8 +5398,13 @@ function defineAggregate(config) {
|
|
|
5398
5398
|
|
|
5399
5399
|
// src/protocol/handlers/aggregate.ts
|
|
5400
5400
|
function registerAggregateMethods(protocol, registry) {
|
|
5401
|
-
function resolveAggregate(name) {
|
|
5402
|
-
const func = registry.get(name, {
|
|
5401
|
+
function resolveAggregate(name, schemaName) {
|
|
5402
|
+
const func = registry.get(name, {
|
|
5403
|
+
arguments: new Arguments,
|
|
5404
|
+
inputSchema: null,
|
|
5405
|
+
isScalar: false,
|
|
5406
|
+
schemaName: schemaName ?? null
|
|
5407
|
+
});
|
|
5403
5408
|
if (!func || func.kind !== "aggregate") {
|
|
5404
5409
|
throw new Error(`Function '${name}' is not an aggregate function`);
|
|
5405
5410
|
}
|
|
@@ -5411,7 +5416,7 @@ function registerAggregateMethods(protocol, registry) {
|
|
|
5411
5416
|
handler: async (params) => {
|
|
5412
5417
|
const innerParams = unwrapRequest(params.request);
|
|
5413
5418
|
const functionName = innerParams.function_name;
|
|
5414
|
-
const cfg = resolveAggregate(functionName);
|
|
5419
|
+
const cfg = resolveAggregate(functionName, innerParams.schema_name ?? null);
|
|
5415
5420
|
const argBytes = toUint8Array(innerParams.arguments);
|
|
5416
5421
|
const args = deserializeArguments(argBytes);
|
|
5417
5422
|
const inputSchema = innerParams.input_schema ? deserializeSchema(toUint8Array(innerParams.input_schema)) : null;
|
|
@@ -5444,7 +5449,7 @@ function registerAggregateMethods(protocol, registry) {
|
|
|
5444
5449
|
const innerParams = unwrapRequest(params.request);
|
|
5445
5450
|
const functionName = innerParams.function_name;
|
|
5446
5451
|
const executionId = toUint8Array(innerParams.execution_id);
|
|
5447
|
-
const cfg = resolveAggregate(functionName);
|
|
5452
|
+
const cfg = resolveAggregate(functionName, innerParams.schema_name ?? null);
|
|
5448
5453
|
const batch = readSingleBatch(toUint8Array(innerParams.input_batch));
|
|
5449
5454
|
if (!batch || batch.numRows === 0)
|
|
5450
5455
|
return wrapResult({}, schema2([]));
|
|
@@ -5497,7 +5502,7 @@ function registerAggregateMethods(protocol, registry) {
|
|
|
5497
5502
|
const innerParams = unwrapRequest(params.request);
|
|
5498
5503
|
const functionName = innerParams.function_name;
|
|
5499
5504
|
const executionId = toUint8Array(innerParams.execution_id);
|
|
5500
|
-
const cfg = resolveAggregate(functionName);
|
|
5505
|
+
const cfg = resolveAggregate(functionName, innerParams.schema_name ?? null);
|
|
5501
5506
|
const batch = readSingleBatch(toUint8Array(innerParams.merge_batch));
|
|
5502
5507
|
if (!batch || batch.numRows === 0)
|
|
5503
5508
|
return wrapResult({}, schema2([]));
|
|
@@ -5542,7 +5547,7 @@ function registerAggregateMethods(protocol, registry) {
|
|
|
5542
5547
|
const innerParams = unwrapRequest(params.request);
|
|
5543
5548
|
const functionName = innerParams.function_name;
|
|
5544
5549
|
const executionId = toUint8Array(innerParams.execution_id);
|
|
5545
|
-
const cfg = resolveAggregate(functionName);
|
|
5550
|
+
const cfg = resolveAggregate(functionName, innerParams.schema_name ?? null);
|
|
5546
5551
|
const outputSchema = deserializeSchema(toUint8Array(innerParams.output_schema));
|
|
5547
5552
|
const gidBatch = readSingleBatch(toUint8Array(innerParams.group_ids_batch));
|
|
5548
5553
|
const groupIds = [];
|
|
@@ -6345,11 +6350,12 @@ function splitLenPrefixed(buf, count) {
|
|
|
6345
6350
|
|
|
6346
6351
|
// src/protocol/handlers/table-buffering.ts
|
|
6347
6352
|
function registerTableBufferingMethods(protocol, registry, signingKey) {
|
|
6348
|
-
function resolveBuffering(name) {
|
|
6353
|
+
function resolveBuffering(name, schemaName) {
|
|
6349
6354
|
const func = registry.get(name, {
|
|
6350
6355
|
arguments: new Arguments,
|
|
6351
6356
|
inputSchema: null,
|
|
6352
|
-
isScalar: false
|
|
6357
|
+
isScalar: false,
|
|
6358
|
+
schemaName: schemaName ?? null
|
|
6353
6359
|
});
|
|
6354
6360
|
if (!func || func.kind !== "table_buffering") {
|
|
6355
6361
|
throw new Error(`Function '${name}' is not a table_buffering function`);
|
|
@@ -6362,7 +6368,7 @@ function registerTableBufferingMethods(protocol, registry, signingKey) {
|
|
|
6362
6368
|
const rawAttach = inner.attach_opaque_data ? toUint8Array(inner.attach_opaque_data) : null;
|
|
6363
6369
|
const attach = rawAttach && rawAttach.length > 0 ? await openAttach(rawAttach, ctx?.auth, signingKey) : rawAttach;
|
|
6364
6370
|
const transactionId = inner.transaction_id ? toUint8Array(inner.transaction_id) : null;
|
|
6365
|
-
const func = resolveBuffering(functionName);
|
|
6371
|
+
const func = resolveBuffering(functionName, inner.schema_name ?? null);
|
|
6366
6372
|
const bound = new BoundStorage(storage, executionId);
|
|
6367
6373
|
const payload = await bound.stateGet(FrameworkNS.BUFFERING_INIT, BoundStorage.packIntKey(-1));
|
|
6368
6374
|
if (payload == null) {
|
|
@@ -9681,4 +9687,4 @@ export {
|
|
|
9681
9687
|
Arguments
|
|
9682
9688
|
};
|
|
9683
9689
|
|
|
9684
|
-
//# debugId=
|
|
9690
|
+
//# debugId=938A6404CE5CDC7964756E2164756E21
|