@query-farm/vgi 0.48.5 → 0.48.6
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@query-farm/vgi",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.6",
|
|
4
4
|
"description": "TypeScript framework for extending DuckDB with user-defined functions via the Vector Gateway Interface (VGI) over Arrow IPC.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Query Farm LLC (https://query.farm)",
|
|
@@ -93,12 +93,12 @@
|
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
95
|
"@query-farm/apache-arrow": "^21.1.1",
|
|
96
|
-
"@query-farm/vgi-rpc": "^0.29.
|
|
96
|
+
"@query-farm/vgi-rpc": "^0.29.7"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@duckdb/node-api": "^1.5.5-r.4",
|
|
100
100
|
"@query-farm/apache-arrow": "^21.1.1",
|
|
101
|
-
"@query-farm/vgi-rpc": "^0.29.
|
|
101
|
+
"@query-farm/vgi-rpc": "^0.29.7",
|
|
102
102
|
"@types/bun": "latest",
|
|
103
103
|
"typescript": "^7.0.2"
|
|
104
104
|
},
|
package/src/catalog/read-only.ts
CHANGED
|
@@ -26,6 +26,11 @@ import { schemaDescriptorPath, type CatalogDescriptor, type SchemaDescriptor, ty
|
|
|
26
26
|
import { serializeColumnStatistics } from "../util/statistics.js";
|
|
27
27
|
import type { VgiFunction } from "../functions/types.js";
|
|
28
28
|
import type { FunctionRegistry } from "../functions/registry.js";
|
|
29
|
+
|
|
30
|
+
// Schema and view lookups may be overridden with async implementations, for a
|
|
31
|
+
// catalog that discovers them from a remote service; the dispatcher awaits
|
|
32
|
+
// them. (schemaContentsTables/tableGet are async already.)
|
|
33
|
+
type Awaitable<T> = T | Promise<T>;
|
|
29
34
|
import { argumentSpecsToSchema } from "../arguments/argument-spec.js";
|
|
30
35
|
import { serializeSchema, serializeBatch, emptyBatch, batchFromColumns } from "../util/arrow/index.js";
|
|
31
36
|
import { resolveMetadata } from "../metadata/resolve.js";
|
|
@@ -329,7 +334,7 @@ export class ReadOnlyCatalogInterface extends CatalogInterface {
|
|
|
329
334
|
return super.catalogContentsCacheable() && !this.perAttachItemIds;
|
|
330
335
|
}
|
|
331
336
|
|
|
332
|
-
schemas(attachOpaqueData: AttachOpaqueData, transactionOpaqueData?: TransactionOpaqueData): SchemaInfo[] {
|
|
337
|
+
schemas(attachOpaqueData: AttachOpaqueData, transactionOpaqueData?: TransactionOpaqueData): Awaitable<SchemaInfo[]> {
|
|
333
338
|
return this._descriptor.schemas.map((s) => ({
|
|
334
339
|
path: schemaDescriptorPath(s),
|
|
335
340
|
comment: s.comment ?? null,
|
|
@@ -364,7 +369,7 @@ export class ReadOnlyCatalogInterface extends CatalogInterface {
|
|
|
364
369
|
attachOpaqueData: AttachOpaqueData,
|
|
365
370
|
path: string[],
|
|
366
371
|
transactionOpaqueData?: TransactionOpaqueData
|
|
367
|
-
): SchemaInfo | null {
|
|
372
|
+
): Awaitable<SchemaInfo | null> {
|
|
368
373
|
const desc = this._descriptor.schemas.find((s) => schemaPathsEqual(schemaDescriptorPath(s), path));
|
|
369
374
|
if (!desc) return null;
|
|
370
375
|
return {
|
|
@@ -546,7 +551,7 @@ export class ReadOnlyCatalogInterface extends CatalogInterface {
|
|
|
546
551
|
attachOpaqueData: AttachOpaqueData,
|
|
547
552
|
path: string[],
|
|
548
553
|
transactionOpaqueData?: TransactionOpaqueData
|
|
549
|
-
): ViewInfo[] {
|
|
554
|
+
): Awaitable<ViewInfo[]> {
|
|
550
555
|
const schema = this._descriptor.schemas.find((s) => schemaPathsEqual(schemaDescriptorPath(s), path));
|
|
551
556
|
if (!schema || !schema.views) return [];
|
|
552
557
|
|
|
@@ -1009,13 +1014,13 @@ export class ReadOnlyCatalogInterface extends CatalogInterface {
|
|
|
1009
1014
|
return tables.find((t) => t.name === name) ?? null;
|
|
1010
1015
|
}
|
|
1011
1016
|
|
|
1012
|
-
override viewGet(
|
|
1017
|
+
override async viewGet(
|
|
1013
1018
|
attachOpaqueData: AttachOpaqueData,
|
|
1014
1019
|
schemaPath: string[],
|
|
1015
1020
|
name: string,
|
|
1016
1021
|
transactionOpaqueData?: TransactionOpaqueData
|
|
1017
|
-
): ViewInfo | null {
|
|
1018
|
-
const views = this.schemaContentsViews(attachOpaqueData, schemaPath, transactionOpaqueData);
|
|
1022
|
+
): Promise<ViewInfo | null> {
|
|
1023
|
+
const views = await this.schemaContentsViews(attachOpaqueData, schemaPath, transactionOpaqueData);
|
|
1019
1024
|
return views.find((v) => v.name === name) ?? null;
|
|
1020
1025
|
}
|
|
1021
1026
|
|