@milaboratories/pl-model-middle-layer 1.23.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/block_meta/block_description.d.ts +18 -18
- package/dist/block_registry/block_pack_spec.d.ts +8 -8
- package/dist/block_registry/overview.d.ts +194 -194
- package/dist/block_registry/registry_spec.d.ts +12 -12
- package/dist/pframe/internal_api/api_read.d.ts +2 -2
- package/dist/pframe/internal_api/api_read.d.ts.map +1 -1
- package/dist/pframe/internal_api/api_wasm.d.ts +68 -2
- package/dist/pframe/internal_api/api_wasm.d.ts.map +1 -1
- package/dist/pframe/internal_api/index.d.ts +2 -2
- package/dist/pframe/internal_api/table.d.ts +1 -1
- package/package.json +1 -1
- package/src/pframe/internal_api/api_read.ts +2 -2
- package/src/pframe/internal_api/api_wasm.ts +74 -0
- package/src/pframe/internal_api/table.ts +1 -1
|
@@ -99,27 +99,27 @@ declare const RegistryEntry: z.ZodObject<{
|
|
|
99
99
|
}, "strip", z.ZodTypeAny, {
|
|
100
100
|
id: string;
|
|
101
101
|
spec: {
|
|
102
|
-
type: "local-dev";
|
|
103
|
-
path: string;
|
|
104
|
-
} | {
|
|
105
102
|
type: "remote-v1";
|
|
106
103
|
url: string;
|
|
107
104
|
} | {
|
|
108
105
|
type: "remote-v2";
|
|
109
106
|
url: string;
|
|
107
|
+
} | {
|
|
108
|
+
type: "local-dev";
|
|
109
|
+
path: string;
|
|
110
110
|
};
|
|
111
111
|
title?: string | undefined;
|
|
112
112
|
}, {
|
|
113
113
|
id: string;
|
|
114
114
|
spec: {
|
|
115
|
-
type: "local-dev";
|
|
116
|
-
path: string;
|
|
117
|
-
} | {
|
|
118
115
|
type: "remote-v1";
|
|
119
116
|
url: string;
|
|
120
117
|
} | {
|
|
121
118
|
type: "remote-v2";
|
|
122
119
|
url: string;
|
|
120
|
+
} | {
|
|
121
|
+
type: "local-dev";
|
|
122
|
+
path: string;
|
|
123
123
|
};
|
|
124
124
|
title?: string | undefined;
|
|
125
125
|
}>;
|
|
@@ -158,27 +158,27 @@ declare const RegistryList: z.ZodArray<z.ZodObject<{
|
|
|
158
158
|
}, "strip", z.ZodTypeAny, {
|
|
159
159
|
id: string;
|
|
160
160
|
spec: {
|
|
161
|
-
type: "local-dev";
|
|
162
|
-
path: string;
|
|
163
|
-
} | {
|
|
164
161
|
type: "remote-v1";
|
|
165
162
|
url: string;
|
|
166
163
|
} | {
|
|
167
164
|
type: "remote-v2";
|
|
168
165
|
url: string;
|
|
166
|
+
} | {
|
|
167
|
+
type: "local-dev";
|
|
168
|
+
path: string;
|
|
169
169
|
};
|
|
170
170
|
title?: string | undefined;
|
|
171
171
|
}, {
|
|
172
172
|
id: string;
|
|
173
173
|
spec: {
|
|
174
|
-
type: "local-dev";
|
|
175
|
-
path: string;
|
|
176
|
-
} | {
|
|
177
174
|
type: "remote-v1";
|
|
178
175
|
url: string;
|
|
179
176
|
} | {
|
|
180
177
|
type: "remote-v2";
|
|
181
178
|
url: string;
|
|
179
|
+
} | {
|
|
180
|
+
type: "local-dev";
|
|
181
|
+
path: string;
|
|
182
182
|
};
|
|
183
183
|
title?: string | undefined;
|
|
184
184
|
}>, "many">;
|
|
@@ -63,13 +63,13 @@ interface UniqueValuesRequestV2 {
|
|
|
63
63
|
* Spec-side operations (finding columns, listing columns, retrieving
|
|
64
64
|
* column specs, computing axis integrations) are not part of this
|
|
65
65
|
* surface — callers cache column specs themselves or route through
|
|
66
|
-
* WASM-spec. The data-side `
|
|
66
|
+
* WASM-spec. The data-side `createTable` accepts a pre-lowered
|
|
67
67
|
* `DataQuery`; `getUniqueValues` takes pre-resolved indices via
|
|
68
68
|
* {@link UniqueValuesRequestV2}.
|
|
69
69
|
*/
|
|
70
70
|
interface PFrameReadAPIV12 {
|
|
71
71
|
/** Creates table from a pre-lowered data query. */
|
|
72
|
-
|
|
72
|
+
createTable(tableId: PTableId, dataQuery: DataQuery): PTableV9;
|
|
73
73
|
/** Calculate set of unique values for a specific axis for the filtered set of records. */
|
|
74
74
|
getUniqueValues(request: UniqueValuesRequestV2, ops?: {
|
|
75
75
|
signal?: AbortSignal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_read.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_read.ts"],"mappings":";;;;;;;;;UAoBiB,gBAAA;EAAA;;;;;;;;EASf,WAAA,CAAY,OAAA,EAAS,kBAAA,GAAqB,OAAA,CAAQ,mBAAA;EAS1B;;;;EAHxB,YAAA,CAAa,OAAA,EAAS,8BAAA,GAAiC,OAAA,CAAQ,+BAAA;EAS1C;EANrB,aAAA,CAAc,QAAA,EAAU,SAAA,GAAY,OAAA,CAAQ,WAAA;EAMmB;EAH/D,WAAA,IAAe,OAAA,CAAQ,WAAA;EASR;EANf,WAAA,CAAY,OAAA,EAAS,QAAA,EAAU,OAAA,EAAS,oBAAA,GAAuB,QAAA;EAS5D;EANH,aAAA,CACE,OAAA,EAAS,QAAA,EACT,OAAA;IACE,SAAA,EAAW,gBAAA;IACX,SAAA,EAAW,SAAA;EAAA,IAEZ,QAAA;EAQO;EALV,eAAA,CACE,OAAA,EAAS,mBAAA,EACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,oBAAA;AAAA;;;;;;;UASI,qBAAA;EAhCf;EAAA,SAkCS,QAAA,EAAU,SAAA;EAlCL;;;;EAAA,SAwCL,SAAA;EArCc;EAAA,SAwCd,OAAA,EAAS,0BAAA;EArCG;EAAA,SAwCZ,KAAA;AAAA;;;;;;;;;;;UAaM,gBAAA;EAzCf;EA2CA,
|
|
1
|
+
{"version":3,"file":"api_read.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_read.ts"],"mappings":";;;;;;;;;UAoBiB,gBAAA;EAAA;;;;;;;;EASf,WAAA,CAAY,OAAA,EAAS,kBAAA,GAAqB,OAAA,CAAQ,mBAAA;EAS1B;;;;EAHxB,YAAA,CAAa,OAAA,EAAS,8BAAA,GAAiC,OAAA,CAAQ,+BAAA;EAS1C;EANrB,aAAA,CAAc,QAAA,EAAU,SAAA,GAAY,OAAA,CAAQ,WAAA;EAMmB;EAH/D,WAAA,IAAe,OAAA,CAAQ,WAAA;EASR;EANf,WAAA,CAAY,OAAA,EAAS,QAAA,EAAU,OAAA,EAAS,oBAAA,GAAuB,QAAA;EAS5D;EANH,aAAA,CACE,OAAA,EAAS,QAAA,EACT,OAAA;IACE,SAAA,EAAW,gBAAA;IACX,SAAA,EAAW,SAAA;EAAA,IAEZ,QAAA;EAQO;EALV,eAAA,CACE,OAAA,EAAS,mBAAA,EACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,oBAAA;AAAA;;;;;;;UASI,qBAAA;EAhCf;EAAA,SAkCS,QAAA,EAAU,SAAA;EAlCL;;;;EAAA,SAwCL,SAAA;EArCc;EAAA,SAwCd,OAAA,EAAS,0BAAA;EArCG;EAAA,SAwCZ,KAAA;AAAA;;;;;;;;;;;UAaM,gBAAA;EAzCf;EA2CA,WAAA,CAAY,OAAA,EAAS,QAAA,EAAU,SAAA,EAAW,SAAA,GAAY,QAAA;EA1CpD;EA6CF,eAAA,CACE,OAAA,EAAS,qBAAA,EACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,oBAAA;AAAA"}
|
|
@@ -1,9 +1,72 @@
|
|
|
1
1
|
import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
|
|
2
2
|
import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
|
|
3
3
|
import { DiscoverColumnsRequestV2, DiscoverColumnsResponse } from "./discover_columns.js";
|
|
4
|
-
import { AxesId, AxesSpec, BuildQueryInput, DataQuery, JoinEntry, PColumnInfo, PColumnSpec, PObjectId, PTableColumnId, PTableColumnSpec, PTableRecordFilter, PTableSorting, SingleAxisSelector, SpecQuery, SpecQueryJoinEntry } from "@milaboratories/pl-model-common";
|
|
4
|
+
import { AxesId, AxesSpec, BuildQueryInput, DataQuery, DataQueryBooleanExpression, JoinEntry, PColumnInfo, PColumnSpec, PObjectId, PTableColumnId, PTableColumnSpec, PTableRecordFilter, PTableSorting, SingleAxisSelector, SpecQuery, SpecQueryJoinEntry } from "@milaboratories/pl-model-common";
|
|
5
5
|
|
|
6
6
|
//#region src/pframe/internal_api/api_wasm.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* V4 PFrame API factory — pure spec-layer operations plus frame construction.
|
|
9
|
+
*
|
|
10
|
+
* Self-contained (does not extend {@link PFrameWasmAPIV3}, which is dropped
|
|
11
|
+
* once V4 is adopted). Same surface as V3 plus
|
|
12
|
+
* {@link PFrameWasmAPIV4.rewriteLegacyFilters}. The per-frame interface is
|
|
13
|
+
* unchanged, so {@link PFrameWasmAPIV4.createPFrame} still returns a
|
|
14
|
+
* {@link PFrameWasmV3}.
|
|
15
|
+
*/
|
|
16
|
+
interface PFrameWasmAPIV4 {
|
|
17
|
+
/**
|
|
18
|
+
* Creates a new PFrame from a map of column IDs to column specifications.
|
|
19
|
+
*/
|
|
20
|
+
createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV3;
|
|
21
|
+
/**
|
|
22
|
+
* Expands an {@link AxesSpec} into {@link AxesId}s with parent information
|
|
23
|
+
* resolved.
|
|
24
|
+
*/
|
|
25
|
+
expandAxes(spec: AxesSpec): AxesId;
|
|
26
|
+
/**
|
|
27
|
+
* Collapses {@link AxesId} into {@link AxesSpec}.
|
|
28
|
+
*/
|
|
29
|
+
collapseAxes(ids: AxesId): AxesSpec;
|
|
30
|
+
/**
|
|
31
|
+
* Finds the index of an axis matching the given selector.
|
|
32
|
+
* Returns -1 if no matching axis is found.
|
|
33
|
+
*/
|
|
34
|
+
findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
|
|
35
|
+
/**
|
|
36
|
+
* Finds the flat index of a table column matching the given
|
|
37
|
+
* selector within a table spec. Returns -1 if not found.
|
|
38
|
+
*/
|
|
39
|
+
findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
|
|
40
|
+
/**
|
|
41
|
+
* Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
|
|
42
|
+
* ordered path of wrapping steps (linker hops, filter joins).
|
|
43
|
+
*
|
|
44
|
+
* Right-fold over `path` starting from `Column(column)`: each `linker` step
|
|
45
|
+
* wraps the current subquery as `linkerJoin`, each `filter` step as
|
|
46
|
+
* `innerJoin` with the filter column. `qualifications` annotate the
|
|
47
|
+
* outermost entry only.
|
|
48
|
+
*
|
|
49
|
+
* Pure over its input — no frame needed. Column ids are resolved later at
|
|
50
|
+
* {@link PFrameWasmV3.evaluateQuery} against the registered specs. Throws
|
|
51
|
+
* only on malformed input: shape violations and unknown step tags (so v1
|
|
52
|
+
* callers are shielded from step variants added in later versions).
|
|
53
|
+
*/
|
|
54
|
+
buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
|
|
55
|
+
/**
|
|
56
|
+
* Upgrades selector-based legacy record filters into index-based data-layer
|
|
57
|
+
* boolean expressions, resolved against the provided unified table spec
|
|
58
|
+
* (axes first, then columns).
|
|
59
|
+
*
|
|
60
|
+
* Stateless (no frame needed): filtering does not change a table's spec, so
|
|
61
|
+
* the resulting predicates are valid both for the V2 unique-values request
|
|
62
|
+
* (over the source column's single-column table) and for composing a
|
|
63
|
+
* `filter` over a `table` query node of that table.
|
|
64
|
+
*/
|
|
65
|
+
rewriteLegacyFilters(request: {
|
|
66
|
+
tableSpec: PTableColumnSpec[];
|
|
67
|
+
filters: PTableRecordFilter[];
|
|
68
|
+
}): DataQueryBooleanExpression[];
|
|
69
|
+
}
|
|
7
70
|
/**
|
|
8
71
|
* V3 PFrame interface — per-frame instance operations.
|
|
9
72
|
*
|
|
@@ -44,6 +107,9 @@ interface PFrameWasmV3 extends Disposable {
|
|
|
44
107
|
/**
|
|
45
108
|
* V3 PFrame API factory — pure spec-layer operations plus frame construction.
|
|
46
109
|
* Everything here is stateless and does not require a frame instance.
|
|
110
|
+
*
|
|
111
|
+
* Superseded by {@link PFrameWasmAPIV4} (adds `rewriteLegacyFilters`); will be
|
|
112
|
+
* removed in a future PFrames update.
|
|
47
113
|
*/
|
|
48
114
|
interface PFrameWasmAPIV3 {
|
|
49
115
|
/**
|
|
@@ -144,5 +210,5 @@ type LegacyQuery = {
|
|
|
144
210
|
sorting?: PTableSorting[];
|
|
145
211
|
};
|
|
146
212
|
//#endregion
|
|
147
|
-
export { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmV2, PFrameWasmV3 };
|
|
213
|
+
export { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3 };
|
|
148
214
|
//# sourceMappingURL=api_wasm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_wasm.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_wasm.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"api_wasm.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_wasm.ts"],"mappings":";;;;;;;;AAkCA;;;;;;;UAAiB,eAAA;EAeG;;;EAXlB,YAAA,CAAa,IAAA,EAAM,MAAA,SAAe,WAAA,IAAe,YAAA;EAuBtB;;;;EAjB3B,UAAA,CAAW,IAAA,EAAM,QAAA,GAAW,MAAA;EA+CjB;;;EA1CX,YAAA,CAAa,GAAA,EAAK,MAAA,GAAS,QAAA;EAX3B;;;;EAiBA,QAAA,CAAS,IAAA,EAAM,QAAA,EAAU,QAAA,EAAU,kBAAA;EAXnC;;;;EAiBA,eAAA,CAAgB,SAAA,EAAW,gBAAA,IAAoB,QAAA,EAAU,cAAA;EAZvC;;;;;;;;;;;;;;EA4BlB,UAAA,CAAW,KAAA,EAAO,eAAA,GAAkB,kBAAA;EAAzB;;;;;;;;;;EAYX,oBAAA,CAAqB,OAAA;IACnB,SAAA,EAAW,gBAAA;IACX,OAAA,EAAS,kBAAA;EAAA,IACP,0BAAA;AAAA;;;;;;;;UAUW,YAAA,SAAqB,UAAA;EAiCR;;;EA7B5B,aAAA,CAAc,OAAA,EAAS,8BAAA,GAAiC,+BAAA;EAJV;;;EAS9C,WAAA,IAAe,WAAA;EALD;;;;;;;EAcd,eAAA,CAAgB,OAAA,EAAS,wBAAA,GAA2B,uBAAA;EAKpD;;;EAAA,WAAA,CAAY,OAAA,EAAS,kBAAA,GAAqB,mBAAA;EAK1C;;;EAAA,aAAA,CAAc,OAAA,EAAS,SAAA,GAAY,qBAAA;EAKnC;;;EAAA,kBAAA,CAAmB,OAAA,EAAS,WAAA,GAAc,SAAA;AAAA;;AAU5C;;;;;;UAAiB,eAAA;EAUa;;;EAN5B,YAAA,CAAa,IAAA,EAAM,MAAA,SAAe,WAAA,IAAe,YAAA;EAiBd;;;;EAXnC,UAAA,CAAW,IAAA,EAAM,QAAA,GAAW,MAAA;EAiC0B;;;EA5BtD,YAAA,CAAa,GAAA,EAAK,MAAA,GAAS,QAAA;EAXO;;;;EAiBlC,QAAA,CAAS,IAAA,EAAM,QAAA,EAAU,QAAA,EAAU,kBAAA;EAXxB;;;;EAiBX,eAAA,CAAgB,SAAA,EAAW,gBAAA,IAAoB,QAAA,EAAU,cAAA;EAZ9B;;;;;;;;;;;;;;EA4B3B,UAAA,CAAW,KAAA,EAAO,eAAA,GAAkB,kBAAA;AAAA;;AAOtC;;;UAAiB,YAAA,SAAqB,UAAA;EAEoB;EAAxD,aAAA,CAAc,OAAA,EAAS,8BAAA,GAAiC,+BAAA;EAGJ;EAApD,eAAA,CAAgB,OAAA,EAAS,wBAAA,GAA2B,uBAAA;EAGV;EAA1C,WAAA,CAAY,OAAA,EAAS,kBAAA,GAAqB,mBAAA;EAGP;EAAnC,aAAA,CAAc,OAAA,EAAS,SAAA,GAAY,qBAAA;EAGO;EAA1C,kBAAA,CAAmB,OAAA,EAAS,WAAA,GAAc,SAAA;AAAA;;;;;UAO3B,eAAA;EAnByC;EAqBxD,YAAA,CAAa,IAAA,EAAM,MAAA,SAAe,WAAA,IAAe,YAAA;EAlBxB;EAqBzB,UAAA,CAAW,IAAA,EAAM,QAAA,GAAW,MAAA;EArBwB;EAwBpD,YAAA,CAAa,GAAA,EAAK,MAAA,GAAS,QAAA;EArBN;EAwBrB,QAAA,CAAS,IAAA,EAAM,QAAA,EAAU,QAAA,EAAU,kBAAA;EAxBO;EA2B1C,eAAA,CAAgB,SAAA,EAAW,gBAAA,IAAoB,QAAA,EAAU,cAAA;AAAA;;;;KAM/C,qBAAA;EA3BS;;;;EAgCnB,SAAA,EAAW,gBAAA;EAzBmB;;;;EA8B9B,SAAA,EAAW,SAAA;AAAA;;;;;;;KASD,WAAA;EAzB6D,0EA2BvE,GAAA,EAAK,SAAA,CAAU,SAAA,GAvCf;EAyCA,OAAA,GAAU,kBAAA,IAzCwB;EA2ClC,OAAA,GAAU,aAAA;AAAA"}
|
|
@@ -7,13 +7,13 @@ import { PFrameReadAPIV11, PFrameReadAPIV12, UniqueValuesRequestV2 } from "./api
|
|
|
7
7
|
import { BaseObjectStore, FileRange, FsStoreOptions, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions } from "./http_helpers.js";
|
|
8
8
|
import { AddColumnEntry, DataInfo, DataInfoExtension, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV4, PFrameFactoryAPIV5, SpecExtension } from "./api_factory.js";
|
|
9
9
|
import { DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, MatcherMap, MultiAxisSelector, MultiColumnSelector, StringMatcher } from "./discover_columns.js";
|
|
10
|
-
import { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmV2, PFrameWasmV3 } from "./api_wasm.js";
|
|
10
|
+
import { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3 } from "./api_wasm.js";
|
|
11
11
|
import { PFrameFactoryV4, PFrameFactoryV5, PFrameOptionsV2, PFrameV13, PFrameV14 } from "./pframe.js";
|
|
12
12
|
import { SingleAxisSelector as SingleAxisSelector$1 } from "@milaboratories/pl-model-common";
|
|
13
13
|
|
|
14
14
|
//#region src/pframe/internal_api/index.d.ts
|
|
15
15
|
declare namespace index_d_exports {
|
|
16
|
-
export { AddColumnEntry, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, FilePath, FileRange, FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit, FsStoreOptions, FullJoinV4, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, LegacyQuery, Logger, MatcherMap, MultiAxisSelector, MultiColumnSelector, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, OuterJoinV4, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV4, PFrameFactoryAPIV5, PFrameFactoryV4, PFrameFactoryV5, PFrameId, PFrameOptionsV2, PFrameReadAPIV11, PFrameReadAPIV12, PFrameV13, PFrameV14, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmV2, PFrameWasmV3, PTableId, PTableV8, PTableV9, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2 };
|
|
16
|
+
export { AddColumnEntry, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse, DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, FilePath, FileRange, FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit, FsStoreOptions, FullJoinV4, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, LegacyQuery, Logger, MatcherMap, MultiAxisSelector, MultiColumnSelector, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, OuterJoinV4, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV4, PFrameFactoryAPIV5, PFrameFactoryV4, PFrameFactoryV5, PFrameId, PFrameOptionsV2, PFrameReadAPIV11, PFrameReadAPIV12, PFrameV13, PFrameV14, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3, PTableId, PTableV8, PTableV9, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2 };
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
export { index_d_exports };
|
|
@@ -56,7 +56,7 @@ interface PTableV8 extends Disposable {
|
|
|
56
56
|
dispose(): void;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* Table view returned by `
|
|
59
|
+
* Table view returned by `createTable`.
|
|
60
60
|
*
|
|
61
61
|
* PTable can be thought as having a composite primary key, consisting
|
|
62
62
|
* of axes, and a set of data columns derived from PColumn values.
|
package/package.json
CHANGED
|
@@ -91,13 +91,13 @@ export interface UniqueValuesRequestV2 {
|
|
|
91
91
|
* Spec-side operations (finding columns, listing columns, retrieving
|
|
92
92
|
* column specs, computing axis integrations) are not part of this
|
|
93
93
|
* surface — callers cache column specs themselves or route through
|
|
94
|
-
* WASM-spec. The data-side `
|
|
94
|
+
* WASM-spec. The data-side `createTable` accepts a pre-lowered
|
|
95
95
|
* `DataQuery`; `getUniqueValues` takes pre-resolved indices via
|
|
96
96
|
* {@link UniqueValuesRequestV2}.
|
|
97
97
|
*/
|
|
98
98
|
export interface PFrameReadAPIV12 {
|
|
99
99
|
/** Creates table from a pre-lowered data query. */
|
|
100
|
-
|
|
100
|
+
createTable(tableId: PTableId, dataQuery: DataQuery): PTableV9;
|
|
101
101
|
|
|
102
102
|
/** Calculate set of unique values for a specific axis for the filtered set of records. */
|
|
103
103
|
getUniqueValues(
|
|
@@ -11,6 +11,7 @@ import type {
|
|
|
11
11
|
PTableRecordFilter,
|
|
12
12
|
PTableSorting,
|
|
13
13
|
DataQuery,
|
|
14
|
+
DataQueryBooleanExpression,
|
|
14
15
|
SpecQuery,
|
|
15
16
|
SpecQueryJoinEntry,
|
|
16
17
|
SingleAxisSelector,
|
|
@@ -22,6 +23,76 @@ import type {
|
|
|
22
23
|
import type { DiscoverColumnsRequestV2, DiscoverColumnsResponse } from "./discover_columns";
|
|
23
24
|
import type { FindColumnsRequest, FindColumnsResponse } from "./find_columns";
|
|
24
25
|
|
|
26
|
+
/**
|
|
27
|
+
* V4 PFrame API factory — pure spec-layer operations plus frame construction.
|
|
28
|
+
*
|
|
29
|
+
* Self-contained (does not extend {@link PFrameWasmAPIV3}, which is dropped
|
|
30
|
+
* once V4 is adopted). Same surface as V3 plus
|
|
31
|
+
* {@link PFrameWasmAPIV4.rewriteLegacyFilters}. The per-frame interface is
|
|
32
|
+
* unchanged, so {@link PFrameWasmAPIV4.createPFrame} still returns a
|
|
33
|
+
* {@link PFrameWasmV3}.
|
|
34
|
+
*/
|
|
35
|
+
export interface PFrameWasmAPIV4 {
|
|
36
|
+
/**
|
|
37
|
+
* Creates a new PFrame from a map of column IDs to column specifications.
|
|
38
|
+
*/
|
|
39
|
+
createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV3;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Expands an {@link AxesSpec} into {@link AxesId}s with parent information
|
|
43
|
+
* resolved.
|
|
44
|
+
*/
|
|
45
|
+
expandAxes(spec: AxesSpec): AxesId;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Collapses {@link AxesId} into {@link AxesSpec}.
|
|
49
|
+
*/
|
|
50
|
+
collapseAxes(ids: AxesId): AxesSpec;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Finds the index of an axis matching the given selector.
|
|
54
|
+
* Returns -1 if no matching axis is found.
|
|
55
|
+
*/
|
|
56
|
+
findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Finds the flat index of a table column matching the given
|
|
60
|
+
* selector within a table spec. Returns -1 if not found.
|
|
61
|
+
*/
|
|
62
|
+
findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
|
|
66
|
+
* ordered path of wrapping steps (linker hops, filter joins).
|
|
67
|
+
*
|
|
68
|
+
* Right-fold over `path` starting from `Column(column)`: each `linker` step
|
|
69
|
+
* wraps the current subquery as `linkerJoin`, each `filter` step as
|
|
70
|
+
* `innerJoin` with the filter column. `qualifications` annotate the
|
|
71
|
+
* outermost entry only.
|
|
72
|
+
*
|
|
73
|
+
* Pure over its input — no frame needed. Column ids are resolved later at
|
|
74
|
+
* {@link PFrameWasmV3.evaluateQuery} against the registered specs. Throws
|
|
75
|
+
* only on malformed input: shape violations and unknown step tags (so v1
|
|
76
|
+
* callers are shielded from step variants added in later versions).
|
|
77
|
+
*/
|
|
78
|
+
buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Upgrades selector-based legacy record filters into index-based data-layer
|
|
82
|
+
* boolean expressions, resolved against the provided unified table spec
|
|
83
|
+
* (axes first, then columns).
|
|
84
|
+
*
|
|
85
|
+
* Stateless (no frame needed): filtering does not change a table's spec, so
|
|
86
|
+
* the resulting predicates are valid both for the V2 unique-values request
|
|
87
|
+
* (over the source column's single-column table) and for composing a
|
|
88
|
+
* `filter` over a `table` query node of that table.
|
|
89
|
+
*/
|
|
90
|
+
rewriteLegacyFilters(request: {
|
|
91
|
+
tableSpec: PTableColumnSpec[];
|
|
92
|
+
filters: PTableRecordFilter[];
|
|
93
|
+
}): DataQueryBooleanExpression[];
|
|
94
|
+
}
|
|
95
|
+
|
|
25
96
|
/**
|
|
26
97
|
* V3 PFrame interface — per-frame instance operations.
|
|
27
98
|
*
|
|
@@ -68,6 +139,9 @@ export interface PFrameWasmV3 extends Disposable {
|
|
|
68
139
|
/**
|
|
69
140
|
* V3 PFrame API factory — pure spec-layer operations plus frame construction.
|
|
70
141
|
* Everything here is stateless and does not require a frame instance.
|
|
142
|
+
*
|
|
143
|
+
* Superseded by {@link PFrameWasmAPIV4} (adds `rewriteLegacyFilters`); will be
|
|
144
|
+
* removed in a future PFrames update.
|
|
71
145
|
*/
|
|
72
146
|
export interface PFrameWasmAPIV3 {
|
|
73
147
|
/**
|
|
@@ -70,7 +70,7 @@ export interface PTableV8 extends Disposable {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* Table view returned by `
|
|
73
|
+
* Table view returned by `createTable`.
|
|
74
74
|
*
|
|
75
75
|
* PTable can be thought as having a composite primary key, consisting
|
|
76
76
|
* of axes, and a set of data columns derived from PColumn values.
|