@honua/react 0.1.0-beta.0 → 0.1.2-beta.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/contract/discovery.d.ts +231 -0
- package/contract/discovery.d.ts.map +1 -0
- package/contract/discovery.js +554 -0
- package/contract/edit-sketch.d.ts +8 -0
- package/contract/edit-sketch.d.ts.map +1 -1
- package/contract/edit-sketch.js +15 -0
- package/contract/edit-snapping.d.ts +160 -0
- package/contract/edit-snapping.d.ts.map +1 -0
- package/contract/edit-snapping.js +675 -0
- package/contract/generated/projjson-v0.7-crs-validator.d.ts +35 -0
- package/contract/generated/projjson-v0.7-crs-validator.d.ts.map +1 -0
- package/contract/generated/projjson-v0.7-crs-validator.js +3941 -0
- package/contract/index.d.ts +11 -2
- package/contract/index.d.ts.map +1 -1
- package/contract/index.js +4 -1
- package/contract/pmtiles.d.ts +31 -0
- package/contract/pmtiles.d.ts.map +1 -1
- package/contract/pmtiles.js +60 -20
- package/contract/protocol-module.d.ts +70 -0
- package/contract/protocol-module.d.ts.map +1 -0
- package/contract/protocol-module.js +1 -0
- package/contract/schema-envelope.d.ts +26 -0
- package/contract/schema-envelope.d.ts.map +1 -0
- package/contract/schema-envelope.js +25 -0
- package/contract/schema.d.ts +582 -0
- package/contract/schema.d.ts.map +1 -0
- package/contract/schema.js +2483 -0
- package/contract/source-capability-support.d.ts +6 -0
- package/contract/source-capability-support.d.ts.map +1 -0
- package/contract/source-capability-support.js +154 -0
- package/contract/source.d.ts +35 -17
- package/contract/source.d.ts.map +1 -1
- package/contract/source.js +267 -71
- package/contract/types.d.ts +140 -4
- package/contract/types.d.ts.map +1 -1
- package/contract/types.js +6 -14
- package/core/bounded-json.d.ts +4 -0
- package/core/bounded-json.d.ts.map +1 -0
- package/core/bounded-json.js +38 -0
- package/core/cache-state.d.ts +9 -0
- package/core/cache-state.d.ts.map +1 -1
- package/core/cache-state.js +10 -0
- package/core/capabilities-xml.d.ts +33 -0
- package/core/capabilities-xml.d.ts.map +1 -0
- package/core/capabilities-xml.js +331 -0
- package/core/client.d.ts +4 -1
- package/core/client.d.ts.map +1 -1
- package/core/client.js +115 -29
- package/core/error-classifications.d.ts +153 -0
- package/core/error-classifications.d.ts.map +1 -0
- package/core/error-classifications.js +140 -0
- package/core/error-code-registry.d.ts +158 -0
- package/core/error-code-registry.d.ts.map +1 -0
- package/core/error-code-registry.js +143 -0
- package/core/error-envelope.d.ts +68 -0
- package/core/error-envelope.d.ts.map +1 -0
- package/core/error-envelope.js +357 -0
- package/core/errors.d.ts +45 -29
- package/core/errors.d.ts.map +1 -1
- package/core/errors.js +97 -50
- package/core/geoparquet-sql.d.ts +30 -2
- package/core/geoparquet-sql.d.ts.map +1 -1
- package/core/geoparquet-sql.js +38 -3
- package/core/odata-key-path.d.ts +12 -0
- package/core/odata-key-path.d.ts.map +1 -0
- package/core/odata-key-path.js +28 -0
- package/core/odata-write-codec.d.ts +66 -0
- package/core/odata-write-codec.d.ts.map +1 -0
- package/core/odata-write-codec.js +1083 -0
- package/core/odata.d.ts +59 -7
- package/core/odata.d.ts.map +1 -1
- package/core/odata.js +431 -99
- package/core/ogc-features.d.ts.map +1 -1
- package/core/ogc-features.js +3 -0
- package/core/ogc-maps.d.ts +7 -0
- package/core/ogc-maps.d.ts.map +1 -1
- package/core/ogc-maps.js +46 -7
- package/core/ogc-processes.d.ts +2 -1
- package/core/ogc-processes.d.ts.map +1 -1
- package/core/ogc-processes.js +33 -5
- package/core/ogc-records.d.ts +9 -0
- package/core/ogc-records.d.ts.map +1 -1
- package/core/ogc-records.js +78 -29
- package/core/ogc-tiles.d.ts +10 -1
- package/core/ogc-tiles.d.ts.map +1 -1
- package/core/ogc-tiles.js +56 -17
- package/core/path-utils.d.ts +9 -0
- package/core/path-utils.d.ts.map +1 -1
- package/core/path-utils.js +19 -0
- package/core/protocol-transport.d.ts +1 -0
- package/core/protocol-transport.d.ts.map +1 -1
- package/core/request-pipeline.d.ts.map +1 -1
- package/core/request-pipeline.js +1 -1
- package/core/spatial-filter.d.ts +8 -4
- package/core/spatial-filter.d.ts.map +1 -1
- package/core/spatial-filter.js +206 -16
- package/core/stac-static.d.ts +6 -2
- package/core/stac-static.d.ts.map +1 -1
- package/core/stac-static.js +260 -69
- package/core/surfaces.d.ts.map +1 -1
- package/core/surfaces.js +69 -5
- package/core/types.d.ts +125 -7
- package/core/types.d.ts.map +1 -1
- package/core/wfs-capabilities.d.ts +2 -0
- package/core/wfs-capabilities.d.ts.map +1 -1
- package/core/wfs-capabilities.js +8 -1
- package/core/wfs.d.ts.map +1 -1
- package/core/wfs.js +10 -0
- package/core/wms-capabilities.d.ts +56 -84
- package/core/wms-capabilities.d.ts.map +1 -1
- package/core/wms-capabilities.js +212 -509
- package/core/wmts-capabilities.d.ts +62 -62
- package/core/wmts-capabilities.d.ts.map +1 -1
- package/core/wmts-capabilities.js +224 -371
- package/esri-compat/editor.d.ts +8 -0
- package/esri-compat/editor.d.ts.map +1 -1
- package/esri-compat/editor.js +13 -0
- package/esri-compat/feature-layer.d.ts +2 -0
- package/esri-compat/feature-layer.d.ts.map +1 -1
- package/esri-compat/feature-layer.js +1 -0
- package/esri-compat/layer-list.d.ts +11 -0
- package/esri-compat/layer-list.d.ts.map +1 -1
- package/esri-compat/layer-list.js +49 -0
- package/esri-compat/legend.d.ts +10 -0
- package/esri-compat/legend.d.ts.map +1 -1
- package/esri-compat/legend.js +27 -0
- package/esri-compat/portal.d.ts +197 -0
- package/esri-compat/portal.d.ts.map +1 -0
- package/esri-compat/portal.js +251 -0
- package/esri-compat/renderer-objects.d.ts +40 -0
- package/esri-compat/renderer-objects.d.ts.map +1 -0
- package/esri-compat/renderer-objects.js +62 -0
- package/esri-compat/sketch.d.ts +43 -0
- package/esri-compat/sketch.d.ts.map +1 -1
- package/esri-compat/sketch.js +46 -0
- package/esri-compat/snapping.d.ts +43 -0
- package/esri-compat/snapping.d.ts.map +1 -0
- package/esri-compat/snapping.js +45 -0
- package/esri-compat/url.d.ts.map +1 -1
- package/esri-compat/url.js +1 -1
- package/esri-compat/widget-host.d.ts +84 -0
- package/esri-compat/widget-host.d.ts.map +1 -0
- package/esri-compat/widget-host.js +159 -0
- package/filter-registry/index.d.ts +145 -0
- package/filter-registry/index.d.ts.map +1 -0
- package/filter-registry/index.js +531 -0
- package/generated-app/errors.d.ts +18 -2
- package/generated-app/errors.d.ts.map +1 -1
- package/generated-app/errors.js +44 -11
- package/map/automatic-mount-integration.d.ts +134 -0
- package/map/automatic-mount-integration.d.ts.map +1 -0
- package/map/automatic-mount-integration.js +305 -0
- package/map/automatic-source-strategy.d.ts +125 -0
- package/map/automatic-source-strategy.d.ts.map +1 -0
- package/map/automatic-source-strategy.js +494 -0
- package/map/data-to-map-bridge.d.ts +293 -0
- package/map/data-to-map-bridge.d.ts.map +1 -0
- package/map/data-to-map-bridge.js +817 -0
- package/map/geojson-projection.d.ts +33 -0
- package/map/geojson-projection.d.ts.map +1 -0
- package/map/geojson-projection.js +118 -0
- package/map/index.d.ts +14 -0
- package/map/index.d.ts.map +1 -1
- package/map/index.js +8 -0
- package/map/raster-source-spec.d.ts +30 -0
- package/map/raster-source-spec.d.ts.map +1 -0
- package/map/raster-source-spec.js +190 -0
- package/map/raster-source-strategy.d.ts +65 -0
- package/map/raster-source-strategy.d.ts.map +1 -0
- package/map/raster-source-strategy.js +232 -0
- package/map/source-to-maplibre.d.ts +91 -0
- package/map/source-to-maplibre.d.ts.map +1 -0
- package/map/source-to-maplibre.js +454 -0
- package/map/temporal-playback.d.ts +139 -0
- package/map/temporal-playback.d.ts.map +1 -0
- package/map/temporal-playback.js +247 -0
- package/package.json +14 -1
- package/query-planner/canonical.d.ts +7 -0
- package/query-planner/canonical.d.ts.map +1 -0
- package/query-planner/canonical.js +145 -0
- package/query-planner/cql2-json.d.ts +17 -0
- package/query-planner/cql2-json.d.ts.map +1 -0
- package/query-planner/cql2-json.js +646 -0
- package/query-planner/diagnostics.d.ts +35 -0
- package/query-planner/diagnostics.d.ts.map +1 -0
- package/query-planner/diagnostics.js +373 -0
- package/query-planner/duckdb.d.ts +79 -0
- package/query-planner/duckdb.d.ts.map +1 -0
- package/query-planner/duckdb.js +758 -0
- package/query-planner/execution-context.d.ts +5 -0
- package/query-planner/execution-context.d.ts.map +1 -0
- package/query-planner/execution-context.js +50 -0
- package/query-planner/executor.d.ts +5 -0
- package/query-planner/executor.d.ts.map +1 -0
- package/query-planner/executor.js +223 -0
- package/query-planner/geoservices.d.ts +91 -0
- package/query-planner/geoservices.d.ts.map +1 -0
- package/query-planner/geoservices.js +667 -0
- package/query-planner/grpc.d.ts +100 -0
- package/query-planner/grpc.d.ts.map +1 -0
- package/query-planner/grpc.js +736 -0
- package/query-planner/index.d.ts +44 -0
- package/query-planner/index.d.ts.map +1 -0
- package/query-planner/index.js +30 -0
- package/query-planner/ir.d.ts +20 -0
- package/query-planner/ir.d.ts.map +1 -0
- package/query-planner/ir.js +417 -0
- package/query-planner/local-aggregate.d.ts +5 -0
- package/query-planner/local-aggregate.d.ts.map +1 -0
- package/query-planner/local-aggregate.js +126 -0
- package/query-planner/odata.d.ts +48 -0
- package/query-planner/odata.d.ts.map +1 -0
- package/query-planner/odata.js +662 -0
- package/query-planner/ogc-compiler.d.ts +55 -0
- package/query-planner/ogc-compiler.d.ts.map +1 -0
- package/query-planner/ogc-compiler.js +480 -0
- package/query-planner/ogc-features.d.ts +53 -0
- package/query-planner/ogc-features.d.ts.map +1 -0
- package/query-planner/ogc-features.js +617 -0
- package/query-planner/planner.d.ts +17 -0
- package/query-planner/planner.d.ts.map +1 -0
- package/query-planner/planner.js +818 -0
- package/query-planner/resource.d.ts +94 -0
- package/query-planner/resource.d.ts.map +1 -0
- package/query-planner/resource.js +526 -0
- package/query-planner/semantic-canonical.d.ts +15 -0
- package/query-planner/semantic-canonical.d.ts.map +1 -0
- package/query-planner/semantic-canonical.js +62 -0
- package/query-planner/semantic-compat.d.ts +10 -0
- package/query-planner/semantic-compat.d.ts.map +1 -0
- package/query-planner/semantic-compat.js +35 -0
- package/query-planner/semantic-compiler.d.ts +64 -0
- package/query-planner/semantic-compiler.d.ts.map +1 -0
- package/query-planner/semantic-compiler.js +81 -0
- package/query-planner/semantic-literals.d.ts +30 -0
- package/query-planner/semantic-literals.d.ts.map +1 -0
- package/query-planner/semantic-literals.js +133 -0
- package/query-planner/semantic-types.d.ts +265 -0
- package/query-planner/semantic-types.d.ts.map +1 -0
- package/query-planner/semantic-types.js +1 -0
- package/query-planner/semantic.d.ts +54 -0
- package/query-planner/semantic.d.ts.map +1 -0
- package/query-planner/semantic.js +1421 -0
- package/query-planner/types.d.ts +560 -0
- package/query-planner/types.d.ts.map +1 -0
- package/query-planner/types.js +49 -0
- package/query-planner/wfs-semantic.d.ts +58 -0
- package/query-planner/wfs-semantic.d.ts.map +1 -0
- package/query-planner/wfs-semantic.js +547 -0
- package/query-planner/wfs.d.ts +6 -0
- package/query-planner/wfs.d.ts.map +1 -0
- package/query-planner/wfs.js +71 -0
- package/react/external-map.d.ts +67 -0
- package/react/external-map.d.ts.map +1 -0
- package/react/external-map.js +63 -0
- package/react/honua-map.d.ts.map +1 -1
- package/react/honua-map.js +3 -2
- package/react/honua-source-layer.d.ts +110 -0
- package/react/honua-source-layer.d.ts.map +1 -0
- package/react/honua-source-layer.js +101 -0
- package/react/hooks.d.ts +28 -0
- package/react/hooks.d.ts.map +1 -1
- package/react/hooks.js +26 -4
- package/react/index.d.ts +8 -0
- package/react/index.d.ts.map +1 -1
- package/react/index.js +5 -0
- package/react/query-cache.d.ts +26 -4
- package/react/query-cache.d.ts.map +1 -1
- package/react/query-cache.js +51 -8
- package/react/selection.d.ts +177 -0
- package/react/selection.d.ts.map +1 -0
- package/react/selection.js +0 -0
- package/react/use-mounted-source.d.ts +69 -0
- package/react/use-mounted-source.d.ts.map +1 -0
- package/react/use-mounted-source.js +346 -0
- package/runtime/edit-snapping.d.ts +107 -0
- package/runtime/edit-snapping.d.ts.map +1 -0
- package/runtime/edit-snapping.js +190 -0
- package/runtime/errors.d.ts +3 -2
- package/runtime/errors.d.ts.map +1 -1
- package/runtime/errors.js +19 -2
- package/runtime/index.d.ts +6 -0
- package/runtime/index.d.ts.map +1 -1
- package/runtime/index.js +3 -0
- package/runtime/maplibre-renderer.d.ts +41 -0
- package/runtime/maplibre-renderer.d.ts.map +1 -0
- package/runtime/maplibre-renderer.js +322 -0
- package/runtime/query-tiles.d.ts +2 -1
- package/runtime/query-tiles.d.ts.map +1 -1
- package/runtime/query-tiles.js +6 -2
- package/runtime/source-bridge.d.ts +4 -4
- package/runtime/source-bridge.d.ts.map +1 -1
- package/runtime/source-bridge.js +9 -56
- package/runtime/style-interactions.d.ts +3 -2
- package/runtime/style-interactions.d.ts.map +1 -1
- package/runtime/style-interactions.js +11 -3
- package/runtime/terra-draw-sketch.d.ts +275 -0
- package/runtime/terra-draw-sketch.d.ts.map +1 -0
- package/runtime/terra-draw-sketch.js +404 -0
- package/source-capability-registry.d.ts +1 -0
- package/source-capability-registry.js +1 -0
- package/source-capability-types.d.ts +186 -0
- package/source-capability-types.js +7 -0
- package/style/index.d.ts +2 -0
- package/style/index.d.ts.map +1 -1
- package/style/index.js +2 -0
- package/style/renderers.d.ts +326 -0
- package/style/renderers.d.ts.map +1 -0
- package/style/renderers.js +517 -0
- package/webmap/convert-renderer.d.ts +24 -3
- package/webmap/convert-renderer.d.ts.map +1 -1
- package/webmap/convert-renderer.js +93 -112
- package/webmap/index.d.ts +1 -1
- package/webmap/index.d.ts.map +1 -1
- package/webmap/index.js +1 -1
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
import type { AggregationSpec, Capability, CapabilityPolicy, Protocol, Query, Result, Source, SourceDescriptor } from "../contract/types.js";
|
|
2
|
+
import { type HonuaErrorOptions, HonuaSdkError } from "../core/error-envelope.js";
|
|
3
|
+
import type { GeometryEncoding } from "../core/geoparquet-sql.js";
|
|
4
|
+
import type { EsriGeometryType, EsriSpatialRel } from "../core/types.js";
|
|
5
|
+
import type { GeoParquetResourceHandleV1, GeoParquetResourceResolver } from "./resource.js";
|
|
6
|
+
export declare const QUERY_IR_VERSION: "1.0";
|
|
7
|
+
export declare const QUERY_PLAN_VERSION: "1.0";
|
|
8
|
+
export declare const QUERY_IR_V2_VERSION: "2.0";
|
|
9
|
+
export declare const QUERY_PLAN_V2_VERSION: "2.0";
|
|
10
|
+
export declare const QUERY_PLAN_DIAGNOSTICS_VERSION: "1.0";
|
|
11
|
+
export declare const QUERY_PLANNER_VERSION: "honua-query-planner@1";
|
|
12
|
+
export declare const QUERY_IR_KIND: "honua.query-ir";
|
|
13
|
+
export declare const QUERY_PLAN_KIND: "honua.query-plan";
|
|
14
|
+
/** Hard safety ceiling for this first in-process fallback implementation. */
|
|
15
|
+
export declare const MAX_LOCAL_MATERIALIZATION_ROWS = 100000;
|
|
16
|
+
export type JsonPrimitive = null | boolean | number | string;
|
|
17
|
+
export type JsonValue = JsonPrimitive | readonly JsonValue[] | {
|
|
18
|
+
readonly [key: string]: JsonValue;
|
|
19
|
+
};
|
|
20
|
+
export interface CanonicalSpatialFilter {
|
|
21
|
+
readonly geometry: {
|
|
22
|
+
readonly [key: string]: JsonValue;
|
|
23
|
+
};
|
|
24
|
+
readonly geometryType: EsriGeometryType;
|
|
25
|
+
readonly spatialRel?: EsriSpatialRel;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Serializable form of the current canonical {@link Query}. `AbortSignal` is
|
|
29
|
+
* deliberately excluded: cancellation belongs to execution, never identity.
|
|
30
|
+
*/
|
|
31
|
+
export interface CanonicalQuery {
|
|
32
|
+
/** The current contract carries a source-native string escape hatch. */
|
|
33
|
+
readonly where?: {
|
|
34
|
+
readonly kind: "source-native";
|
|
35
|
+
readonly expression: string;
|
|
36
|
+
};
|
|
37
|
+
readonly spatialFilter?: CanonicalSpatialFilter;
|
|
38
|
+
readonly outFields?: readonly string[];
|
|
39
|
+
readonly orderBy?: readonly {
|
|
40
|
+
readonly field: string;
|
|
41
|
+
readonly direction: "asc" | "desc";
|
|
42
|
+
}[];
|
|
43
|
+
readonly pagination?: {
|
|
44
|
+
readonly offset?: number;
|
|
45
|
+
readonly limit?: number;
|
|
46
|
+
};
|
|
47
|
+
readonly aggregation?: AggregationSpec;
|
|
48
|
+
readonly returnGeometry?: boolean;
|
|
49
|
+
readonly outSr?: string | number;
|
|
50
|
+
}
|
|
51
|
+
export interface QueryIrSourceIdentity {
|
|
52
|
+
readonly id: string;
|
|
53
|
+
readonly protocol: Protocol;
|
|
54
|
+
/** Credential-free endpoint identity: origin/path plus protocol locator ids. */
|
|
55
|
+
readonly endpoint: string;
|
|
56
|
+
readonly serviceId?: string;
|
|
57
|
+
readonly layerId?: number;
|
|
58
|
+
readonly collectionId?: string | number;
|
|
59
|
+
readonly typeName?: string;
|
|
60
|
+
readonly entitySet?: string;
|
|
61
|
+
/** Descriptor-derived geometry property used by the metadata-free OData compiler. */
|
|
62
|
+
readonly geometryProperty?: string;
|
|
63
|
+
readonly srsName?: string;
|
|
64
|
+
/** Bounded, credential-screened schema version identity. */
|
|
65
|
+
readonly schemaVersion?: string;
|
|
66
|
+
/** Bounded, credential-screened source version identity. */
|
|
67
|
+
readonly sourceVersion?: string;
|
|
68
|
+
/** DuckDB/GeoParquet addressing derived from the descriptor for the SQL compiler. */
|
|
69
|
+
readonly geoparquet?: QueryIrGeoparquetIdentity;
|
|
70
|
+
readonly authorizationScope: readonly string[];
|
|
71
|
+
readonly capabilities: readonly Capability[];
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Physical geometry encoding of a GeoParquet column, per the DuckDB SQL
|
|
75
|
+
* compiler. Re-exports {@link GeometryEncoding} (`core/geoparquet-sql.ts`) so
|
|
76
|
+
* the planner's compiled-query artifacts and the live `Source` never drift on
|
|
77
|
+
* which encodings exist — including the GeoParquet 1.1 `geoarrow-*` native
|
|
78
|
+
* single-geometry encodings, which have no DuckDB spatial-predicate
|
|
79
|
+
* expression (`geometryExpr` throws for them; see that module).
|
|
80
|
+
*/
|
|
81
|
+
export type DuckDbGeometryEncoding = GeometryEncoding;
|
|
82
|
+
/**
|
|
83
|
+
* Deterministic GeoParquet addressing carried on the IR so the DuckDB SQL
|
|
84
|
+
* compiler can build `read_parquet(...)` SQL with spatial pushdown without a
|
|
85
|
+
* profiling round-trip. Derived from `locator.url`, `locator.geoparquet`, and
|
|
86
|
+
* the descriptor schema.
|
|
87
|
+
*/
|
|
88
|
+
export interface QueryIrGeoparquetIdentity {
|
|
89
|
+
/** Parquet file URL(s) / hive glob(s) read as one relation. */
|
|
90
|
+
readonly sources: readonly string[];
|
|
91
|
+
/** Geometry column name, when the source is spatial. */
|
|
92
|
+
readonly geometryColumn?: string;
|
|
93
|
+
/** Physical encoding of the geometry column (defaults to `wkb`). */
|
|
94
|
+
readonly geometryEncoding?: DuckDbGeometryEncoding;
|
|
95
|
+
/** Optional GeoParquet 1.1 bbox-covering struct column for row-group pruning. */
|
|
96
|
+
readonly bboxColumn?: string;
|
|
97
|
+
/** Coordinate dimensions for a `geoarrow-*` `geometryEncoding` (GeoParquet 1.1 native). */
|
|
98
|
+
readonly nativeDimensions?: "xy" | "xyz";
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* One projected DuckDB output field of an effective GeoParquet schema: the
|
|
102
|
+
* exact name/type/nullable evidence {@link module:geoparquet/lossless-decoder}
|
|
103
|
+
* needs to compile a lossless row decoder without a runtime `DESCRIBE`.
|
|
104
|
+
*/
|
|
105
|
+
export interface GeoParquetEffectiveSchemaFieldV1 {
|
|
106
|
+
readonly name: string;
|
|
107
|
+
/** Effective DuckDB DESCRIBE type text (e.g. `BIGINT`, `DECIMAL(20,5)`). */
|
|
108
|
+
readonly type: string;
|
|
109
|
+
readonly nullable?: boolean;
|
|
110
|
+
}
|
|
111
|
+
/** Credential-free GeoParquet identity used by v2 plans. */
|
|
112
|
+
export interface QueryIrGeoparquetResourceIdentity {
|
|
113
|
+
readonly resource: GeoParquetResourceHandleV1;
|
|
114
|
+
/** Geometry metadata is safe planner input and never requires locator resolution. */
|
|
115
|
+
readonly geometryColumn?: string;
|
|
116
|
+
readonly geometryEncoding?: DuckDbGeometryEncoding;
|
|
117
|
+
readonly bboxColumn?: string;
|
|
118
|
+
/** Coordinate dimensions for a `geoarrow-*` `geometryEncoding` (GeoParquet 1.1 native). */
|
|
119
|
+
readonly nativeDimensions?: "xy" | "xyz";
|
|
120
|
+
/**
|
|
121
|
+
* Validated, versioned effective DuckDB output schema bound to this plan so
|
|
122
|
+
* opaque `resultEncoding: "lossless-json"` execution can decode exactly,
|
|
123
|
+
* without profiling the resolved locator (#627). Absent for legacy/default
|
|
124
|
+
* result encoding.
|
|
125
|
+
*/
|
|
126
|
+
readonly effectiveSchema?: readonly GeoParquetEffectiveSchemaFieldV1[];
|
|
127
|
+
}
|
|
128
|
+
/** GeoParquet-only v2 source identity. Raw locators are deliberately absent. */
|
|
129
|
+
export interface QueryIrSourceIdentityV2 {
|
|
130
|
+
/** Stable logical id copied from the validated opaque handle. */
|
|
131
|
+
readonly id: string;
|
|
132
|
+
readonly protocol: "geoparquet";
|
|
133
|
+
readonly endpoint: "[opaque-resource]";
|
|
134
|
+
/** Safe descriptor metadata needed to reconstruct bounded-local plans exactly. */
|
|
135
|
+
readonly primaryKey?: string;
|
|
136
|
+
readonly schemaVersion?: string;
|
|
137
|
+
readonly sourceVersion?: string;
|
|
138
|
+
readonly geoparquet: QueryIrGeoparquetResourceIdentity;
|
|
139
|
+
readonly authorizationScope: readonly string[];
|
|
140
|
+
readonly capabilities: readonly Capability[];
|
|
141
|
+
}
|
|
142
|
+
export interface QueryIrV1 {
|
|
143
|
+
readonly kind: typeof QUERY_IR_KIND;
|
|
144
|
+
readonly version: typeof QUERY_IR_VERSION;
|
|
145
|
+
readonly source: QueryIrSourceIdentity;
|
|
146
|
+
readonly query: CanonicalQuery;
|
|
147
|
+
}
|
|
148
|
+
export interface QueryIrV2 {
|
|
149
|
+
readonly kind: typeof QUERY_IR_KIND;
|
|
150
|
+
readonly version: typeof QUERY_IR_V2_VERSION;
|
|
151
|
+
readonly source: QueryIrSourceIdentityV2;
|
|
152
|
+
readonly query: CanonicalQuery;
|
|
153
|
+
}
|
|
154
|
+
export type QueryFallbackPolicy = {
|
|
155
|
+
readonly mode: "disabled";
|
|
156
|
+
} | {
|
|
157
|
+
readonly mode: "bounded-local";
|
|
158
|
+
/** Maximum feature objects that may enter local execution. */
|
|
159
|
+
readonly maxRows: number;
|
|
160
|
+
/** Optional additional ceiling measured from the materialized JSON payload. */
|
|
161
|
+
readonly maxBytes?: number;
|
|
162
|
+
};
|
|
163
|
+
export interface QueryPlanningEstimates {
|
|
164
|
+
readonly rows?: number;
|
|
165
|
+
readonly bytes?: number;
|
|
166
|
+
readonly requests?: number;
|
|
167
|
+
}
|
|
168
|
+
export type QueryPlanBoundConfidence = "exact" | "bounded" | "estimated" | "unknown";
|
|
169
|
+
export type QueryPlanBoundSource = "compiler" | "query-limit" | "fallback-policy" | "caller-estimate" | "plan-summary" | "unavailable";
|
|
170
|
+
/** One deterministic quantity bound. Missing numbers are deliberately unknown, never zero. */
|
|
171
|
+
export interface QueryPlanQuantityBound {
|
|
172
|
+
readonly unit: "request" | "row" | "byte";
|
|
173
|
+
readonly confidence: QueryPlanBoundConfidence;
|
|
174
|
+
readonly source: QueryPlanBoundSource;
|
|
175
|
+
readonly lower?: number;
|
|
176
|
+
readonly upper?: number;
|
|
177
|
+
readonly estimate?: number;
|
|
178
|
+
}
|
|
179
|
+
/** Versioned cost and safety bounds used at both plan and step scope. */
|
|
180
|
+
export interface QueryPlanBoundsV1 {
|
|
181
|
+
readonly version: typeof QUERY_PLAN_DIAGNOSTICS_VERSION;
|
|
182
|
+
readonly requests: QueryPlanQuantityBound;
|
|
183
|
+
readonly rows: QueryPlanQuantityBound;
|
|
184
|
+
readonly bytes: QueryPlanQuantityBound;
|
|
185
|
+
readonly transferBytes: QueryPlanQuantityBound;
|
|
186
|
+
/** UTF-8 bytes of the deterministic serialized materialization checked by the executor. */
|
|
187
|
+
readonly serializedMaterializationBytes: QueryPlanQuantityBound;
|
|
188
|
+
/** Actual JavaScript heap use. Unknown unless a runtime supplies direct evidence. */
|
|
189
|
+
readonly memoryBytes: QueryPlanQuantityBound;
|
|
190
|
+
}
|
|
191
|
+
export type QueryPlanCachePolicy = "bypass" | "prefer-cache" | "require-fresh";
|
|
192
|
+
export type QueryPlanCacheFreshness = "fresh" | "stale" | "unknown";
|
|
193
|
+
export type QueryPlanCacheAction = "bypass" | "reuse" | "revalidate" | "refresh";
|
|
194
|
+
export type QueryPlanValidatorKind = "etag" | "last-modified" | "revision" | "fingerprint";
|
|
195
|
+
export interface QueryPlanValidatorInput {
|
|
196
|
+
readonly kind: QueryPlanValidatorKind;
|
|
197
|
+
/** Raw validators are accepted at planning only and persisted as a digest. */
|
|
198
|
+
readonly value?: string;
|
|
199
|
+
/** Safe reconstruction path for already-digested persisted provenance. */
|
|
200
|
+
readonly fingerprint?: `sha256:${string}`;
|
|
201
|
+
}
|
|
202
|
+
export interface QueryPlanCacheOptions {
|
|
203
|
+
readonly policy?: QueryPlanCachePolicy;
|
|
204
|
+
readonly freshness?: QueryPlanCacheFreshness;
|
|
205
|
+
readonly validator?: QueryPlanValidatorInput;
|
|
206
|
+
}
|
|
207
|
+
export interface QueryPlanCacheDecisionV1 {
|
|
208
|
+
readonly version: typeof QUERY_PLAN_DIAGNOSTICS_VERSION;
|
|
209
|
+
readonly policy: QueryPlanCachePolicy;
|
|
210
|
+
readonly action: QueryPlanCacheAction;
|
|
211
|
+
readonly freshness: QueryPlanCacheFreshness;
|
|
212
|
+
readonly validator?: {
|
|
213
|
+
readonly kind: QueryPlanValidatorKind;
|
|
214
|
+
readonly fingerprint: `sha256:${string}`;
|
|
215
|
+
};
|
|
216
|
+
readonly reason: "policy-bypass" | "fresh-entry" | "validator-available" | "stale-entry" | "cache-miss";
|
|
217
|
+
}
|
|
218
|
+
export type QueryPlanFidelity = "exact" | "equivalent" | "approximate";
|
|
219
|
+
export interface QueryPlanFidelityLoss {
|
|
220
|
+
readonly code: "spatial-envelope-reduction";
|
|
221
|
+
readonly path: string;
|
|
222
|
+
readonly description: string;
|
|
223
|
+
readonly remediation: string;
|
|
224
|
+
}
|
|
225
|
+
export type QueryPlanDiscoveryState = "metadata" | "declared" | "inferred" | "unavailable";
|
|
226
|
+
export interface QueryPlanDiscoveryContext {
|
|
227
|
+
readonly state: QueryPlanDiscoveryState;
|
|
228
|
+
/** Raw discovery source is planning-only and persisted as a digest. */
|
|
229
|
+
readonly source?: string;
|
|
230
|
+
readonly sourceFingerprint?: `sha256:${string}`;
|
|
231
|
+
readonly validator?: QueryPlanValidatorInput;
|
|
232
|
+
}
|
|
233
|
+
export interface QueryPlanProvenanceV1 {
|
|
234
|
+
readonly version: typeof QUERY_PLAN_DIAGNOSTICS_VERSION;
|
|
235
|
+
readonly source: {
|
|
236
|
+
readonly id: string;
|
|
237
|
+
readonly protocol: Protocol;
|
|
238
|
+
readonly endpointFingerprint: `sha256:${string}`;
|
|
239
|
+
readonly descriptorFingerprint: `sha256:${string}`;
|
|
240
|
+
readonly versionFingerprint?: `sha256:${string}`;
|
|
241
|
+
};
|
|
242
|
+
readonly schema: {
|
|
243
|
+
readonly state: "known";
|
|
244
|
+
readonly fingerprint: `sha256:${string}`;
|
|
245
|
+
readonly basis: "schema-v2" | "version";
|
|
246
|
+
} | {
|
|
247
|
+
readonly state: "unavailable";
|
|
248
|
+
readonly reason: "not-provided";
|
|
249
|
+
};
|
|
250
|
+
readonly discovery: {
|
|
251
|
+
readonly state: QueryPlanDiscoveryState;
|
|
252
|
+
readonly sourceFingerprint?: `sha256:${string}`;
|
|
253
|
+
readonly validator?: {
|
|
254
|
+
readonly kind: QueryPlanValidatorKind;
|
|
255
|
+
readonly fingerprint: `sha256:${string}`;
|
|
256
|
+
};
|
|
257
|
+
readonly fingerprint: `sha256:${string}`;
|
|
258
|
+
};
|
|
259
|
+
readonly authorizationScope: {
|
|
260
|
+
readonly fingerprint: `sha256:${string}`;
|
|
261
|
+
readonly count: number;
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
export interface QueryPlanStepProvenanceV1 {
|
|
265
|
+
readonly version: typeof QUERY_PLAN_DIAGNOSTICS_VERSION;
|
|
266
|
+
readonly sourceFingerprint: `sha256:${string}`;
|
|
267
|
+
readonly schemaFingerprint?: `sha256:${string}`;
|
|
268
|
+
readonly discoveryFingerprint: `sha256:${string}`;
|
|
269
|
+
readonly authorizationScopeFingerprint: `sha256:${string}`;
|
|
270
|
+
}
|
|
271
|
+
export type QueryPlanExecutionMode = "snapshot" | "delta";
|
|
272
|
+
export interface QueryPlanValidityV1 {
|
|
273
|
+
readonly version: typeof QUERY_PLAN_DIAGNOSTICS_VERSION;
|
|
274
|
+
readonly plannerVersion: typeof QUERY_PLANNER_VERSION;
|
|
275
|
+
readonly contractVersion: string;
|
|
276
|
+
readonly executionMode: QueryPlanExecutionMode;
|
|
277
|
+
readonly sourceFingerprint: `sha256:${string}`;
|
|
278
|
+
readonly schemaFingerprint: `sha256:${string}`;
|
|
279
|
+
readonly discoveryFingerprint: `sha256:${string}`;
|
|
280
|
+
readonly authorizationScopeFingerprint: `sha256:${string}`;
|
|
281
|
+
readonly queryFingerprint: `sha256:${string}`;
|
|
282
|
+
readonly crsFingerprint: `sha256:${string}`;
|
|
283
|
+
readonly policyFingerprint: `sha256:${string}`;
|
|
284
|
+
readonly fingerprint: `sha256:${string}`;
|
|
285
|
+
}
|
|
286
|
+
export type QueryPlanWarningCode = "bounded-local-fallback" | "geometry-transfer-required" | "approximate-spatial-filter";
|
|
287
|
+
export interface QueryPlanWarning {
|
|
288
|
+
readonly code: QueryPlanWarningCode;
|
|
289
|
+
readonly severity: "warning";
|
|
290
|
+
readonly path: string;
|
|
291
|
+
readonly message: string;
|
|
292
|
+
readonly remediation: string;
|
|
293
|
+
}
|
|
294
|
+
export interface ExplainQueryOptions<T = Record<string, unknown>> {
|
|
295
|
+
readonly descriptor: SourceDescriptor;
|
|
296
|
+
readonly query?: Readonly<Query<T>>;
|
|
297
|
+
readonly capabilityPolicy?: CapabilityPolicy;
|
|
298
|
+
readonly fallback?: QueryFallbackPolicy;
|
|
299
|
+
readonly schemaVersion?: string;
|
|
300
|
+
readonly sourceVersion?: string;
|
|
301
|
+
/** Stable scope identifiers only. Never pass credentials or tokens. */
|
|
302
|
+
readonly authorizationScope?: readonly string[];
|
|
303
|
+
/** Caller-supplied metadata estimates; explaining never reads result data. */
|
|
304
|
+
readonly estimates?: QueryPlanningEstimates;
|
|
305
|
+
/** Stable cache state only. Observation clocks never enter a plan fingerprint. */
|
|
306
|
+
readonly cache?: QueryPlanCacheOptions;
|
|
307
|
+
/** Credential-safe discovery identity. Raw sources/validators are digested. */
|
|
308
|
+
readonly discovery?: QueryPlanDiscoveryContext;
|
|
309
|
+
/** Realtime delta plans carry mode only; live cursor bytes remain transport state. */
|
|
310
|
+
readonly executionMode?: QueryPlanExecutionMode;
|
|
311
|
+
}
|
|
312
|
+
/** Opt-in GeoParquet v2 planning options. */
|
|
313
|
+
export interface ExplainGeoParquetQueryOptions<T = Record<string, unknown>> extends ExplainQueryOptions<T> {
|
|
314
|
+
/** Opaque stable identity; the locator remains private to the injected resolver. */
|
|
315
|
+
readonly geoparquetResource: GeoParquetResourceHandleV1;
|
|
316
|
+
/**
|
|
317
|
+
* Trustworthy effective DuckDB output schema for this resource, established
|
|
318
|
+
* out-of-band by the trusted plan author (#627). Required to bind a plan
|
|
319
|
+
* that a `resultEncoding: "lossless-json"` source can execute opaquely.
|
|
320
|
+
*/
|
|
321
|
+
readonly effectiveSchema?: readonly GeoParquetEffectiveSchemaFieldV1[];
|
|
322
|
+
}
|
|
323
|
+
export interface GeoServicesCompiledQueryV1 {
|
|
324
|
+
readonly compiler: "geoservices-rest-query-v1";
|
|
325
|
+
readonly serviceId: string;
|
|
326
|
+
readonly layerId: number;
|
|
327
|
+
readonly where?: string;
|
|
328
|
+
readonly outFields?: readonly string[];
|
|
329
|
+
readonly returnGeometry?: boolean;
|
|
330
|
+
readonly outSr?: string | number;
|
|
331
|
+
readonly orderByFields?: string;
|
|
332
|
+
readonly geometry?: {
|
|
333
|
+
readonly [key: string]: JsonValue;
|
|
334
|
+
};
|
|
335
|
+
readonly geometryType?: EsriGeometryType;
|
|
336
|
+
readonly spatialRel?: EsriSpatialRel;
|
|
337
|
+
readonly resultOffset?: number;
|
|
338
|
+
readonly resultRecordCount?: number;
|
|
339
|
+
readonly outStatistics?: readonly {
|
|
340
|
+
readonly statisticType: string;
|
|
341
|
+
readonly onStatisticField: string;
|
|
342
|
+
readonly outStatisticFieldName: string;
|
|
343
|
+
}[];
|
|
344
|
+
readonly groupByFieldsForStatistics?: string;
|
|
345
|
+
}
|
|
346
|
+
/** Inspectable OGC API Features `/items` request produced without I/O. */
|
|
347
|
+
export interface OgcApiFeaturesCompiledQueryV1 {
|
|
348
|
+
readonly compiler: "ogc-api-features-query-v1";
|
|
349
|
+
readonly collectionId: string | number;
|
|
350
|
+
readonly filter?: string;
|
|
351
|
+
readonly filterLang?: "cql2-text";
|
|
352
|
+
readonly properties?: readonly string[];
|
|
353
|
+
readonly sortby?: string;
|
|
354
|
+
readonly bbox?: string;
|
|
355
|
+
readonly crs?: string;
|
|
356
|
+
readonly offset?: number;
|
|
357
|
+
readonly limit?: number;
|
|
358
|
+
}
|
|
359
|
+
/** Inspectable WFS 2.0 GetFeature request produced without I/O. */
|
|
360
|
+
export interface WfsCompiledQueryV1 {
|
|
361
|
+
readonly compiler: "wfs-2.0-get-feature-v1";
|
|
362
|
+
readonly typeName: string;
|
|
363
|
+
readonly filter?: string;
|
|
364
|
+
readonly propertyName?: readonly string[];
|
|
365
|
+
readonly sortBy?: string;
|
|
366
|
+
readonly startIndex?: number;
|
|
367
|
+
readonly count?: number;
|
|
368
|
+
readonly srsName?: string;
|
|
369
|
+
}
|
|
370
|
+
/** Inspectable OData v4 entity-set query produced without I/O. */
|
|
371
|
+
export interface OdataCompiledQueryV1 {
|
|
372
|
+
readonly compiler: "odata-v4-query-v1";
|
|
373
|
+
readonly entitySet: string;
|
|
374
|
+
readonly filter?: string;
|
|
375
|
+
readonly select?: readonly string[];
|
|
376
|
+
readonly expand?: readonly string[];
|
|
377
|
+
readonly orderBy?: readonly string[];
|
|
378
|
+
readonly skip?: number;
|
|
379
|
+
readonly top?: number;
|
|
380
|
+
}
|
|
381
|
+
/** Inspectable DuckDB `SELECT` over `read_parquet(...)` produced without I/O. */
|
|
382
|
+
export interface DuckDbCompiledQueryV1 {
|
|
383
|
+
readonly compiler: "duckdb-sql-v1";
|
|
384
|
+
/** Deterministic, injection-safe DuckDB SQL text. */
|
|
385
|
+
readonly sql: string;
|
|
386
|
+
/** Parquet file URL(s) / glob(s) the SQL reads. */
|
|
387
|
+
readonly sources: readonly string[];
|
|
388
|
+
readonly geometryColumn?: string;
|
|
389
|
+
readonly geometryEncoding?: DuckDbGeometryEncoding;
|
|
390
|
+
/** True when a non-envelope spatial filter was reduced to its bounding box. */
|
|
391
|
+
readonly bboxApproximated?: boolean;
|
|
392
|
+
}
|
|
393
|
+
/** Credential-free DuckDB template compiled for execution-time resource binding. */
|
|
394
|
+
export interface DuckDbCompiledQueryV2 {
|
|
395
|
+
readonly compiler: "duckdb-sql-v2";
|
|
396
|
+
/** Inspectable SQL over a fixed non-runnable placeholder, never a raw locator. */
|
|
397
|
+
readonly sqlTemplate: string;
|
|
398
|
+
readonly resource: GeoParquetResourceHandleV1;
|
|
399
|
+
readonly geometryColumn?: string;
|
|
400
|
+
readonly geometryEncoding?: DuckDbGeometryEncoding;
|
|
401
|
+
readonly bboxApproximated?: boolean;
|
|
402
|
+
}
|
|
403
|
+
/** Proto spatial-relationship enum value name emitted by the gRPC compiler. */
|
|
404
|
+
export type GrpcSpatialRelationship = "SPATIAL_RELATIONSHIP_INTERSECTS" | "SPATIAL_RELATIONSHIP_WITHIN" | "SPATIAL_RELATIONSHIP_CONTAINS" | "SPATIAL_RELATIONSHIP_ENVELOPE_INTERSECTS" | "SPATIAL_RELATIONSHIP_CROSSES" | "SPATIAL_RELATIONSHIP_TOUCHES" | "SPATIAL_RELATIONSHIP_OVERLAPS" | "SPATIAL_RELATIONSHIP_DISJOINT";
|
|
405
|
+
/** Proto statistic-type enum value name emitted by the gRPC compiler. */
|
|
406
|
+
export type GrpcStatisticType = "STATISTIC_TYPE_COUNT" | "STATISTIC_TYPE_SUM" | "STATISTIC_TYPE_MIN" | "STATISTIC_TYPE_MAX" | "STATISTIC_TYPE_AVG" | "STATISTIC_TYPE_STDDEV" | "STATISTIC_TYPE_VAR";
|
|
407
|
+
/**
|
|
408
|
+
* Inspectable `honua.v1.FeatureService/QueryFeatures` unary request produced
|
|
409
|
+
* without pulling in the protobuf runtime. Field names and enum value names
|
|
410
|
+
* mirror the generated `QueryFeaturesRequest` message so the plan is a faithful,
|
|
411
|
+
* deterministic description of the wire request.
|
|
412
|
+
*/
|
|
413
|
+
export interface GrpcCompiledQueryV1 {
|
|
414
|
+
readonly compiler: "honua-grpc-query-features-v1";
|
|
415
|
+
readonly service: "honua.v1.FeatureService";
|
|
416
|
+
readonly method: "QueryFeatures";
|
|
417
|
+
readonly serviceId: string;
|
|
418
|
+
readonly layerId: number;
|
|
419
|
+
readonly where?: string;
|
|
420
|
+
readonly outFields?: readonly string[];
|
|
421
|
+
readonly returnGeometry?: boolean;
|
|
422
|
+
readonly outSr?: string | number;
|
|
423
|
+
readonly orderBy?: string;
|
|
424
|
+
readonly resultOffset?: number;
|
|
425
|
+
readonly resultRecordCount?: number;
|
|
426
|
+
readonly spatialFilter?: {
|
|
427
|
+
readonly geometry: {
|
|
428
|
+
readonly [key: string]: JsonValue;
|
|
429
|
+
};
|
|
430
|
+
readonly geometryType: EsriGeometryType;
|
|
431
|
+
readonly spatialRelationship: GrpcSpatialRelationship;
|
|
432
|
+
};
|
|
433
|
+
readonly outStatistics?: readonly {
|
|
434
|
+
readonly statisticType: GrpcStatisticType;
|
|
435
|
+
readonly onStatisticField: string;
|
|
436
|
+
readonly outStatisticFieldName: string;
|
|
437
|
+
}[];
|
|
438
|
+
readonly groupBy?: readonly string[];
|
|
439
|
+
}
|
|
440
|
+
export type RemoteCompiledQueryV1 = GeoServicesCompiledQueryV1 | OgcApiFeaturesCompiledQueryV1 | WfsCompiledQueryV1 | OdataCompiledQueryV1 | DuckDbCompiledQueryV1 | GrpcCompiledQueryV1;
|
|
441
|
+
export interface RemoteQueryPlanStep {
|
|
442
|
+
readonly id: string;
|
|
443
|
+
readonly engine: "remote";
|
|
444
|
+
readonly operation: "query" | "queryAll" | "queryAggregate";
|
|
445
|
+
readonly pushdown: "full" | "partial";
|
|
446
|
+
readonly fidelity: QueryPlanFidelity;
|
|
447
|
+
readonly losses: readonly QueryPlanFidelityLoss[];
|
|
448
|
+
readonly bounds: QueryPlanBoundsV1;
|
|
449
|
+
readonly provenance: QueryPlanStepProvenanceV1;
|
|
450
|
+
readonly reason: string;
|
|
451
|
+
readonly requests: number;
|
|
452
|
+
readonly query: CanonicalQuery;
|
|
453
|
+
readonly compiled: RemoteCompiledQueryV1;
|
|
454
|
+
}
|
|
455
|
+
export interface GeoParquetRemoteQueryPlanStepV2 {
|
|
456
|
+
readonly id: string;
|
|
457
|
+
readonly engine: "remote";
|
|
458
|
+
readonly operation: "query" | "queryAll" | "queryAggregate";
|
|
459
|
+
readonly pushdown: "full" | "partial";
|
|
460
|
+
readonly fidelity: QueryPlanFidelity;
|
|
461
|
+
readonly losses: readonly QueryPlanFidelityLoss[];
|
|
462
|
+
readonly bounds: QueryPlanBoundsV1;
|
|
463
|
+
readonly provenance: QueryPlanStepProvenanceV1;
|
|
464
|
+
readonly reason: string;
|
|
465
|
+
readonly requests: number;
|
|
466
|
+
readonly query: CanonicalQuery;
|
|
467
|
+
readonly compiled: DuckDbCompiledQueryV2;
|
|
468
|
+
}
|
|
469
|
+
export interface LocalAggregatePlanStep {
|
|
470
|
+
readonly id: string;
|
|
471
|
+
readonly engine: "client";
|
|
472
|
+
readonly operation: "aggregate";
|
|
473
|
+
readonly pushdown: "none";
|
|
474
|
+
readonly fidelity: "equivalent";
|
|
475
|
+
readonly losses: readonly QueryPlanFidelityLoss[];
|
|
476
|
+
readonly bounds: QueryPlanBoundsV1;
|
|
477
|
+
readonly provenance: QueryPlanStepProvenanceV1;
|
|
478
|
+
readonly reason: string;
|
|
479
|
+
readonly inputStepId: string;
|
|
480
|
+
readonly aggregation: AggregationSpec;
|
|
481
|
+
readonly maxRows: number;
|
|
482
|
+
readonly maxBytes?: number;
|
|
483
|
+
}
|
|
484
|
+
export type QueryPlanStep = RemoteQueryPlanStep | LocalAggregatePlanStep;
|
|
485
|
+
export type QueryPlanStepV2 = GeoParquetRemoteQueryPlanStepV2 | LocalAggregatePlanStep;
|
|
486
|
+
export interface QueryExecutionPlanV1 {
|
|
487
|
+
readonly kind: typeof QUERY_PLAN_KIND;
|
|
488
|
+
readonly version: typeof QUERY_PLAN_VERSION;
|
|
489
|
+
readonly id: string;
|
|
490
|
+
readonly fingerprint: `sha256:${string}`;
|
|
491
|
+
readonly ir: QueryIrV1;
|
|
492
|
+
readonly capabilityPolicy: CapabilityPolicy;
|
|
493
|
+
readonly fallback: QueryFallbackPolicy;
|
|
494
|
+
readonly pushdown: "full" | "partial";
|
|
495
|
+
readonly diagnosticsVersion: typeof QUERY_PLAN_DIAGNOSTICS_VERSION;
|
|
496
|
+
readonly fidelity: QueryPlanFidelity;
|
|
497
|
+
readonly losses: readonly QueryPlanFidelityLoss[];
|
|
498
|
+
readonly bounds: QueryPlanBoundsV1;
|
|
499
|
+
readonly cache: QueryPlanCacheDecisionV1;
|
|
500
|
+
readonly provenance: QueryPlanProvenanceV1;
|
|
501
|
+
readonly validity: QueryPlanValidityV1;
|
|
502
|
+
readonly estimates: QueryPlanningEstimates;
|
|
503
|
+
readonly steps: readonly QueryPlanStep[];
|
|
504
|
+
readonly warnings: readonly QueryPlanWarning[];
|
|
505
|
+
}
|
|
506
|
+
export interface QueryExecutionPlanV2 {
|
|
507
|
+
readonly kind: typeof QUERY_PLAN_KIND;
|
|
508
|
+
readonly version: typeof QUERY_PLAN_V2_VERSION;
|
|
509
|
+
readonly id: string;
|
|
510
|
+
readonly fingerprint: `sha256:${string}`;
|
|
511
|
+
readonly ir: QueryIrV2;
|
|
512
|
+
readonly capabilityPolicy: CapabilityPolicy;
|
|
513
|
+
readonly fallback: QueryFallbackPolicy;
|
|
514
|
+
readonly pushdown: "full" | "partial";
|
|
515
|
+
readonly diagnosticsVersion: typeof QUERY_PLAN_DIAGNOSTICS_VERSION;
|
|
516
|
+
readonly fidelity: QueryPlanFidelity;
|
|
517
|
+
readonly losses: readonly QueryPlanFidelityLoss[];
|
|
518
|
+
readonly bounds: QueryPlanBoundsV1;
|
|
519
|
+
readonly cache: QueryPlanCacheDecisionV1;
|
|
520
|
+
readonly provenance: QueryPlanProvenanceV1;
|
|
521
|
+
readonly validity: QueryPlanValidityV1;
|
|
522
|
+
readonly estimates: QueryPlanningEstimates;
|
|
523
|
+
readonly steps: readonly QueryPlanStepV2[];
|
|
524
|
+
readonly warnings: readonly QueryPlanWarning[];
|
|
525
|
+
}
|
|
526
|
+
export type QueryExecutionPlan = QueryExecutionPlanV1 | QueryExecutionPlanV2;
|
|
527
|
+
export type QueryPlanningErrorCode = "invalid-query" | "unsupported-compiler" | "unsupported-query" | "capability-not-supported" | "fallback-disabled" | "unsafe-materialization";
|
|
528
|
+
export declare class HonuaQueryPlanningError extends HonuaSdkError {
|
|
529
|
+
readonly code: QueryPlanningErrorCode;
|
|
530
|
+
constructor(code: QueryPlanningErrorCode, message: string, options?: HonuaErrorOptions);
|
|
531
|
+
}
|
|
532
|
+
export type QueryPlanExecutionErrorCode = "invalid-plan" | "plan-context-mismatch" | "stale-plan" | "foreign-plan" | "unsafe-materialization" | "invalid-resource-handle" | "resource-unavailable" | "resource-expired" | "resource-resolution-failed" | "resource-execution-failed";
|
|
533
|
+
export declare class HonuaQueryPlanExecutionError extends HonuaSdkError {
|
|
534
|
+
readonly code: QueryPlanExecutionErrorCode;
|
|
535
|
+
readonly reason?: QueryPlanExecutionFailureReason | undefined;
|
|
536
|
+
constructor(code: QueryPlanExecutionErrorCode, message: string, options?: HonuaErrorOptions, reason?: QueryPlanExecutionFailureReason | undefined);
|
|
537
|
+
}
|
|
538
|
+
export interface ExecuteQueryPlanOptions {
|
|
539
|
+
readonly signal?: AbortSignal;
|
|
540
|
+
readonly schemaVersion?: string;
|
|
541
|
+
readonly sourceVersion?: string;
|
|
542
|
+
readonly authorizationScope?: readonly string[];
|
|
543
|
+
readonly discovery?: QueryPlanDiscoveryContext;
|
|
544
|
+
readonly executionMode?: QueryPlanExecutionMode;
|
|
545
|
+
/** Exact non-secret partition id required by a GeoParquet v2 resource handle. */
|
|
546
|
+
readonly authorizationContextId?: string;
|
|
547
|
+
/** Lifecycle-scoped resolver used only at the trusted v2 execution boundary. */
|
|
548
|
+
readonly geoParquetResourceResolver?: GeoParquetResourceResolver;
|
|
549
|
+
/** Must match the effective schema the plan was explained with (#627). */
|
|
550
|
+
readonly effectiveSchema?: readonly GeoParquetEffectiveSchemaFieldV1[];
|
|
551
|
+
}
|
|
552
|
+
export type QueryPlanExecutionFailureReason = "source-identity-changed" | "authorization-scope-changed" | "source-version-changed" | "schema-changed" | "capabilities-changed" | "discovery-changed" | "execution-mode-changed";
|
|
553
|
+
export interface QueryPlanExecution<T = Record<string, unknown>> {
|
|
554
|
+
readonly planId: string;
|
|
555
|
+
readonly fingerprint: `sha256:${string}`;
|
|
556
|
+
readonly result: Result<T>;
|
|
557
|
+
}
|
|
558
|
+
/** Executor signature exported for dependency injection and test doubles. */
|
|
559
|
+
export type QueryPlanExecutor = <T>(plan: QueryExecutionPlan, source: Source<T>, options?: ExecuteQueryPlanOptions) => Promise<QueryPlanExecution<T>>;
|
|
560
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/query-planner/types.ts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AAC,CAAC;CAC5B;AAED,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,EAChC,IAAI,EAAE,kBAAkB,EACxB,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EACjB,OAAO,CAAC,EAAE,uBAAuB,KAC9B,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { HonuaSdkError } from "../core/error-envelope.js";
|
|
2
|
+
export const QUERY_IR_VERSION = "1.0";
|
|
3
|
+
export const QUERY_PLAN_VERSION = "1.0";
|
|
4
|
+
export const QUERY_IR_V2_VERSION = "2.0";
|
|
5
|
+
export const QUERY_PLAN_V2_VERSION = "2.0";
|
|
6
|
+
export const QUERY_PLAN_DIAGNOSTICS_VERSION = "1.0";
|
|
7
|
+
export const QUERY_PLANNER_VERSION = "honua-query-planner@1";
|
|
8
|
+
export const QUERY_IR_KIND = "honua.query-ir";
|
|
9
|
+
export const QUERY_PLAN_KIND = "honua.query-plan";
|
|
10
|
+
/** Hard safety ceiling for this first in-process fallback implementation. */
|
|
11
|
+
export const MAX_LOCAL_MATERIALIZATION_ROWS = 100_000;
|
|
12
|
+
export class HonuaQueryPlanningError extends HonuaSdkError {
|
|
13
|
+
code;
|
|
14
|
+
constructor(code, message, options = {}) {
|
|
15
|
+
super(QUERY_PLANNING_CODES[code], message, options);
|
|
16
|
+
this.code = code;
|
|
17
|
+
this.name = "HonuaQueryPlanningError";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export class HonuaQueryPlanExecutionError extends HonuaSdkError {
|
|
21
|
+
code;
|
|
22
|
+
reason;
|
|
23
|
+
constructor(code, message, options = {}, reason) {
|
|
24
|
+
super(QUERY_EXECUTION_CODES[code], message, options);
|
|
25
|
+
this.code = code;
|
|
26
|
+
this.reason = reason;
|
|
27
|
+
this.name = "HonuaQueryPlanExecutionError";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const QUERY_PLANNING_CODES = {
|
|
31
|
+
"invalid-query": "query.planning.invalid-query",
|
|
32
|
+
"unsupported-compiler": "query.planning.unsupported-compiler",
|
|
33
|
+
"unsupported-query": "query.planning.unsupported-query",
|
|
34
|
+
"capability-not-supported": "query.planning.capability-not-supported",
|
|
35
|
+
"fallback-disabled": "query.planning.fallback-disabled",
|
|
36
|
+
"unsafe-materialization": "query.planning.unsafe-materialization",
|
|
37
|
+
};
|
|
38
|
+
const QUERY_EXECUTION_CODES = {
|
|
39
|
+
"invalid-plan": "query.execution.invalid-plan",
|
|
40
|
+
"plan-context-mismatch": "query.execution.plan-context-mismatch",
|
|
41
|
+
"stale-plan": "query.execution.plan-context-mismatch",
|
|
42
|
+
"foreign-plan": "query.execution.plan-context-mismatch",
|
|
43
|
+
"unsafe-materialization": "query.execution.unsafe-materialization",
|
|
44
|
+
"invalid-resource-handle": "query.execution.invalid-resource-handle",
|
|
45
|
+
"resource-unavailable": "query.execution.resource-unavailable",
|
|
46
|
+
"resource-expired": "query.execution.resource-expired",
|
|
47
|
+
"resource-resolution-failed": "query.execution.resource-resolution-failed",
|
|
48
|
+
"resource-execution-failed": "query.execution.resource-execution-failed",
|
|
49
|
+
};
|