@query-farm/vgi 0.47.1 → 0.48.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/README.md +1 -1
- package/dist/catalog/column-expressions.d.ts +22 -1
- package/dist/catalog/column-metadata.d.ts +7 -0
- package/dist/catalog/column-types.d.ts +15 -0
- package/dist/catalog/composite.d.ts +2 -0
- package/dist/catalog/constraints.d.ts +110 -12
- package/dist/catalog/descriptors.d.ts +19 -1
- package/dist/catalog/indexes.d.ts +29 -0
- package/dist/catalog/interface.d.ts +41 -0
- package/dist/catalog/public-codecs.d.ts +6 -0
- package/dist/catalog/read-only.d.ts +3 -0
- package/dist/catalog/sql-grammar.d.ts +53 -0
- package/dist/catalog/unconstrained-columns.d.ts +8 -0
- package/dist/client/types.d.ts +5 -1
- package/dist/client-entry.d.ts +1 -0
- package/dist/client-entry.js +1435 -152
- package/dist/client-entry.js.map +15 -11
- package/dist/generated/vgi-client.d.ts +5 -0
- package/dist/generated/vgi-protocol-schemas.d.ts +5 -0
- package/dist/generated/vgi-protocol-types.d.ts +57 -0
- package/dist/generated/vgi-service.d.ts +1 -1
- package/dist/index.core.d.ts +3 -1
- package/dist/index.js +1940 -545
- package/dist/index.js.map +26 -22
- package/dist/protocol/dispatch.d.ts +1 -1
- package/dist/protocol/serializers/splits.d.ts +41 -1
- package/dist/serve-entry.js +1172 -58
- package/dist/serve-entry.js.map +20 -17
- package/dist/worker-cf-entry.d.ts +2 -1
- package/dist/worker-cf-entry.js +1538 -191
- package/dist/worker-cf-entry.js.map +26 -22
- package/package.json +1 -1
- package/src/catalog/column-expressions.ts +85 -7
- package/src/catalog/column-metadata.ts +20 -2
- package/src/catalog/column-types.ts +50 -0
- package/src/catalog/composite.ts +10 -0
- package/src/catalog/constraints.ts +496 -58
- package/src/catalog/contents-codec.ts +3 -3
- package/src/catalog/descriptors.ts +19 -1
- package/src/catalog/indexes.ts +59 -0
- package/src/catalog/interface.ts +103 -1
- package/src/catalog/public-codecs.ts +36 -0
- package/src/catalog/read-only.ts +92 -36
- package/src/catalog/sql-grammar.ts +476 -0
- package/src/catalog/unconstrained-columns.ts +34 -8
- package/src/client/client.ts +6 -3
- package/src/client/types.ts +5 -1
- package/src/client-entry.ts +4 -0
- package/src/generated/vgi-client.ts +6 -1
- package/src/generated/vgi-protocol-schemas.ts +36 -1
- package/src/generated/vgi-protocol-types.ts +130 -1
- package/src/generated/vgi-service.ts +2 -2
- package/src/index.core.ts +34 -1
- package/src/protocol/dispatch.ts +1 -1
- package/src/protocol/handlers/catalog/admin.ts +14 -13
- package/src/protocol/handlers/catalog/table.ts +58 -11
- package/src/protocol/serializers/splits.ts +82 -9
- package/src/worker-cf-entry.ts +2 -4
|
@@ -671,6 +671,9 @@ export interface ScanSplit {
|
|
|
671
671
|
estimated_rows?: number | null;
|
|
672
672
|
rows_exact: boolean;
|
|
673
673
|
estimated_bytes?: number | null;
|
|
674
|
+
key_value?: /** @record-batch */ Uint8Array | null;
|
|
675
|
+
range_index?: number | null;
|
|
676
|
+
column_bounds?: /** @record-batch */ Uint8Array | null;
|
|
674
677
|
partition_bounds?: /** @record-batch */ Uint8Array | null;
|
|
675
678
|
column_statistics?: Uint8Array | null;
|
|
676
679
|
location_ids?: number[] | null;
|
|
@@ -689,6 +692,8 @@ export interface PlanResponse {
|
|
|
689
692
|
catalog_version?: number | null;
|
|
690
693
|
scope: string;
|
|
691
694
|
locations?: string[] | null;
|
|
695
|
+
key_grouping?: Uint8Array | null;
|
|
696
|
+
range_partitioning?: Uint8Array | null;
|
|
692
697
|
partitioning?: Uint8Array[] | null;
|
|
693
698
|
sort_order?: Uint8Array[] | null;
|
|
694
699
|
cache_max_age_seconds?: number | null;
|
|
@@ -8,6 +8,11 @@ export declare const FunctionInfoSchema: import("../index.core.js").VgiSchema;
|
|
|
8
8
|
export declare const MacroInfoSchema: import("../index.core.js").VgiSchema;
|
|
9
9
|
export declare const IndexInfoSchema: import("../index.core.js").VgiSchema;
|
|
10
10
|
export declare const CopyFromFormatInfoSchema: import("../index.core.js").VgiSchema;
|
|
11
|
+
export declare const FieldPathSchema: import("../index.core.js").VgiSchema;
|
|
12
|
+
export declare const TransformSpecSchema: import("../index.core.js").VgiSchema;
|
|
13
|
+
export declare const KeyGroupingSchema: import("../index.core.js").VgiSchema;
|
|
14
|
+
export declare const RangeKeySchema: import("../index.core.js").VgiSchema;
|
|
15
|
+
export declare const RangePartitioningSchema: import("../index.core.js").VgiSchema;
|
|
11
16
|
export declare const MacroParameterSchema: import("../index.core.js").VgiSchema;
|
|
12
17
|
export declare const MacroOverloadSchema: import("../index.core.js").VgiSchema;
|
|
13
18
|
export declare const ClientQueryCapabilitiesSchema: import("../index.core.js").VgiSchema;
|
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
import type { CatalogAttachResult, CatalogCapabilities, CatalogContentsResponse, CatalogObjectRef, CatalogQueryPrepareRequest, CatalogQueryPrepareResult, ClientQueryCapabilities, ConstraintSnapshot, ConstraintsApplyRequest, DependencySnapshot, IndexDefinition, MacroOverload, MacroParameter, OptionDefinitions, OptionState, QueryCapabilities, QueryEvaluationContext, QueryObjectReference, SqlExpression, TableLayout } from "./vgi-client.js";
|
|
2
2
|
export type { CatalogAttachResult, CatalogCapabilities, CatalogContentsResponse, CatalogObjectRef, CatalogQueryPrepareRequest, CatalogQueryPrepareResult, ClientQueryCapabilities, ConstraintSnapshot, ConstraintsApplyRequest, DependencySnapshot, IndexDefinition, MacroOverload, MacroParameter, OptionDefinitions, OptionState, QueryCapabilities, QueryEvaluationContext, QueryObjectReference, SqlExpression, TableLayout };
|
|
3
|
+
/** One raw, component-preserving field reference used by a transform. */
|
|
4
|
+
export interface FieldPath {
|
|
5
|
+
components: string[];
|
|
6
|
+
}
|
|
7
|
+
/** `FieldPath` has no defaulted fields, so its init is the record itself. */
|
|
8
|
+
export type FieldPathInit = FieldPath;
|
|
9
|
+
/** Build a complete `FieldPath`, filling the protocol defaults, in wire order. */
|
|
10
|
+
export declare function buildFieldPath(init: FieldPathInit): FieldPath;
|
|
11
|
+
export declare const encodeFieldPath: (v: FieldPath) => Uint8Array;
|
|
12
|
+
export declare const decodeFieldPath: (b: Uint8Array) => FieldPath;
|
|
13
|
+
/** A versioned, registry-defined partition transform. `id` identifies normative semantics (for example `vgi.identity/1` or `iceberg.bucket/1`). `inputs` contains serialized :class:`FieldPath` records. `parameters` is either absent or a one-row Arrow batch, which permits any number of named, typed parameters without admitting arbitrary recursive expressions. */
|
|
14
|
+
export interface TransformSpec {
|
|
15
|
+
id: string;
|
|
16
|
+
inputs: Uint8Array[];
|
|
17
|
+
parameters?: Uint8Array | null;
|
|
18
|
+
}
|
|
19
|
+
/** Fields of `TransformSpec` that have a protocol default. */
|
|
20
|
+
export type TransformSpecDefaultedField = "inputs" | "parameters";
|
|
21
|
+
/** `TransformSpec` with every field that has a protocol default optional. */
|
|
22
|
+
export type TransformSpecInit = Omit<TransformSpec, TransformSpecDefaultedField> & Partial<Pick<TransformSpec, TransformSpecDefaultedField>>;
|
|
23
|
+
/** Build a complete `TransformSpec`, filling the protocol defaults, in wire order. */
|
|
24
|
+
export declare function buildTransformSpec(init: TransformSpecInit): TransformSpec;
|
|
25
|
+
export declare const encodeTransformSpec: (v: TransformSpec) => Uint8Array;
|
|
26
|
+
export declare const decodeTransformSpec: (b: Uint8Array) => TransformSpec;
|
|
27
|
+
/** Transforms whose exact result tuple is constant within every split. */
|
|
28
|
+
export interface KeyGrouping {
|
|
29
|
+
keys: Uint8Array[];
|
|
30
|
+
}
|
|
31
|
+
/** `KeyGrouping` has no defaulted fields, so its init is the record itself. */
|
|
32
|
+
export type KeyGroupingInit = KeyGrouping;
|
|
33
|
+
/** Build a complete `KeyGrouping`, filling the protocol defaults, in wire order. */
|
|
34
|
+
export declare function buildKeyGrouping(init: KeyGroupingInit): KeyGrouping;
|
|
35
|
+
export declare const encodeKeyGrouping: (v: KeyGrouping) => Uint8Array;
|
|
36
|
+
export declare const decodeKeyGrouping: (b: Uint8Array) => KeyGrouping;
|
|
37
|
+
/** One transform and comparator component of a range key. */
|
|
38
|
+
export interface RangeKey {
|
|
39
|
+
transform: Uint8Array;
|
|
40
|
+
direction: string;
|
|
41
|
+
null_order: string;
|
|
42
|
+
}
|
|
43
|
+
/** `RangeKey` has no defaulted fields, so its init is the record itself. */
|
|
44
|
+
export type RangeKeyInit = RangeKey;
|
|
45
|
+
/** Build a complete `RangeKey`, filling the protocol defaults, in wire order. */
|
|
46
|
+
export declare function buildRangeKey(init: RangeKeyInit): RangeKey;
|
|
47
|
+
export declare const encodeRangeKey: (v: RangeKey) => Uint8Array;
|
|
48
|
+
export declare const decodeRangeKey: (b: Uint8Array) => RangeKey;
|
|
49
|
+
/** Exact half-open range distribution shared by all splits in a plan. `N` split-point rows define `N + 1` ranges. Values equal to point `i` belong to range `i + 1`. Each split names its range with :attr:`ScanSplit.range_index`. */
|
|
50
|
+
export interface RangePartitioning {
|
|
51
|
+
keys: Uint8Array[];
|
|
52
|
+
split_points: Uint8Array;
|
|
53
|
+
}
|
|
54
|
+
/** `RangePartitioning` has no defaulted fields, so its init is the record itself. */
|
|
55
|
+
export type RangePartitioningInit = RangePartitioning;
|
|
56
|
+
/** Build a complete `RangePartitioning`, filling the protocol defaults, in wire order. */
|
|
57
|
+
export declare function buildRangePartitioning(init: RangePartitioningInit): RangePartitioning;
|
|
58
|
+
export declare const encodeRangePartitioning: (v: RangePartitioning) => Uint8Array;
|
|
59
|
+
export declare const decodeRangePartitioning: (b: Uint8Array) => RangePartitioning;
|
|
3
60
|
/** Fields of `MacroParameter` that have a protocol default. */
|
|
4
61
|
export type MacroParameterDefaultedField = "declared_type" | "default_value" | "default_expression" | "documentation";
|
|
5
62
|
/** `MacroParameter` with every field that has a protocol default optional. */
|
|
@@ -3,7 +3,7 @@ import { type VgiSchema } from "../arrow/index.js";
|
|
|
3
3
|
/** The protocol's wire name: the `vgi_rpc.protocol` routing key and the HTTP path segment. */
|
|
4
4
|
export declare const VGI_PROTOCOL_NAME = "vgi.v3";
|
|
5
5
|
/** The protocol's semver, stamped on every request by a client of this protocol. */
|
|
6
|
-
export declare const VGI_PROTOCOL_VERSION = "3.
|
|
6
|
+
export declare const VGI_PROTOCOL_VERSION = "3.1.0";
|
|
7
7
|
/** What a unary handler returns: the result row, now or later. */
|
|
8
8
|
export type VgiReply<T> = T | ExternalRef | Promise<T | ExternalRef>;
|
|
9
9
|
/** The result of a unary method with no `result` column. */
|
package/dist/index.core.d.ts
CHANGED
|
@@ -11,11 +11,13 @@ export type { VgiFunction, FunctionMeta, StreamHandlers, FunctionExample, Handle
|
|
|
11
11
|
export { CatalogInterface, type CatalogAttachResult, type CatalogAttachResultInit, buildCatalogAttachResult, type SchemaContentsInfo, type CatalogContentsResult, type SchemaInfo, encodeSchemaInfo, decodeSchemaInfo, type TableInfo, encodeTableInfo, decodeTableInfo, type ViewInfo, encodeViewInfo, decodeViewInfo, type CatalogInfo, encodeCatalogInfo, decodeCatalogInfo, type FunctionInfo, encodeFunctionInfo, decodeFunctionInfo, type FunctionInfoOptions, type MacroInfo, encodeMacroInfo, decodeMacroInfo, type MacroType, type CopyFromFormatInfo, encodeCopyFromFormatInfo, type AttachOpaqueData, type TransactionOpaqueData, buildScanBranchesResult, encodeFormatOptions, type ScanBranchInput } from "./catalog/interface.js";
|
|
12
12
|
export type { CatalogDescriptor, SchemaDescriptor, TableDescriptor, ViewDescriptor, MacroDescriptor, SettingDescriptor, SecretTypeDescriptor, ForeignKeyDef, DefaultValue } from "./catalog/descriptors.js";
|
|
13
13
|
export { ReadOnlyCatalogInterface, READ_ONLY_ITEM_ATTACH_ID } from "./catalog/read-only.js";
|
|
14
|
-
export
|
|
14
|
+
export * from "./catalog/public-codecs.js";
|
|
15
15
|
export { CompositeCatalogInterface } from "./catalog/composite.js";
|
|
16
16
|
export { FunctionRegistry } from "./functions/registry.js";
|
|
17
17
|
export { FunctionType, FunctionStability, NullHandling, ArgumentMonotonicity, OrderPreservation, OrderDependence, DistinctDependence, TableInOutPhase, DEFAULT_MAX_WORKERS, } from "./types.js";
|
|
18
18
|
export type { BindRequest, BindResponse, BindRepeatability, CopyFromContext, CopyToContext, InitRequest, GlobalInitResponse, TableCardinality, } from "./protocol/types.js";
|
|
19
|
+
export type { ScanSplit, PlanResult, TableFunctionPlanRequest, } from "./protocol/serializers/splits.js";
|
|
20
|
+
export { type FieldPath, type FieldPathInit, buildFieldPath, encodeFieldPath, decodeFieldPath, type TransformSpec, type TransformSpecInit, buildTransformSpec, encodeTransformSpec, decodeTransformSpec, type KeyGrouping, type KeyGroupingInit, buildKeyGrouping, encodeKeyGrouping, decodeKeyGrouping, type RangeKey, type RangeKeyInit, buildRangeKey, encodeRangeKey, decodeRangeKey, type RangePartitioning, type RangePartitioningInit, buildRangePartitioning, encodeRangePartitioning, decodeRangePartitioning, } from "./generated/vgi-protocol-types.js";
|
|
19
21
|
export { Arguments } from "./arguments/arguments.js";
|
|
20
22
|
export { type ArgumentSpec, type ArgumentConstraints, argumentSpecsToSchema, schemaToArgumentSpecs, macroArgumentsSchema, macroParameterDocsFromSchema, formatRange, constraintSpecFields } from "./arguments/argument-spec.js";
|
|
21
23
|
export { VgiError, RowCountMismatchError, FunctionNotFoundError, CatalogReadOnlyError, CatalogNotFoundError, CatalogAlreadyExistsError, ArgumentValidationError, NoCatalogError, } from "./errors.js";
|