@query-farm/vgi 0.48.0 → 0.48.1
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/arguments/argument-spec.d.ts +17 -11
- package/dist/catalog/descriptors.d.ts +2 -2
- package/dist/catalog/publication.d.ts +7 -7
- package/dist/client/client.d.ts +9 -3
- package/dist/client/errors.d.ts +2 -2
- package/dist/client/types.d.ts +21 -0
- package/dist/client-entry.d.ts +1 -1
- package/dist/client-entry.js +31 -7
- package/dist/client-entry.js.map +20 -20
- package/dist/filter-pushdown/deserialize.d.ts +1 -1
- package/dist/filter-pushdown/types.d.ts +10 -10
- package/dist/functions/scalar.d.ts +1 -1
- package/dist/functions/table-buffering.d.ts +20 -20
- package/dist/functions/table-in-out.d.ts +4 -4
- package/dist/functions/table.d.ts +7 -7
- package/dist/functions/types.d.ts +47 -47
- package/dist/http/fetch.d.ts +10 -10
- package/dist/index.core.d.ts +1 -1
- package/dist/index.js +155 -94
- package/dist/index.js.map +53 -52
- package/dist/protocol/dispatch.d.ts +3 -3
- package/dist/protocol/handlers/function.d.ts +2 -2
- package/dist/protocol/serializers/cardinality.d.ts +4 -1
- package/dist/protocol/types.d.ts +5 -5
- package/dist/rpc-server.d.ts +6 -6
- package/dist/serve-entry.d.ts +16 -16
- package/dist/serve-entry.js +42 -21
- package/dist/serve-entry.js.map +38 -37
- package/dist/split-token.d.ts +6 -6
- package/dist/types.d.ts +9 -2
- package/dist/util/defined.d.ts +21 -0
- package/dist/worker-cf-entry.js +120 -85
- package/dist/worker-cf-entry.js.map +51 -50
- package/dist/worker.d.ts +2 -2
- package/package.json +6 -4
- package/src/arguments/argument-spec.ts +17 -11
- package/src/arrow/codec/registry.ts +2 -2
- package/src/arrow/impl-arrowjs/build.ts +1 -1
- package/src/arrow/impl-arrowjs/canonical.ts +23 -23
- package/src/arrow/impl-arrowjs/empty.ts +2 -2
- package/src/arrow/impl-arrowjs/ipc.ts +2 -2
- package/src/arrow/impl-arrowjs/iterate.ts +2 -2
- package/src/arrow/impl-arrowjs/project.ts +2 -2
- package/src/arrow/impl-flechette/build.ts +2 -1
- package/src/arrow/impl-flechette/canonical.ts +10 -9
- package/src/arrow/impl-flechette/compat.ts +3 -3
- package/src/arrow/impl-flechette/message-meta.ts +5 -4
- package/src/arrow/impl-flechette/statistics.ts +2 -2
- package/src/attach-ticket.ts +2 -2
- package/src/catalog/column-metadata.ts +1 -1
- package/src/catalog/composite.ts +2 -2
- package/src/catalog/constraints.ts +9 -9
- package/src/catalog/descriptors.ts +1 -1
- package/src/catalog/interface.ts +12 -12
- package/src/catalog/publication.ts +9 -8
- package/src/catalog/read-only.ts +9 -8
- package/src/catalog/sql-grammar.ts +6 -6
- package/src/client/client.ts +52 -15
- package/src/client/errors.ts +1 -1
- package/src/client/types.ts +23 -0
- package/src/client-entry.ts +2 -0
- package/src/codec/asd.ts +3 -3
- package/src/codec/conform.ts +3 -3
- package/src/filter-pushdown/collector.ts +1 -1
- package/src/filter-pushdown/deserialize.ts +13 -10
- package/src/filter-pushdown/evaluate.ts +3 -2
- package/src/filter-pushdown/history.ts +3 -2
- package/src/filter-pushdown/types.ts +10 -10
- package/src/functions/continuation.ts +1 -1
- package/src/functions/projection.ts +1 -1
- package/src/functions/registry.ts +14 -14
- package/src/functions/scalar.ts +3 -3
- package/src/functions/storage-cf-do.ts +2 -2
- package/src/functions/table-buffering.ts +25 -21
- package/src/functions/table-in-out.ts +8 -8
- package/src/functions/table.ts +27 -25
- package/src/functions/types.ts +47 -47
- package/src/generated/vgi-service.ts +5 -3
- package/src/http/fetch.ts +17 -12
- package/src/index.core.ts +2 -0
- package/src/protocol/carried-init-request.ts +1 -1
- package/src/protocol/dispatch.ts +3 -3
- package/src/protocol/handlers/aggregate.ts +8 -7
- package/src/protocol/handlers/catalog/shared.ts +1 -1
- package/src/protocol/handlers/function.ts +2 -2
- package/src/protocol/serializers/cardinality.ts +16 -3
- package/src/protocol/state-serializer.ts +1 -1
- package/src/protocol/types.ts +5 -5
- package/src/rpc-server.ts +13 -12
- package/src/serve-entry.ts +18 -18
- package/src/split-token.ts +10 -9
- package/src/types.ts +9 -2
- package/src/util/defined.ts +30 -0
- package/src/util/parent-rows.ts +2 -2
- package/src/worker.ts +15 -14
|
@@ -7,7 +7,7 @@ export declare class FilterV2Error extends Error {
|
|
|
7
7
|
export interface DeserializeFilterOptions extends FilterCapabilities {
|
|
8
8
|
/** The authoritative, unprojected bind output schema. */
|
|
9
9
|
outputSchema: VgiSchema;
|
|
10
|
-
joinKeyBatches?: VgiBatch[];
|
|
10
|
+
joinKeyBatches?: VgiBatch[] | undefined;
|
|
11
11
|
}
|
|
12
12
|
export declare function deserializeFilters(batch: VgiBatch, options: DeserializeFilterOptions): PushdownFilters;
|
|
13
13
|
export declare function applyFilterDelta(prior: PushdownFilters, batch: VgiBatch): PushdownFilters;
|
|
@@ -25,12 +25,12 @@ export interface FunctionIdentity {
|
|
|
25
25
|
}
|
|
26
26
|
export interface EvaluationContext {
|
|
27
27
|
profile: string;
|
|
28
|
-
timeZone?: string;
|
|
29
|
-
calendar?: string;
|
|
30
|
-
defaultCollation?: string;
|
|
31
|
-
ieeeFloatingPointOps?: boolean;
|
|
32
|
-
integerDivision?: boolean;
|
|
33
|
-
providerFingerprint?: string;
|
|
28
|
+
timeZone?: string | undefined;
|
|
29
|
+
calendar?: string | undefined;
|
|
30
|
+
defaultCollation?: string | undefined;
|
|
31
|
+
ieeeFloatingPointOps?: boolean | undefined;
|
|
32
|
+
integerDivision?: boolean | undefined;
|
|
33
|
+
providerFingerprint?: string | undefined;
|
|
34
34
|
}
|
|
35
35
|
export type FilterExpression = {
|
|
36
36
|
node: "column_ref";
|
|
@@ -85,7 +85,7 @@ export type FilterExpression = {
|
|
|
85
85
|
node: "call";
|
|
86
86
|
function: StandardFilterFunction | FunctionIdentity;
|
|
87
87
|
arguments: FilterExpression[];
|
|
88
|
-
options?: Record<string, unknown
|
|
88
|
+
options?: Record<string, unknown> | undefined;
|
|
89
89
|
} | {
|
|
90
90
|
node: "runtime_filter";
|
|
91
91
|
algorithm: FunctionIdentity;
|
|
@@ -117,12 +117,12 @@ export interface FilterPredicate {
|
|
|
117
117
|
expression: FilterExpression;
|
|
118
118
|
}
|
|
119
119
|
export interface FilterCapabilities {
|
|
120
|
-
extensionFunctions?: ReadonlyArray<FunctionIdentity
|
|
121
|
-
runtimeAlgorithms?: ReadonlyArray<FunctionIdentity
|
|
120
|
+
extensionFunctions?: ReadonlyArray<FunctionIdentity> | undefined;
|
|
121
|
+
runtimeAlgorithms?: ReadonlyArray<FunctionIdentity> | undefined;
|
|
122
122
|
evaluationContexts?: ReadonlyArray<{
|
|
123
123
|
profile: string;
|
|
124
124
|
providerFingerprint?: string | null;
|
|
125
|
-
}
|
|
125
|
+
}> | undefined;
|
|
126
126
|
}
|
|
127
127
|
export type Filter = FilterExpression;
|
|
128
128
|
export type ExprNode = FilterExpression;
|
|
@@ -38,7 +38,7 @@ export interface ScalarParameterDef {
|
|
|
38
38
|
gt?: number;
|
|
39
39
|
/** Exclusive upper bound, `<` (folded into `vgi_range`). */
|
|
40
40
|
lt?: number;
|
|
41
|
-
/** Regex the value must match (surfaced as `vgi_pattern`). */
|
|
41
|
+
/** Regex the value must match (surfaced as `vgi_pattern`); an unanchored search — anchor with `^...$` for a full match. */
|
|
42
42
|
pattern?: string;
|
|
43
43
|
/** Default value (surfaced as `vgi_default`, JSON-encoded). */
|
|
44
44
|
default?: unknown;
|
|
@@ -39,16 +39,16 @@ export interface TableBufferingParams<TArgs = Record<string, any>> {
|
|
|
39
39
|
}
|
|
40
40
|
export interface TableBufferingConfig<TArgs = Record<string, any>, TState = any> {
|
|
41
41
|
name: string;
|
|
42
|
-
description?: string;
|
|
43
|
-
args?: Record<string, VgiDataType
|
|
44
|
-
namedArgs?: Record<string, VgiDataType
|
|
45
|
-
argDefaults?: Record<string, any
|
|
42
|
+
description?: string | undefined;
|
|
43
|
+
args?: Record<string, VgiDataType> | undefined;
|
|
44
|
+
namedArgs?: Record<string, VgiDataType> | undefined;
|
|
45
|
+
argDefaults?: Record<string, any> | undefined;
|
|
46
46
|
/** Authoritative typed defaults: one row, defaulted parameters only. */
|
|
47
|
-
parameterDefaultValues?: VgiBatch | null;
|
|
47
|
+
parameterDefaultValues?: VgiBatch | null | undefined;
|
|
48
48
|
/** Argument descriptions keyed by argument name. */
|
|
49
|
-
argDocs?: Record<string, string
|
|
49
|
+
argDocs?: Record<string, string> | undefined;
|
|
50
50
|
/** Discovery constraints, also enforced for scalar arguments at bind. */
|
|
51
|
-
argConstraints?: Record<string, ArgumentConstraints
|
|
51
|
+
argConstraints?: Record<string, ArgumentConstraints> | undefined;
|
|
52
52
|
/** Bind: default passes through input schema. May be async. Return non-empty
|
|
53
53
|
* `lookupSecret*` lists on the first pass to request DuckDB secrets; the
|
|
54
54
|
* connector then re-binds with `resolvedSecretsProvided` and the resolved
|
|
@@ -75,22 +75,22 @@ export interface TableBufferingConfig<TArgs = Record<string, any>, TState = any>
|
|
|
75
75
|
/** Source tick: emit one batch via out.emit / signal EOS via out.finish. */
|
|
76
76
|
finalize: (params: TableBufferingParams<TArgs>, finalizeStateId: Uint8Array, state: TState, out: OutputCollector) => void | Promise<void>;
|
|
77
77
|
cardinality?: (params: TableBufferingBindParams<TArgs>) => TableCardinality | Promise<TableCardinality>;
|
|
78
|
-
projectionPushdown?: boolean;
|
|
79
|
-
filterPushdown?: boolean;
|
|
80
|
-
autoApplyFilters?: boolean;
|
|
78
|
+
projectionPushdown?: boolean | undefined;
|
|
79
|
+
filterPushdown?: boolean | undefined;
|
|
80
|
+
autoApplyFilters?: boolean | undefined;
|
|
81
81
|
/** Force ParallelSink=false in the C++ operator (single-thread ingest). */
|
|
82
|
-
sinkOrderDependent?: boolean;
|
|
82
|
+
sinkOrderDependent?: boolean | undefined;
|
|
83
83
|
/** Force serial Source drain in finalize_queue order. */
|
|
84
|
-
sourceOrderDependent?: boolean;
|
|
84
|
+
sourceOrderDependent?: boolean | undefined;
|
|
85
85
|
/** Thread DuckDB's per-chunk batch_index into every process() call. */
|
|
86
|
-
requiresInputBatchIndex?: boolean;
|
|
87
|
-
stability?: FunctionStability;
|
|
88
|
-
examples?: FunctionExample[];
|
|
89
|
-
categories?: string[];
|
|
90
|
-
tags?: Record<string, string
|
|
91
|
-
maxWorkers?: number;
|
|
92
|
-
requiredSettings?: string[];
|
|
93
|
-
requiredSecrets?: string[];
|
|
86
|
+
requiresInputBatchIndex?: boolean | undefined;
|
|
87
|
+
stability?: FunctionStability | undefined;
|
|
88
|
+
examples?: FunctionExample[] | undefined;
|
|
89
|
+
categories?: string[] | undefined;
|
|
90
|
+
tags?: Record<string, string> | undefined;
|
|
91
|
+
maxWorkers?: number | undefined;
|
|
92
|
+
requiredSettings?: string[] | undefined;
|
|
93
|
+
requiredSecrets?: string[] | undefined;
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* A table_buffering VgiFunction also carries its callback config so the
|
|
@@ -22,7 +22,7 @@ export interface TableInOutProcessParams<TArgs = Record<string, any>> {
|
|
|
22
22
|
outputSchema: VgiSchema;
|
|
23
23
|
settings: Record<string, any>;
|
|
24
24
|
secrets: Record<string, Record<string, any>>;
|
|
25
|
-
pushdownFilters?: PushdownFilters;
|
|
25
|
+
pushdownFilters?: PushdownFilters | undefined;
|
|
26
26
|
/** Shared storage for cross-phase and cross-worker data (SQLite-backed). */
|
|
27
27
|
storage: BoundStorage;
|
|
28
28
|
/**
|
|
@@ -36,7 +36,7 @@ export interface TableInOutProcessParams<TArgs = Record<string, any>> {
|
|
|
36
36
|
* `null`/`undefined` for a client that sent none. Mirrors vgi-python's
|
|
37
37
|
* `ProcessParams.substream_id`.
|
|
38
38
|
*/
|
|
39
|
-
substreamId?: Uint8Array | null;
|
|
39
|
+
substreamId?: Uint8Array | null | undefined;
|
|
40
40
|
/**
|
|
41
41
|
* Conditional-revalidation validator (exchange-mode result cache): the
|
|
42
42
|
* client holds a stale cached result for THIS input unit and asks the
|
|
@@ -45,10 +45,10 @@ export interface TableInOutProcessParams<TArgs = Record<string, any>> {
|
|
|
45
45
|
* of recomputing. Rides the input batch's custom metadata (attached by the
|
|
46
46
|
* C++ WriteInputBatch). Undefined on a normal call.
|
|
47
47
|
*/
|
|
48
|
-
ifNoneMatch?: string;
|
|
48
|
+
ifNoneMatch?: string | undefined;
|
|
49
49
|
/** RFC 3339 Last-Modified validator for conditional revalidation.
|
|
50
50
|
* Companion to {@link ifNoneMatch}. Undefined on a normal call. */
|
|
51
|
-
ifModifiedSince?: string;
|
|
51
|
+
ifModifiedSince?: string | undefined;
|
|
52
52
|
}
|
|
53
53
|
export interface TableInOutConfig<TArgs = Record<string, any>, TState = null> {
|
|
54
54
|
name: string;
|
|
@@ -24,7 +24,7 @@ export interface TableProcessParams<TArgs = Record<string, any>> {
|
|
|
24
24
|
outputSchema: VgiSchema;
|
|
25
25
|
settings: Record<string, any>;
|
|
26
26
|
secrets: Record<string, Record<string, any>>;
|
|
27
|
-
pushdownFilters?: PushdownFilters;
|
|
27
|
+
pushdownFilters?: PushdownFilters | undefined;
|
|
28
28
|
/**
|
|
29
29
|
* The verified payloads of the splits this init claimed, in the order given,
|
|
30
30
|
* or undefined when this is not a split scan.
|
|
@@ -33,8 +33,8 @@ export interface TableProcessParams<TArgs = Record<string, any>> {
|
|
|
33
33
|
* the client did not plan (a split-only function should fail loudly rather
|
|
34
34
|
* than answer the same query differently), empty means a claim of no work.
|
|
35
35
|
*/
|
|
36
|
-
splitPayloads?: Uint8Array[];
|
|
37
|
-
storage?: BoundStorage;
|
|
36
|
+
splitPayloads?: Uint8Array[] | undefined;
|
|
37
|
+
storage?: BoundStorage | undefined;
|
|
38
38
|
/**
|
|
39
39
|
* AT (TIMESTAMP|VERSION) clause for this scan, or `undefined` when the scan
|
|
40
40
|
* has no AT clause. Carried on the per-scan bind embedded in the init request
|
|
@@ -42,8 +42,8 @@ export interface TableProcessParams<TArgs = Record<string, any>> {
|
|
|
42
42
|
* read time travel at init alongside their pushdown filters. Mirrors
|
|
43
43
|
* vgi-python's `ProcessParams.at_unit` / `.at_value`. See `BindRequest.at_unit`.
|
|
44
44
|
*/
|
|
45
|
-
atUnit?: string;
|
|
46
|
-
atValue?: string;
|
|
45
|
+
atUnit?: string | undefined;
|
|
46
|
+
atValue?: string | undefined;
|
|
47
47
|
/**
|
|
48
48
|
* Conditional-revalidation validator (the client's stored ETag). Set when the
|
|
49
49
|
* client holds a stale-but-revalidatable cached result and asks the worker to
|
|
@@ -52,10 +52,10 @@ export interface TableProcessParams<TArgs = Record<string, any>> {
|
|
|
52
52
|
* `cacheControlMetadata({ notModified: true })` instead of re-streaming.
|
|
53
53
|
* Undefined on a normal call.
|
|
54
54
|
*/
|
|
55
|
-
ifNoneMatch?: string;
|
|
55
|
+
ifNoneMatch?: string | undefined;
|
|
56
56
|
/** Conditional-revalidation validator (the client's stored Last-Modified).
|
|
57
57
|
* Companion to {@link ifNoneMatch}. Undefined on a normal call. */
|
|
58
|
-
ifModifiedSince?: string;
|
|
58
|
+
ifModifiedSince?: string | undefined;
|
|
59
59
|
}
|
|
60
60
|
export interface TableFunctionConfig<TArgs = Record<string, any>, TState = null> {
|
|
61
61
|
name: string;
|
|
@@ -37,23 +37,23 @@ export interface EvaluationContextCapability {
|
|
|
37
37
|
}
|
|
38
38
|
export interface FunctionMeta {
|
|
39
39
|
name: string;
|
|
40
|
-
description?: string;
|
|
41
|
-
stability?: FunctionStability;
|
|
42
|
-
nullHandling?: NullHandling;
|
|
40
|
+
description?: string | undefined;
|
|
41
|
+
stability?: FunctionStability | undefined;
|
|
42
|
+
nullHandling?: NullHandling | undefined;
|
|
43
43
|
/** Scalar-only claims in argument declaration order. A vararg is one slot. */
|
|
44
|
-
argumentMonotonicity?: ArgumentMonotonicity[] | null;
|
|
45
|
-
examples?: FunctionExample[];
|
|
46
|
-
categories?: string[];
|
|
47
|
-
tags?: Record<string, string
|
|
44
|
+
argumentMonotonicity?: ArgumentMonotonicity[] | null | undefined;
|
|
45
|
+
examples?: FunctionExample[] | undefined;
|
|
46
|
+
categories?: string[] | undefined;
|
|
47
|
+
tags?: Record<string, string> | undefined;
|
|
48
48
|
/**
|
|
49
49
|
* Authoritative typed parameter defaults. The batch must contain one row
|
|
50
50
|
* and only defaulted parameters, in signature order; a present null is an
|
|
51
51
|
* explicit null default. `vgi_default` field metadata remains discovery-only.
|
|
52
52
|
*/
|
|
53
|
-
parameterDefaultValues?: VgiBatch | null;
|
|
54
|
-
projectionPushdown?: boolean;
|
|
55
|
-
filterPushdown?: boolean;
|
|
56
|
-
samplingPushdown?: boolean;
|
|
53
|
+
parameterDefaultValues?: VgiBatch | null | undefined;
|
|
54
|
+
projectionPushdown?: boolean | undefined;
|
|
55
|
+
filterPushdown?: boolean | undefined;
|
|
56
|
+
samplingPushdown?: boolean | undefined;
|
|
57
57
|
/**
|
|
58
58
|
* table (generator): opt in to DuckDB's late-materialization rewrite. A
|
|
59
59
|
* TOP_N/LIMIT/SAMPLE over a rowid-bearing table is rewritten into a SEMI
|
|
@@ -62,24 +62,24 @@ export interface FunctionMeta {
|
|
|
62
62
|
* as FunctionInfo `late_materialization`. Only honoured by the C++ extension
|
|
63
63
|
* for tables whose worker also guarantees a UNIQUE, snapshot-stable rowid.
|
|
64
64
|
*/
|
|
65
|
-
lateMaterialization?: boolean;
|
|
66
|
-
filterSemanticProfiles?: string[];
|
|
67
|
-
additionalFilterFunctions?: FilterFunctionCapability[];
|
|
68
|
-
runtimeFilterAlgorithms?: FilterFunctionCapability[];
|
|
69
|
-
filterEvaluationContexts?: EvaluationContextCapability[];
|
|
70
|
-
autoApplyFilters?: boolean;
|
|
71
|
-
preservesOrder?: OrderPreservation;
|
|
72
|
-
maxWorkers?: number;
|
|
73
|
-
requiredSettings?: string[];
|
|
74
|
-
requiredSecrets?: string[];
|
|
75
|
-
orderDependent?: OrderDependence;
|
|
76
|
-
distinctDependent?: DistinctDependence;
|
|
65
|
+
lateMaterialization?: boolean | undefined;
|
|
66
|
+
filterSemanticProfiles?: string[] | undefined;
|
|
67
|
+
additionalFilterFunctions?: FilterFunctionCapability[] | undefined;
|
|
68
|
+
runtimeFilterAlgorithms?: FilterFunctionCapability[] | undefined;
|
|
69
|
+
filterEvaluationContexts?: EvaluationContextCapability[] | undefined;
|
|
70
|
+
autoApplyFilters?: boolean | undefined;
|
|
71
|
+
preservesOrder?: OrderPreservation | undefined;
|
|
72
|
+
maxWorkers?: number | undefined;
|
|
73
|
+
requiredSettings?: string[] | undefined;
|
|
74
|
+
requiredSecrets?: string[] | undefined;
|
|
75
|
+
orderDependent?: OrderDependence | undefined;
|
|
76
|
+
distinctDependent?: DistinctDependence | undefined;
|
|
77
77
|
/**
|
|
78
78
|
* For table_in_out functions: whether the user defined a finalize callback.
|
|
79
79
|
* DuckDB issues a separate FINALIZE init() phase only when this is true;
|
|
80
80
|
* otherwise calling FinalExecute is unsupported and crashes the C++ side.
|
|
81
81
|
*/
|
|
82
|
-
hasFinalize?: boolean;
|
|
82
|
+
hasFinalize?: boolean | undefined;
|
|
83
83
|
/**
|
|
84
84
|
* Blended ("UNNEST-style") table-in-out: the function's positional args ARE
|
|
85
85
|
* its per-row input columns (real typed args, no synthetic TABLE
|
|
@@ -91,36 +91,36 @@ export interface FunctionMeta {
|
|
|
91
91
|
* single-row scan-mode. Mirrors vgi-python's RowTransformFunction /
|
|
92
92
|
* ResolvedMetadata.input_from_args.
|
|
93
93
|
*/
|
|
94
|
-
inputFromArgs?: boolean;
|
|
94
|
+
inputFromArgs?: boolean | undefined;
|
|
95
95
|
/**
|
|
96
96
|
* Blended only: the most input rows one worker call receives; the client
|
|
97
97
|
* splits each input chunk into calls of at most this many rows. Unset sends
|
|
98
98
|
* a whole chunk per call. Set by {@link defineRowTransformFunction}'s
|
|
99
99
|
* `inputRowsPerCall`; surfaces as FunctionInfo.input_rows_per_call.
|
|
100
100
|
*/
|
|
101
|
-
inputRowsPerCall?: number;
|
|
101
|
+
inputRowsPerCall?: number | undefined;
|
|
102
102
|
/**
|
|
103
103
|
* table_buffering: force ParallelSink=false in the C++ operator
|
|
104
104
|
* (single-thread, source-ordered ingest).
|
|
105
105
|
*/
|
|
106
|
-
sinkOrderDependent?: boolean;
|
|
106
|
+
sinkOrderDependent?: boolean | undefined;
|
|
107
107
|
/**
|
|
108
108
|
* table_buffering: force serial Source drain in finalize_queue order
|
|
109
109
|
* (ParallelSource=false, SourceOrder=FIXED_ORDER).
|
|
110
110
|
*/
|
|
111
|
-
sourceOrderDependent?: boolean;
|
|
111
|
+
sourceOrderDependent?: boolean | undefined;
|
|
112
112
|
/**
|
|
113
113
|
* table_buffering: thread DuckDB's per-chunk batch_index into every
|
|
114
114
|
* process() call (RequiredPartitionInfo=BatchIndex).
|
|
115
115
|
*/
|
|
116
|
-
requiresInputBatchIndex?: boolean;
|
|
116
|
+
requiresInputBatchIndex?: boolean | undefined;
|
|
117
117
|
/**
|
|
118
118
|
* table (generator): the function tags every emitted Arrow batch with a
|
|
119
119
|
* per-partition `vgi_batch_index` so DuckDB's ordered sinks reassemble
|
|
120
120
|
* parallel output in partition order. Surfaces as FunctionInfo
|
|
121
121
|
* `supports_batch_index`.
|
|
122
122
|
*/
|
|
123
|
-
supportsBatchIndex?: boolean;
|
|
123
|
+
supportsBatchIndex?: boolean | undefined;
|
|
124
124
|
/**
|
|
125
125
|
* table (generator): the scan divides into named, independently redeemable
|
|
126
126
|
* splits (see the `plan` / `onSplit` hooks). Surfaces as FunctionInfo
|
|
@@ -131,19 +131,19 @@ export interface FunctionMeta {
|
|
|
131
131
|
* same rows. Without it, the division lives behind an opaque worker-side queue
|
|
132
132
|
* and a retry reads neither what it read before nor what it missed.
|
|
133
133
|
*/
|
|
134
|
-
supportsSplits?: boolean;
|
|
134
|
+
supportsSplits?: boolean | undefined;
|
|
135
135
|
/**
|
|
136
136
|
* table (generator): the worker applies every pushed filter EXACTLY, so the
|
|
137
137
|
* engine may drop its own copy rather than re-filtering. Wrong answers if
|
|
138
138
|
* declared falsely — leave unset unless certain.
|
|
139
139
|
*/
|
|
140
|
-
filtersExactlyApplied?: boolean;
|
|
140
|
+
filtersExactlyApplied?: boolean | undefined;
|
|
141
141
|
/**
|
|
142
142
|
* table (generator): addressable positions in the data, for incremental and
|
|
143
143
|
* streaming reads. The engine owns the checkpoint; this declares only that
|
|
144
144
|
* positions are meaningful to externalize.
|
|
145
145
|
*/
|
|
146
|
-
supportsPositions?: boolean;
|
|
146
|
+
supportsPositions?: boolean | undefined;
|
|
147
147
|
/**
|
|
148
148
|
* table (generator): how long a split token stays redeemable.
|
|
149
149
|
*
|
|
@@ -152,14 +152,14 @@ export interface FunctionMeta {
|
|
|
152
152
|
* plan whose TTL is below its own planning-to-task-start horizon, which on a
|
|
153
153
|
* busy cluster is hours rather than seconds.
|
|
154
154
|
*/
|
|
155
|
-
splitTokenTtlSeconds?: number;
|
|
155
|
+
splitTokenTtlSeconds?: number | undefined;
|
|
156
156
|
/**
|
|
157
157
|
* table (generator): Hive-style partition-columns mode. Functions declare
|
|
158
158
|
* a PartitionKind and annotate bind-schema fields; emitted batches carry
|
|
159
159
|
* `vgi_partition_values#b64` metadata. Surfaces as FunctionInfo
|
|
160
160
|
* `partition_kind`.
|
|
161
161
|
*/
|
|
162
|
-
partitionKind?: "NOT_PARTITIONED" | "SINGLE_VALUE_PARTITIONS" | "OVERLAPPING_PARTITIONS" | "DISJOINT_PARTITIONS";
|
|
162
|
+
partitionKind?: "NOT_PARTITIONED" | "SINGLE_VALUE_PARTITIONS" | "OVERLAPPING_PARTITIONS" | "DISJOINT_PARTITIONS" | undefined;
|
|
163
163
|
/**
|
|
164
164
|
* COPY ... FROM custom format reader: the SQL `FORMAT` identifier this
|
|
165
165
|
* function backs (e.g. `example_lines`). Set by {@link defineCopyFromFunction}.
|
|
@@ -168,11 +168,11 @@ export interface FunctionMeta {
|
|
|
168
168
|
* extension registers a DuckDB CopyFunction for it. Mirrors vgi-python's
|
|
169
169
|
* `CopyFromFunction.COPY_FROM_FORMAT`.
|
|
170
170
|
*/
|
|
171
|
-
copyFromFormat?: string;
|
|
171
|
+
copyFromFormat?: string | undefined;
|
|
172
172
|
/** COPY direction; only `"from"` is supported today. Default `"from"`. */
|
|
173
|
-
copyFromDirection?: string;
|
|
173
|
+
copyFromDirection?: string | undefined;
|
|
174
174
|
/** Optional free-text comment surfaced by `vgi_copy_formats()`. */
|
|
175
|
-
copyFromComment?: string | null;
|
|
175
|
+
copyFromComment?: string | null | undefined;
|
|
176
176
|
/**
|
|
177
177
|
* COPY ... TO custom format writer: the SQL `FORMAT` identifier this function
|
|
178
178
|
* backs (e.g. `example_lines_out`). Set by {@link defineCopyToFunction}. When
|
|
@@ -183,19 +183,19 @@ export interface FunctionMeta {
|
|
|
183
183
|
* `table_buffering_process` / `table_buffering_combine` RPCs. Mirrors
|
|
184
184
|
* vgi-python's `CopyToFunction.COPY_TO_FORMAT`.
|
|
185
185
|
*/
|
|
186
|
-
copyToFormat?: string;
|
|
186
|
+
copyToFormat?: string | undefined;
|
|
187
187
|
/** COPY direction for a TO writer; always `"to"`. Default `"to"`. */
|
|
188
|
-
copyToDirection?: string;
|
|
188
|
+
copyToDirection?: string | undefined;
|
|
189
189
|
/** Optional free-text comment surfaced by `vgi_copy_formats()`. */
|
|
190
|
-
copyToComment?: string | null;
|
|
190
|
+
copyToComment?: string | null | undefined;
|
|
191
191
|
}
|
|
192
192
|
export interface StreamHandlers {
|
|
193
|
-
producerInit?: () => any;
|
|
194
|
-
producerFn?: (state: any, out: OutputCollector) => void | Promise<void
|
|
195
|
-
exchangeInit?: () => any;
|
|
193
|
+
producerInit?: (() => any) | undefined;
|
|
194
|
+
producerFn?: ((state: any, out: OutputCollector) => void | Promise<void>) | undefined;
|
|
195
|
+
exchangeInit?: (() => any) | undefined;
|
|
196
196
|
exchangeFn?: (state: any, input: VgiBatch, out: OutputCollector) => void | Promise<void>;
|
|
197
197
|
outputSchema: VgiSchema;
|
|
198
|
-
inputSchema?: VgiSchema;
|
|
198
|
+
inputSchema?: VgiSchema | undefined;
|
|
199
199
|
/**
|
|
200
200
|
* Fires once per tick batch on the producer path, before `producerFn`.
|
|
201
201
|
* Receives the tick's Arrow custom metadata so the handler can pick up
|
|
@@ -209,7 +209,7 @@ export interface StreamHandlers {
|
|
|
209
209
|
* handler state, which the dispatcher carries in the HTTP state token. Every
|
|
210
210
|
* other stream's reply is refused if it says HAVE_MORE_OUTPUT.
|
|
211
211
|
*/
|
|
212
|
-
continuesOutput?: boolean;
|
|
212
|
+
continuesOutput?: boolean | undefined;
|
|
213
213
|
}
|
|
214
214
|
/**
|
|
215
215
|
* A resolved, registered VGI function definition.
|
|
@@ -219,7 +219,7 @@ export interface VgiFunction {
|
|
|
219
219
|
meta: FunctionMeta;
|
|
220
220
|
argumentSpecs: ArgumentSpec[];
|
|
221
221
|
/** Default output schema (for catalog registration). May be overridden at bind time. */
|
|
222
|
-
defaultOutputSchema?: VgiSchema;
|
|
222
|
+
defaultOutputSchema?: VgiSchema | undefined;
|
|
223
223
|
bind(request: BindRequest): BindResponse | Promise<BindResponse>;
|
|
224
224
|
globalInit(request: InitRequest): GlobalInitResponse | Promise<GlobalInitResponse>;
|
|
225
225
|
/**
|
package/dist/http/fetch.d.ts
CHANGED
|
@@ -14,14 +14,14 @@ export interface VgiFetchOptions extends HostingOptions {
|
|
|
14
14
|
* configured key hosts `vgi.attach_tickets.v1` (with the ability to issue
|
|
15
15
|
* grants): tickets sealed under a generated key would die on restart.
|
|
16
16
|
* Defaults to `true`, since this factory requires the key to be passed. */
|
|
17
|
-
signingKeyConfigured?: boolean;
|
|
17
|
+
signingKeyConfigured?: boolean | undefined;
|
|
18
18
|
/** State-token TTL in seconds (default 3600). */
|
|
19
|
-
tokenTtl?: number;
|
|
19
|
+
tokenTtl?: number | undefined;
|
|
20
20
|
/** URL path prefix for VGI requests (default "/vgi"). Pass "" to mount at
|
|
21
21
|
* the root, which is what a dedicated single-worker HTTP server wants. */
|
|
22
|
-
prefix?: string;
|
|
22
|
+
prefix?: string | undefined;
|
|
23
23
|
/** Server ID for state-token attribution (default "vgi-cf"). */
|
|
24
|
-
serverId?: string;
|
|
24
|
+
serverId?: string | undefined;
|
|
25
25
|
/** CORS allowed origins, added to all responses so the preflight `OPTIONS`
|
|
26
26
|
* that browser clients send before `__describe__` succeeds.
|
|
27
27
|
*
|
|
@@ -33,9 +33,9 @@ export interface VgiFetchOptions extends HostingOptions {
|
|
|
33
33
|
* always defaulted this way; this matches it so both entries agree.
|
|
34
34
|
*
|
|
35
35
|
* Pass `null` to disable CORS. */
|
|
36
|
-
corsOrigins?: string | null;
|
|
36
|
+
corsOrigins?: string | null | undefined;
|
|
37
37
|
/** Public source-repository URL, surfaced on the landing page. */
|
|
38
|
-
repositoryUrl?: string;
|
|
38
|
+
repositoryUrl?: string | undefined;
|
|
39
39
|
/** Worker identity for the standardized VGI landing surface: `GET /` serves
|
|
40
40
|
* the shared landing.html plus a JSON status document carrying this
|
|
41
41
|
* identity, and `GET /vgi-client.js` serves the browser client build the
|
|
@@ -58,13 +58,13 @@ export interface VgiFetchOptions extends HostingOptions {
|
|
|
58
58
|
* Supplying it is what makes a worker able to serve more than one principal,
|
|
59
59
|
* and the identity it returns is the one the worker seals `attach_opaque_data`
|
|
60
60
|
* and split tokens under. */
|
|
61
|
-
authenticate?: AuthenticateFn;
|
|
61
|
+
authenticate?: AuthenticateFn | undefined;
|
|
62
62
|
/** Off-wire transport identities, including a trusted Iroh HTTP bridge. */
|
|
63
|
-
peerIdentityProviders?: readonly PeerIdentityProvider[];
|
|
63
|
+
peerIdentityProviders?: readonly PeerIdentityProvider[] | undefined;
|
|
64
64
|
/** Policy composing peer evidence with application authentication. */
|
|
65
|
-
peerAuthenticationPolicy?: PeerAuthenticationPolicy;
|
|
65
|
+
peerAuthenticationPolicy?: PeerAuthenticationPolicy | undefined;
|
|
66
66
|
/** Host adapter supplying the physical peer and multiplicity-preserving headers. */
|
|
67
|
-
peerResolutionContext?: (request: Request) => PeerResolutionOptions | Promise<PeerResolutionOptions
|
|
67
|
+
peerResolutionContext?: ((request: Request) => PeerResolutionOptions | Promise<PeerResolutionOptions>) | undefined;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* Build a fetch handler suitable for `export default { fetch }` in a CF
|
package/dist/index.core.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export type { ScalarComputeRow, ScalarOutputValue, ScalarComputeResult } from ".
|
|
|
44
44
|
export { type FunctionStorage, type WorkerStateKey, FunctionStorageSqlite, BoundStorage, UnknownInvocationError, resolveStorageFromEnv, setStorage, storage as functionStorage, } from "./functions/storage.js";
|
|
45
45
|
export { FunctionStorageCfDo, type FetchLike } from "./functions/storage-cf-do.js";
|
|
46
46
|
export { VgiClient, VgiClientError } from "./client/client.js";
|
|
47
|
-
export type { VgiClientOptions, TableFunctionOptions, ScalarFunctionOptions, TableInOutFunctionOptions, OnCreateConflict, CatalogFunctionType as ClientCatalogFunctionType, CatalogAttachOptions, AttachOptionValue, CatalogSnapshot, LoadCatalogOptions, } from "./client/types.js";
|
|
47
|
+
export type { VgiClientOptions, TableFunctionOptions, TableFunctionRowsOptions, Int64Mode, ScalarFunctionOptions, TableInOutFunctionOptions, OnCreateConflict, CatalogFunctionType as ClientCatalogFunctionType, CatalogAttachOptions, AttachOptionValue, CatalogSnapshot, LoadCatalogOptions, } from "./client/types.js";
|
|
48
48
|
export { str, bytes, int, int32, float, float32, bool, toSchema, OutputCollector, AuthContext } from "@query-farm/vgi-rpc";
|
|
49
49
|
export { subprocessConnect, httpConnect, tcpConnect } from "@query-farm/vgi-rpc";
|
|
50
50
|
export type { RpcClient, StreamSession, LogMessage } from "@query-farm/vgi-rpc";
|