@milaboratories/pl-model-middle-layer 1.30.0 → 1.30.2
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_factory.cjs.map +1 -1
- package/dist/pframe/internal_api/api_factory.d.ts +13 -44
- package/dist/pframe/internal_api/api_factory.d.ts.map +1 -1
- package/dist/pframe/internal_api/api_factory.js.map +1 -1
- package/dist/pframe/internal_api/api_read.d.ts +30 -2
- package/dist/pframe/internal_api/api_read.d.ts.map +1 -1
- package/dist/pframe/internal_api/api_wasm.d.ts +99 -3
- package/dist/pframe/internal_api/api_wasm.d.ts.map +1 -1
- package/dist/pframe/internal_api/index.d.ts +6 -6
- package/dist/pframe/internal_api/pframe.d.ts +5 -30
- package/dist/pframe/internal_api/pframe.d.ts.map +1 -1
- package/dist/pframe/internal_api/table.d.ts +77 -1
- package/dist/pframe/internal_api/table.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/pframe/internal_api/api_factory.ts +14 -57
- package/src/pframe/internal_api/api_read.ts +34 -1
- package/src/pframe/internal_api/api_wasm.ts +112 -2
- package/src/pframe/internal_api/pframe.ts +4 -32
- package/src/pframe/internal_api/table.ts +82 -0
|
@@ -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">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_factory.cjs","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n AxisValueType,\n BinaryPartitionedDataInfo,\n Branded,\n ColumnValueType,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Structural type information for a single PColumn needed by the data side:\n * the axis value types (in canonical order) and the column value type. Mirrors\n * the on-disk `typeSpec` shape (`{ axes, column }`).\n */\nexport type PColumnValueTypeSpec = {\n readonly axes: AxisValueType[];\n readonly column: ColumnValueType;\n};\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob>
|
|
1
|
+
{"version":3,"file":"api_factory.cjs","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n AxisValueType,\n BinaryPartitionedDataInfo,\n Branded,\n ColumnValueType,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Structural type information for a single PColumn needed by the data side:\n * the axis value types (in canonical order) and the column value type. Mirrors\n * the on-disk `typeSpec` shape (`{ axes, column }`).\n */\nexport type PColumnValueTypeSpec = {\n readonly axes: AxisValueType[];\n readonly column: ColumnValueType;\n};\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> = (\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>\n) & {\n /**\n * Self-contained structural type info. Present in data info produced by the\n * new converter, absent in data info produced by the old one.\n */\n readonly typeSpec?: PColumnValueTypeSpec;\n};\n\n/**\n * Self-contained data info: {@link DataInfo} with a required\n * {@link PColumnValueTypeSpec}, so the data layer can interpret the values\n * without a separate spec. This is the on-disk `.datainfo` shape and the\n * payload accepted by {@link PFrameFactoryAPIV6.addColumns}.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfoV2<Blob> = DataInfo<Blob> & {\n readonly typeSpec: PColumnValueTypeSpec;\n};\n\n/**\n * Single column entry for {@link PFrameFactoryAPIV6.addColumns}. The structural\n * type info is carried inside {@link DataInfoV2.typeSpec} rather than as a\n * separate field, so `data` is self-describing.\n */\nexport interface AddColumnEntryV2 {\n /** Unique column identifier within the PFrame. */\n readonly id: PObjectId;\n /** Self-contained data info (carries its own `typeSpec`). */\n readonly data: DataInfoV2<PFrameBlobId>;\n}\n\n/**\n * API for populating a PFrame with columns and a data source. Each column's\n * structural type info is embedded in its self-contained\n * {@link AddColumnEntryV2.data} instead of a separate field.\n */\nexport interface PFrameFactoryAPIV6 extends Disposable {\n /** Associates data source with this PFrame. */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /**\n * Registers all PColumns at once: data info (self-contained, carrying its own\n * `typeSpec`) is attached atomically. For parquet data info, schema resolution\n * via network is performed during this call.\n */\n addColumns(\n columns: AddColumnEntryV2[],\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n"],"mappings":";;AAcA,MAAa,gBAAgB;;AAG7B,MAAa,oBAAoB"}
|
|
@@ -42,39 +42,24 @@ type PColumnValueTypeSpec = {
|
|
|
42
42
|
*
|
|
43
43
|
* @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)
|
|
44
44
|
*/
|
|
45
|
-
type DataInfo<Blob> = JsonDataInfo | JsonPartitionedDataInfo<Blob> | BinaryPartitionedDataInfo<Blob> | ParquetPartitionedDataInfo<ParquetChunk<Blob
|
|
45
|
+
type DataInfo<Blob> = (JsonDataInfo | JsonPartitionedDataInfo<Blob> | BinaryPartitionedDataInfo<Blob> | ParquetPartitionedDataInfo<ParquetChunk<Blob>>) & {
|
|
46
|
+
/**
|
|
47
|
+
* Self-contained structural type info. Present in data info produced by the
|
|
48
|
+
* new converter, absent in data info produced by the old one.
|
|
49
|
+
*/
|
|
50
|
+
readonly typeSpec?: PColumnValueTypeSpec;
|
|
51
|
+
};
|
|
46
52
|
/**
|
|
47
|
-
* Self-contained data info:
|
|
53
|
+
* Self-contained data info: {@link DataInfo} with a required
|
|
48
54
|
* {@link PColumnValueTypeSpec}, so the data layer can interpret the values
|
|
49
55
|
* without a separate spec. This is the on-disk `.datainfo` shape and the
|
|
50
56
|
* payload accepted by {@link PFrameFactoryAPIV6.addColumns}.
|
|
51
57
|
*
|
|
52
|
-
* Declared independently of {@link DataInfo} (not as an intersection) so the
|
|
53
|
-
* legacy v1 type can be removed without affecting this one.
|
|
54
|
-
*
|
|
55
58
|
* @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)
|
|
56
59
|
*/
|
|
57
|
-
type DataInfoV2<Blob> =
|
|
60
|
+
type DataInfoV2<Blob> = DataInfo<Blob> & {
|
|
58
61
|
readonly typeSpec: PColumnValueTypeSpec;
|
|
59
62
|
};
|
|
60
|
-
/**
|
|
61
|
-
* Structural type information needed by the data side: axis value
|
|
62
|
-
* types and column value types, in their canonical order. Mirrors
|
|
63
|
-
* the bridge-side `TypeSpec`.
|
|
64
|
-
*/
|
|
65
|
-
interface ValueTypeSpec {
|
|
66
|
-
readonly axes: AxisValueType[];
|
|
67
|
-
readonly columns: ColumnValueType[];
|
|
68
|
-
}
|
|
69
|
-
/** Single column entry for {@link PFrameFactoryAPIV5.addColumns}. */
|
|
70
|
-
interface AddColumnEntry {
|
|
71
|
-
/** Unique column identifier within the PFrame. */
|
|
72
|
-
readonly id: PObjectId;
|
|
73
|
-
/** Structural type info (axes / column value types). */
|
|
74
|
-
readonly typeSpec: ValueTypeSpec;
|
|
75
|
-
/** Data info for the column. */
|
|
76
|
-
readonly data: DataInfo<PFrameBlobId>;
|
|
77
|
-
}
|
|
78
63
|
/**
|
|
79
64
|
* Single column entry for {@link PFrameFactoryAPIV6.addColumns}. The structural
|
|
80
65
|
* type info is carried inside {@link DataInfoV2.typeSpec} rather than as a
|
|
@@ -86,26 +71,10 @@ interface AddColumnEntryV2 {
|
|
|
86
71
|
/** Self-contained data info (carries its own `typeSpec`). */
|
|
87
72
|
readonly data: DataInfoV2<PFrameBlobId>;
|
|
88
73
|
}
|
|
89
|
-
/** API for populating a PFrame with columns and a data source. */
|
|
90
|
-
interface PFrameFactoryAPIV5 extends Disposable {
|
|
91
|
-
/** Associates data source with this PFrame. */
|
|
92
|
-
setDataSource(dataSource: PFrameDataSourceV2): void;
|
|
93
|
-
/**
|
|
94
|
-
* Registers all PColumns at once: specs are recorded and data info
|
|
95
|
-
* is attached atomically. For parquet data info, schema resolution
|
|
96
|
-
* via network is performed during this call.
|
|
97
|
-
*/
|
|
98
|
-
addColumns(columns: AddColumnEntry[], options?: {
|
|
99
|
-
signal?: AbortSignal;
|
|
100
|
-
}): Promise<void>;
|
|
101
|
-
/** Releases all the data previously added to PFrame using methods above,
|
|
102
|
-
* any interactions with disposed PFrame will result in exception */
|
|
103
|
-
dispose(): void;
|
|
104
|
-
}
|
|
105
74
|
/**
|
|
106
|
-
* API for populating a PFrame with columns and a data source.
|
|
107
|
-
*
|
|
108
|
-
*
|
|
75
|
+
* API for populating a PFrame with columns and a data source. Each column's
|
|
76
|
+
* structural type info is embedded in its self-contained
|
|
77
|
+
* {@link AddColumnEntryV2.data} instead of a separate field.
|
|
109
78
|
*/
|
|
110
79
|
interface PFrameFactoryAPIV6 extends Disposable {
|
|
111
80
|
/** Associates data source with this PFrame. */
|
|
@@ -123,5 +92,5 @@ interface PFrameFactoryAPIV6 extends Disposable {
|
|
|
123
92
|
dispose(): void;
|
|
124
93
|
}
|
|
125
94
|
//#endregion
|
|
126
|
-
export {
|
|
95
|
+
export { AddColumnEntryV2, DataInfo, DataInfoExtension, DataInfoV2, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV6, SpecExtension };
|
|
127
96
|
//# sourceMappingURL=api_factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_factory.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"mappings":";;;;;cAca,aAAA;AAAb;AAAA,cAGa,iBAAA;;KAGD,YAAA,GAAe,OAAA;;AAH3B;KAOY,QAAA;;UAGK,kBAAA;EAVoC;AAGrD;;;;EAaE,WAAA,CAAY,OAAA,EAAS,YAAA,KAAiB,OAAA;EAT5B;EAYV,kBAAA,CAAmB,MAAA,EAAQ,YAAA,GAAe,OAAA,CAAQ,UAAA;;;;AATpD;EAeE,aAAA,GAAgB,cAAA;AAAA;;;;;;KAQN,oBAAA;EAAA,SACD,IAAA,EAAM,aAAA;EAAA,SACN,MAAA,EAAQ,eAAA;AAAA;;;;;;;KASP,QAAA,
|
|
1
|
+
{"version":3,"file":"api_factory.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"mappings":";;;;;cAca,aAAA;AAAb;AAAA,cAGa,iBAAA;;KAGD,YAAA,GAAe,OAAA;;AAH3B;KAOY,QAAA;;UAGK,kBAAA;EAVoC;AAGrD;;;;EAaE,WAAA,CAAY,OAAA,EAAS,YAAA,KAAiB,OAAA;EAT5B;EAYV,kBAAA,CAAmB,MAAA,EAAQ,YAAA,GAAe,OAAA,CAAQ,UAAA;;;;AATpD;EAeE,aAAA,GAAgB,cAAA;AAAA;;;;;;KAQN,oBAAA;EAAA,SACD,IAAA,EAAM,aAAA;EAAA,SACN,MAAA,EAAQ,eAAA;AAAA;;;;;;;KASP,QAAA,UACR,YAAA,GACA,uBAAA,CAAwB,IAAA,IACxB,yBAAA,CAA0B,IAAA,IAC1B,0BAAA,CAA2B,YAAA,CAAa,IAAA;EA7BQ;;;;EAAA,SAmCzC,QAAA,GAAW,oBAAA;AAAA;;;;;;;;;KAWV,UAAA,SAAmB,QAAA,CAAS,IAAA;EAAA,SAC7B,QAAA,EAAU,oBAAA;AAAA;;;;;;UAQJ,gBAAA;EA1B2B;EAAA,SA4BjC,EAAA,EAAI,SAAA;EA5BX;EAAA,SA8BO,IAAA,EAAM,UAAA,CAAW,YAAA;AAAA;;;;;;UAQX,kBAAA,SAA2B,UAAA;EAvCd;EAyC5B,aAAA,CAAc,UAAA,EAAY,kBAAA;EAxCG;;;;;EA+C7B,UAAA,CACE,OAAA,EAAS,gBAAA,IACT,OAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA;EAnCiB;;EAuCpB,OAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_factory.js","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n AxisValueType,\n BinaryPartitionedDataInfo,\n Branded,\n ColumnValueType,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Structural type information for a single PColumn needed by the data side:\n * the axis value types (in canonical order) and the column value type. Mirrors\n * the on-disk `typeSpec` shape (`{ axes, column }`).\n */\nexport type PColumnValueTypeSpec = {\n readonly axes: AxisValueType[];\n readonly column: ColumnValueType;\n};\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob>
|
|
1
|
+
{"version":3,"file":"api_factory.js","names":[],"sources":["../../../src/pframe/internal_api/api_factory.ts"],"sourcesContent":["import type {\n AxisValueType,\n BinaryPartitionedDataInfo,\n Branded,\n ColumnValueType,\n JsonDataInfo,\n JsonPartitionedDataInfo,\n ParquetChunk,\n ParquetPartitionedDataInfo,\n PObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type { HttpServerInfo } from \"./http_helpers\";\n\n/** PColumn spec file extension */\nexport const SpecExtension = \".spec\" as const;\n\n/** PColumn data info file extension */\nexport const DataInfoExtension = \".datainfo\" as const;\n\n/** Abstract identifier of a data blob that can be requested from the storage backend */\nexport type PFrameBlobId = Branded<string, \"PFrameInternal.PFrameBlobId\">;\n\n/** Path of the file containing requested data (blob). This path is returned by\n * {@link BlobPathResolver} as soon as blob materialized in the file system. */\nexport type FilePath = string;\n\n/** Data source allows PFrame to retrieve the data blobs for columns with assigned data info. */\nexport interface PFrameDataSourceV2 {\n /**\n * PFrame may notify storage backend about its plans to use particular blobs in the future.\n * Storage backend will do its best to preload specified blob so the subsequent\n * {@link resolveBlob} will quickly return preloaded file path.\n */\n preloadBlob(blobIds: PFrameBlobId[]): Promise<void>;\n\n /** Returns raw blob data given the blob id from {@link DataInfo}. */\n resolveBlobContent(blobId: PFrameBlobId): Promise<Uint8Array>;\n\n /**\n * Parquet HTTP(S) server connection settings, {@link HttpHelpers.createHttpServer}\n * When not provided, parquet BlobIds would be treated as local file paths.\n */\n parquetServer?: HttpServerInfo;\n}\n\n/**\n * Structural type information for a single PColumn needed by the data side:\n * the axis value types (in canonical order) and the column value type. Mirrors\n * the on-disk `typeSpec` shape (`{ axes, column }`).\n */\nexport type PColumnValueTypeSpec = {\n readonly axes: AxisValueType[];\n readonly column: ColumnValueType;\n};\n\n/**\n * Union type representing all possible data storage formats for PColumn data.\n * The specific format used depends on data size, access patterns, and performance requirements.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfo<Blob> = (\n | JsonDataInfo\n | JsonPartitionedDataInfo<Blob>\n | BinaryPartitionedDataInfo<Blob>\n | ParquetPartitionedDataInfo<ParquetChunk<Blob>>\n) & {\n /**\n * Self-contained structural type info. Present in data info produced by the\n * new converter, absent in data info produced by the old one.\n */\n readonly typeSpec?: PColumnValueTypeSpec;\n};\n\n/**\n * Self-contained data info: {@link DataInfo} with a required\n * {@link PColumnValueTypeSpec}, so the data layer can interpret the values\n * without a separate spec. This is the on-disk `.datainfo` shape and the\n * payload accepted by {@link PFrameFactoryAPIV6.addColumns}.\n *\n * @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)\n */\nexport type DataInfoV2<Blob> = DataInfo<Blob> & {\n readonly typeSpec: PColumnValueTypeSpec;\n};\n\n/**\n * Single column entry for {@link PFrameFactoryAPIV6.addColumns}. The structural\n * type info is carried inside {@link DataInfoV2.typeSpec} rather than as a\n * separate field, so `data` is self-describing.\n */\nexport interface AddColumnEntryV2 {\n /** Unique column identifier within the PFrame. */\n readonly id: PObjectId;\n /** Self-contained data info (carries its own `typeSpec`). */\n readonly data: DataInfoV2<PFrameBlobId>;\n}\n\n/**\n * API for populating a PFrame with columns and a data source. Each column's\n * structural type info is embedded in its self-contained\n * {@link AddColumnEntryV2.data} instead of a separate field.\n */\nexport interface PFrameFactoryAPIV6 extends Disposable {\n /** Associates data source with this PFrame. */\n setDataSource(dataSource: PFrameDataSourceV2): void;\n\n /**\n * Registers all PColumns at once: data info (self-contained, carrying its own\n * `typeSpec`) is attached atomically. For parquet data info, schema resolution\n * via network is performed during this call.\n */\n addColumns(\n columns: AddColumnEntryV2[],\n options?: {\n signal?: AbortSignal;\n },\n ): Promise<void>;\n\n /** Releases all the data previously added to PFrame using methods above,\n * any interactions with disposed PFrame will result in exception */\n dispose(): void;\n}\n"],"mappings":";;AAcA,MAAa,gBAAgB;;AAG7B,MAAa,oBAAoB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PTableV11 } from "./table.js";
|
|
1
|
+
import { PTableV11, PTableV12 } from "./table.js";
|
|
2
2
|
import { PTableId } from "./common.js";
|
|
3
3
|
import { DataQuery, DataQueryBooleanExpression, PObjectId, UniqueValuesResponse } from "@milaboratories/pl-model-common";
|
|
4
4
|
|
|
@@ -22,6 +22,34 @@ interface UniqueValuesRequestV2 {
|
|
|
22
22
|
/** Max number of values to return. Overflow is reported in the response. */
|
|
23
23
|
readonly limit: number;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Read interface exposed by PFrames library. Returns the {@link PTableV12}
|
|
27
|
+
* table view, whose `export` takes an `ops.headers` list of
|
|
28
|
+
* `[column index, header name]` pairs.
|
|
29
|
+
*
|
|
30
|
+
* Self-contained: does not extend any earlier read interface. Once this
|
|
31
|
+
* version is adopted, every earlier `PFrameReadAPIV*` and per-table
|
|
32
|
+
* `PTableV*` interface is dropped, so this declaration repeats the full
|
|
33
|
+
* method surface rather than referencing the predecessors.
|
|
34
|
+
*
|
|
35
|
+
* Same surface as {@link PFrameReadAPIV14}; the only change is that
|
|
36
|
+
* {@link PFrameReadAPIV15.createTable} returns {@link PTableV12}.
|
|
37
|
+
*
|
|
38
|
+
* Spec-side operations (finding columns, listing columns, retrieving
|
|
39
|
+
* column specs, computing axis integrations) are not part of this
|
|
40
|
+
* surface — callers cache column specs themselves or route through
|
|
41
|
+
* WASM-spec. The data-side `createTable` accepts a pre-lowered
|
|
42
|
+
* `DataQuery`; `getUniqueValues` takes pre-resolved indices via
|
|
43
|
+
* {@link UniqueValuesRequestV2}.
|
|
44
|
+
*/
|
|
45
|
+
interface PFrameReadAPIV15 {
|
|
46
|
+
/** Creates table from a pre-lowered data query. */
|
|
47
|
+
createTable(tableId: PTableId, dataQuery: DataQuery): PTableV12;
|
|
48
|
+
/** Calculate set of unique values for a specific axis for the filtered set of records. */
|
|
49
|
+
getUniqueValues(request: UniqueValuesRequestV2, ops?: {
|
|
50
|
+
signal?: AbortSignal;
|
|
51
|
+
}): Promise<UniqueValuesResponse>;
|
|
52
|
+
}
|
|
25
53
|
/**
|
|
26
54
|
* Read interface exposed by PFrames library. Returns the {@link PTableV11}
|
|
27
55
|
* table view, whose `export` takes a column-index → header map.
|
|
@@ -42,5 +70,5 @@ interface PFrameReadAPIV14 {
|
|
|
42
70
|
}): Promise<UniqueValuesResponse>;
|
|
43
71
|
}
|
|
44
72
|
//#endregion
|
|
45
|
-
export { PFrameReadAPIV14, UniqueValuesRequestV2 };
|
|
73
|
+
export { PFrameReadAPIV14, PFrameReadAPIV15, UniqueValuesRequestV2 };
|
|
46
74
|
//# sourceMappingURL=api_read.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_read.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_read.ts"],"mappings":";;;;;;;AAeA;;;;UAAiB,qBAAA;EAEI;EAAA,SAAV,QAAA,EAAU,SAAA;EASV;;;;EAAA,SAHA,SAAA;
|
|
1
|
+
{"version":3,"file":"api_read.d.ts","names":[],"sources":["../../../src/pframe/internal_api/api_read.ts"],"mappings":";;;;;;;AAeA;;;;UAAiB,qBAAA;EAEI;EAAA,SAAV,QAAA,EAAU,SAAA;EASV;;;;EAAA,SAHA,SAAA;EA6BM;EAAA,SA1BN,OAAA,EAAS,0BAAA;;WAGT,KAAA;AAAA;;;;;;;;;;;;;;;;;;;;;UAuBM,gBAAA;EAUgB;EAR/B,WAAA,CAAY,OAAA,EAAS,QAAA,EAAU,SAAA,EAAW,SAAA,GAAY,SAAA;EAsBvC;EAnBf,eAAA,CACE,OAAA,EAAS,qBAAA,EACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,oBAAA;AAAA;;;;;;;;;;;;UAcI,gBAAA;EAEuC;EAAtD,WAAA,CAAY,OAAA,EAAS,QAAA,EAAU,SAAA,EAAW,SAAA,GAAY,SAAA;EAI3C;EADX,eAAA,CACE,OAAA,EAAS,qBAAA,EACT,GAAA;IACE,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,oBAAA;AAAA"}
|
|
@@ -1,9 +1,105 @@
|
|
|
1
1
|
import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
|
|
2
2
|
import { DiscoverColumnsRequestV2, DiscoverColumnsResponse } from "./discover_columns.js";
|
|
3
3
|
import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
|
|
4
|
-
import { AxesId, AxesSpec, BuildQueryInput, DataQuery, DataQueryBooleanExpression, JoinEntry,
|
|
4
|
+
import { AxesId, AxesSpec, BuildQueryInput, DataQuery, DataQueryBooleanExpression, JoinEntry, PColumnIdAndSpec, 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
|
+
* V5 PFrame API factory — pure spec-layer operations plus frame construction.
|
|
9
|
+
*
|
|
10
|
+
* Self-contained: does not extend any earlier factory interface. Once this
|
|
11
|
+
* version is adopted, every earlier `PFrameWasmAPIV*` and per-frame
|
|
12
|
+
* `PFrameWasmV*` interface is dropped, so this declaration repeats the full
|
|
13
|
+
* method surface rather than referencing the predecessors.
|
|
14
|
+
*/
|
|
15
|
+
interface PFrameWasmAPIV5 {
|
|
16
|
+
/**
|
|
17
|
+
* Creates a new PFrame from a map of column IDs to column specifications.
|
|
18
|
+
*/
|
|
19
|
+
createPFrame(spec: Record<string, PColumnSpec>): PFrameWasmV4;
|
|
20
|
+
/**
|
|
21
|
+
* Expands an {@link AxesSpec} into {@link AxesId}s with parent information
|
|
22
|
+
* resolved.
|
|
23
|
+
*/
|
|
24
|
+
expandAxes(spec: AxesSpec): AxesId;
|
|
25
|
+
/**
|
|
26
|
+
* Collapses {@link AxesId} into {@link AxesSpec}.
|
|
27
|
+
*/
|
|
28
|
+
collapseAxes(ids: AxesId): AxesSpec;
|
|
29
|
+
/**
|
|
30
|
+
* Finds the index of an axis matching the given selector.
|
|
31
|
+
* Returns -1 if no matching axis is found.
|
|
32
|
+
*/
|
|
33
|
+
findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
|
|
34
|
+
/**
|
|
35
|
+
* Finds the flat index of a table column matching the given
|
|
36
|
+
* selector within a table spec. Returns -1 if not found.
|
|
37
|
+
*/
|
|
38
|
+
findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
|
|
39
|
+
/**
|
|
40
|
+
* Assembles a {@link SpecQueryJoinEntry} from a terminal column plus an
|
|
41
|
+
* ordered path of wrapping steps (linker hops, filter joins).
|
|
42
|
+
*
|
|
43
|
+
* Right-fold over `path` starting from `Column(column)`: each `linker` step
|
|
44
|
+
* wraps the current subquery as `linkerJoin`, each `filter` step as
|
|
45
|
+
* `innerJoin` with the filter column. `qualifications` annotate the
|
|
46
|
+
* outermost entry only.
|
|
47
|
+
*/
|
|
48
|
+
buildQuery(input: BuildQueryInput): SpecQueryJoinEntry;
|
|
49
|
+
/**
|
|
50
|
+
* Upgrades selector-based legacy record filters into index-based data-layer
|
|
51
|
+
* boolean expressions, resolved against the provided unified table spec
|
|
52
|
+
* (axes first, then columns).
|
|
53
|
+
*/
|
|
54
|
+
rewriteLegacyFilters(request: {
|
|
55
|
+
tableSpec: PTableColumnSpec[];
|
|
56
|
+
filters: PTableRecordFilter[];
|
|
57
|
+
}): DataQueryBooleanExpression[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* V4 PFrame interface — per-frame instance operations.
|
|
61
|
+
*
|
|
62
|
+
* Self-contained: does not extend any earlier per-frame interface. Once this
|
|
63
|
+
* version is adopted, every earlier `PFrameWasmV*` interface is dropped, so
|
|
64
|
+
* this declaration repeats the full method surface rather than referencing
|
|
65
|
+
* the predecessors.
|
|
66
|
+
*/
|
|
67
|
+
interface PFrameWasmV4 extends Disposable {
|
|
68
|
+
/**
|
|
69
|
+
* Deletes columns from a columns specification.
|
|
70
|
+
*/
|
|
71
|
+
deleteColumns(request: DeleteColumnFromColumnsRequest): DeleteColumnFromColumnsResponse;
|
|
72
|
+
/**
|
|
73
|
+
* Returns the id and spec of the single column registered under `columnId`
|
|
74
|
+
* in this PFrame, or `null` if no such column is registered. Same shape as
|
|
75
|
+
* the entries of {@link PFrameWasmV4.listColumns}.
|
|
76
|
+
*/
|
|
77
|
+
getColumn(columnId: PObjectId): PColumnIdAndSpec | null;
|
|
78
|
+
/**
|
|
79
|
+
* Lists all columns currently registered in this PFrame, with their ids and specs.
|
|
80
|
+
*/
|
|
81
|
+
listColumns(): PColumnIdAndSpec[];
|
|
82
|
+
/**
|
|
83
|
+
* Discovers columns compatible with a given axes integration. Include and
|
|
84
|
+
* exclude filters are applied in order (exclude removes matches from the
|
|
85
|
+
* include set). Each hit carries its traversal `path`; feed the hit's
|
|
86
|
+
* column id and `path` into {@link PFrameWasmAPIV5.buildQuery} to
|
|
87
|
+
* materialize it as a {@link SpecQueryJoinEntry}.
|
|
88
|
+
*/
|
|
89
|
+
discoverColumns(request: DiscoverColumnsRequestV2): DiscoverColumnsResponse;
|
|
90
|
+
/**
|
|
91
|
+
* Finds columns in the PFrame matching the given filter criteria.
|
|
92
|
+
*/
|
|
93
|
+
findColumns(request: FindColumnsRequest): FindColumnsResponse;
|
|
94
|
+
/**
|
|
95
|
+
* Evaluates a query specification against this PFrame.
|
|
96
|
+
*/
|
|
97
|
+
evaluateQuery(request: SpecQuery): EvaluateQueryResponse;
|
|
98
|
+
/**
|
|
99
|
+
* Rewrites a legacy query format (V4) to the current SpecQuery format.
|
|
100
|
+
*/
|
|
101
|
+
rewriteLegacyQuery(request: LegacyQuery): SpecQuery;
|
|
102
|
+
}
|
|
7
103
|
/**
|
|
8
104
|
* V4 PFrame API factory — pure spec-layer operations plus frame construction.
|
|
9
105
|
*
|
|
@@ -82,7 +178,7 @@ interface PFrameWasmV3 extends Disposable {
|
|
|
82
178
|
/**
|
|
83
179
|
* Lists all columns currently registered in this PFrame, with their ids and specs.
|
|
84
180
|
*/
|
|
85
|
-
listColumns():
|
|
181
|
+
listColumns(): PColumnIdAndSpec[];
|
|
86
182
|
/**
|
|
87
183
|
* Discovers columns compatible with a given axes integration. Include and
|
|
88
184
|
* exclude filters are applied in order (exclude removes matches from the
|
|
@@ -210,5 +306,5 @@ type LegacyQuery = {
|
|
|
210
306
|
sorting?: PTableSorting[];
|
|
211
307
|
};
|
|
212
308
|
//#endregion
|
|
213
|
-
export { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3 };
|
|
309
|
+
export { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmAPIV5, PFrameWasmV2, PFrameWasmV3, PFrameWasmV4 };
|
|
214
310
|
//# 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":";;;;;;;;AAiCA;;;;;;UAAiB,eAAA;EAUa;;;EAN5B,YAAA,CAAa,IAAA,EAAM,MAAA,SAAe,WAAA,IAAe,YAAA;EAiBd;;;;EAXnC,UAAA,CAAW,IAAA,EAAM,QAAA,GAAW,MAAA;EAoCf;;;EA/Bb,YAAA,CAAa,GAAA,EAAK,MAAA,GAAS,QAAA;EAiCG;;;;EA3B9B,QAAA,CAAS,IAAA,EAAM,QAAA,EAAU,QAAA,EAAU,kBAAA;EAjBc;;;;EAuBjD,eAAA,CAAgB,SAAA,EAAW,gBAAA,IAAoB,QAAA,EAAU,cAAA;EAZzD;;;;;;;;;EAuBA,UAAA,CAAW,KAAA,EAAO,eAAA,GAAkB,kBAAA;EAXT;;;;;EAkB3B,oBAAA,CAAqB,OAAA;IACnB,SAAA,EAAW,gBAAA;IACX,OAAA,EAAS,kBAAA;EAAA,IACP,0BAAA;AAAA;;;;;;;;AAWN;UAAiB,YAAA,SAAqB,UAAA;;;;EAIpC,aAAA,CAAc,OAAA,EAAS,8BAAA,GAAiC,+BAAA;EAOxB;;;;;EAAhC,SAAA,CAAU,QAAA,EAAU,SAAA,GAAY,gBAAA;EAwBT;;;EAnBvB,WAAA,IAAe,gBAAA;EAhBqB;;;;;;;EAyBpC,eAAA,CAAgB,OAAA,EAAS,wBAAA,GAA2B,uBAAA;EAdpD;;;EAmBA,WAAA,CAAY,OAAA,EAAS,kBAAA,GAAqB,mBAAA;EAd1C;;;EAmBA,aAAA,CAAc,OAAA,EAAS,SAAA,GAAY,qBAAA;EAVnB;;;EAehB,kBAAA,CAAmB,OAAA,EAAS,WAAA,GAAc,SAAA;AA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WithQualifications, ConstantAxisFilter, Logger, PFrameId, PTableId } from "./common.js";
|
|
3
|
-
import { PFrameReadAPIV14, UniqueValuesRequestV2 } from "./api_read.js";
|
|
3
|
+
import { PFrameReadAPIV14, PFrameReadAPIV15, UniqueValuesRequestV2 } from "./api_read.js";
|
|
4
4
|
import { BaseObjectStore, FileRange, FsStoreOptions, HttpAuthorizationToken, HttpHelpers, HttpMethod, HttpRange, HttpServer, HttpServerInfo, HttpServerOptions, ObjectStore, ObjectStoreOptions, ObjectStoreResponse, ObjectStoreUrl, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions } from "./http_helpers.js";
|
|
5
|
-
import {
|
|
5
|
+
import { AddColumnEntryV2, DataInfo, DataInfoExtension, DataInfoV2, FilePath, PColumnValueTypeSpec, PFrameBlobId, PFrameDataSourceV2, PFrameFactoryAPIV6, SpecExtension } from "./api_factory.js";
|
|
6
6
|
import { DeleteColumnFromColumnsRequest, DeleteColumnFromColumnsResponse } from "./delete_column.js";
|
|
7
7
|
import { DiscoverColumnsConstraints, DiscoverColumnsMappingVariant, DiscoverColumnsRequestV2, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, MatcherMap, MultiAxisSelector, MultiColumnSelector, StringMatcher } from "./discover_columns.js";
|
|
8
8
|
import { FindColumnResponseQualifications, FindColumnsMappingVariant, FindColumnsRequest, FindColumnsResponse, FindColumnsResponseHit } from "./find_columns.js";
|
|
9
|
-
import { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmV2, PFrameWasmV3 } from "./api_wasm.js";
|
|
9
|
+
import { EvaluateQueryResponse, LegacyQuery, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmAPIV5, PFrameWasmV2, PFrameWasmV3, PFrameWasmV4 } from "./api_wasm.js";
|
|
10
10
|
import { ArtificialColumnJoinEntry, ColumnJoinEntry, CreateTableRequestV4, FullJoinV4, InlineColumnJoinEntry, InnerJoinV4, JoinEntryV4, OuterJoinV4, SlicedColumnJoinEntry } from "./create_table.js";
|
|
11
|
-
import {
|
|
11
|
+
import { PFrameFactoryV8, PFrameOptionsV2, PFrameV17 } 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 {
|
|
16
|
+
export { AddColumnEntryV2, ArtificialColumnJoinEntry, AxisQualification, BaseObjectStore, ColumnAxesWithQualifications, ColumnJoinEntry, ConstantAxisFilter, CreateTableRequestV4, DataInfo, DataInfoExtension, DataInfoV2, 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, PFrameFactoryAPIV6, PFrameFactoryV8, PFrameId, PFrameOptionsV2, PFrameReadAPIV14, PFrameReadAPIV15, PFrameV17, PFrameWasmAPIV2, PFrameWasmAPIV3, PFrameWasmAPIV4, PFrameWasmAPIV5, PFrameWasmV2, PFrameWasmV3, PFrameWasmV4, PTableId, PTableV11, PTableV12, ParquetExtension, ParquetFileName, PemCertificate, RequestHandlerOptions, SingleAxisSelector$1 as SingleAxisSelector, SlicedColumnJoinEntry, SpecExtension, StringMatcher, UniqueValuesRequestV2 };
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
export { index_d_exports };
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { Logger, PFrameId } from "./common.js";
|
|
2
2
|
import { PFrameReadAPIV14 } from "./api_read.js";
|
|
3
|
-
import {
|
|
3
|
+
import { PFrameFactoryAPIV6 } from "./api_factory.js";
|
|
4
4
|
|
|
5
5
|
//#region src/pframe/internal_api/pframe.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Full PFrame surface — factory operations plus data-side reads. Exposes
|
|
8
|
-
* {@link
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
interface PFrameV16 extends PFrameFactoryAPIV5, PFrameReadAPIV14 {}
|
|
12
|
-
/**
|
|
13
|
-
* Full PFrame surface — factory operations plus data-side reads. Like
|
|
14
|
-
* {@link PFrameV16} but with self-contained {@link PFrameFactoryAPIV6}
|
|
15
|
-
* (column `typeSpec` embedded in `data`).
|
|
8
|
+
* the self-contained {@link PFrameFactoryAPIV6} (column `typeSpec` embedded in
|
|
9
|
+
* `data`) plus {@link PFrameReadAPIV14}, whose tables' `export` takes a
|
|
10
|
+
* column-index → header map.
|
|
16
11
|
*/
|
|
17
12
|
interface PFrameV17 extends PFrameFactoryAPIV6, PFrameReadAPIV14 {}
|
|
18
13
|
type PFrameOptionsV2 = {
|
|
@@ -20,26 +15,6 @@ type PFrameOptionsV2 = {
|
|
|
20
15
|
spillPath: string; /** Logger instance, no logging is performed when not provided */
|
|
21
16
|
logger?: Logger;
|
|
22
17
|
};
|
|
23
|
-
/**
|
|
24
|
-
* PFrame management functions exposed by the PFrame module. Creates
|
|
25
|
-
* {@link PFrameV16} instances, whose tables' `export` takes a
|
|
26
|
-
* column-index → header map.
|
|
27
|
-
*/
|
|
28
|
-
interface PFrameFactoryV7 {
|
|
29
|
-
/**
|
|
30
|
-
* Create a new PFrame instance.
|
|
31
|
-
* @warning Use concurrency limiting to avoid OOM crashes when multiple instances are simultaneously in use.
|
|
32
|
-
*/
|
|
33
|
-
createPFrame(options: PFrameOptionsV2): PFrameV16;
|
|
34
|
-
/**
|
|
35
|
-
* Dump active allocations from all PFrames instances in pprof format.
|
|
36
|
-
* The result of this function should be saved as `profile.pb.gz`.
|
|
37
|
-
* Use {@link https://pprof.me/} or {@link https://www.speedscope.app/}
|
|
38
|
-
* to view the allocation flamechart.
|
|
39
|
-
* @warning This method will always reject on Windows!
|
|
40
|
-
*/
|
|
41
|
-
pprofDump: () => Promise<Uint8Array>;
|
|
42
|
-
}
|
|
43
18
|
/**
|
|
44
19
|
* PFrame management functions exposed by the PFrame module. Creates
|
|
45
20
|
* {@link PFrameV17} instances (self-contained column data info).
|
|
@@ -60,5 +35,5 @@ interface PFrameFactoryV8 {
|
|
|
60
35
|
pprofDump: () => Promise<Uint8Array>;
|
|
61
36
|
}
|
|
62
37
|
//#endregion
|
|
63
|
-
export {
|
|
38
|
+
export { PFrameFactoryV8, PFrameOptionsV2, PFrameV17 };
|
|
64
39
|
//# sourceMappingURL=pframe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pframe.d.ts","names":[],"sources":["../../../src/pframe/internal_api/pframe.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"pframe.d.ts","names":[],"sources":["../../../src/pframe/internal_api/pframe.ts"],"mappings":";;;;;;AAWA;;;;;UAAiB,SAAA,SAAkB,kBAAA,EAAoB,gBAAA;AAAA,KAE3C,eAAA;EAMK,qCAJf,OAAA,EAAS,QAAA,EAAA;EAET,SAAA,UAEA;EAAA,MAAA,GAAS,MAAA;AAAA;;AAOX;;;UAAiB,eAAA;EAKyB;;;;EAAxC,YAAA,CAAa,OAAA,EAAS,eAAA,GAAkB,SAAA;EAAxC;;;;;;;EASA,SAAA,QAAiB,OAAA,CAAQ,UAAA;AAAA"}
|
|
@@ -69,6 +69,82 @@ interface PTableV11 extends Disposable {
|
|
|
69
69
|
/** Deallocates all underlying resources */
|
|
70
70
|
dispose(): void;
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Table view returned by `createTable`.
|
|
74
|
+
*
|
|
75
|
+
* Self-contained: does not extend any earlier per-table interface. Once this
|
|
76
|
+
* version is adopted, every earlier `PTableV*` interface is dropped, so this
|
|
77
|
+
* declaration repeats the full method surface rather than referencing the
|
|
78
|
+
* predecessors.
|
|
79
|
+
*
|
|
80
|
+
* Same surface as {@link PTableV11} except {@link PTableV12.export} moves
|
|
81
|
+
* `headers` into `ops` and passes them as an ordered list of
|
|
82
|
+
* `[unified column index, header name]` pairs instead of a
|
|
83
|
+
* `Record<number, string>` map.
|
|
84
|
+
*
|
|
85
|
+
* PTable can be thought as having a composite primary key, consisting
|
|
86
|
+
* of axes, and a set of data columns derived from PColumn values.
|
|
87
|
+
* The table's column spec is owned by the caller — selector → index
|
|
88
|
+
* resolution runs on the caller side via WASM-spec.
|
|
89
|
+
*/
|
|
90
|
+
interface PTableV12 extends Disposable {
|
|
91
|
+
/**
|
|
92
|
+
* Get PTable disk footprint in bytes.
|
|
93
|
+
*
|
|
94
|
+
* @param ops.withPredecessors When true, the footprint includes
|
|
95
|
+
* every registered predecessor table reachable through the
|
|
96
|
+
* query lineage. When false or omitted, only this table's own
|
|
97
|
+
* materialised data is counted.
|
|
98
|
+
*
|
|
99
|
+
* Warning: This call materializes the join.
|
|
100
|
+
*/
|
|
101
|
+
getFootprint(ops?: {
|
|
102
|
+
withPredecessors?: boolean;
|
|
103
|
+
signal?: AbortSignal;
|
|
104
|
+
}): Promise<number>;
|
|
105
|
+
/**
|
|
106
|
+
* Unified table shape
|
|
107
|
+
* Warning: This call materializes the join.
|
|
108
|
+
*/
|
|
109
|
+
getShape(ops?: {
|
|
110
|
+
signal?: AbortSignal;
|
|
111
|
+
}): Promise<PTableShape>;
|
|
112
|
+
/**
|
|
113
|
+
* Retrieve the data from the table. To retrieve only data required, it can be
|
|
114
|
+
* sliced both horizontally ({@link columnIndices}) and vertically
|
|
115
|
+
* ({@link range}).
|
|
116
|
+
* This call materializes the join.
|
|
117
|
+
*
|
|
118
|
+
* @param columnIndices unified indices of columns to be retrieved
|
|
119
|
+
* @param range optionally limit the range of records to retrieve
|
|
120
|
+
* */
|
|
121
|
+
getData(columnIndices: number[], ops?: {
|
|
122
|
+
range?: TableRange;
|
|
123
|
+
signal?: AbortSignal;
|
|
124
|
+
}): Promise<PTableVector[]>;
|
|
125
|
+
/**
|
|
126
|
+
* Stream the sorted table to a file at `path`. The output format is
|
|
127
|
+
* selected from the file extension: `csv`, `tsv`, `parquet`, or `xlsx`.
|
|
128
|
+
* Writing is bounded-memory.
|
|
129
|
+
* This call materializes the join.
|
|
130
|
+
*
|
|
131
|
+
* @param path destination file path; its extension selects the format
|
|
132
|
+
* @param ops.headers list of `[unified column index, header name]` pairs
|
|
133
|
+
* (unified index: axes first, then data columns). Only the columns listed
|
|
134
|
+
* are exported, in ascending index order — the list both selects the
|
|
135
|
+
* columns and names them (the data layer is name-independent, so names
|
|
136
|
+
* are supplied by the caller).
|
|
137
|
+
*
|
|
138
|
+
* @remarks For `xlsx` the caller must ensure the row count is below Excel's
|
|
139
|
+
* 1,048,576-row per-sheet limit.
|
|
140
|
+
*/
|
|
141
|
+
export(path: string, ops?: {
|
|
142
|
+
headers: [number, string][];
|
|
143
|
+
signal?: AbortSignal;
|
|
144
|
+
}): Promise<void>;
|
|
145
|
+
/** Deallocates all underlying resources */
|
|
146
|
+
dispose(): void;
|
|
147
|
+
}
|
|
72
148
|
//#endregion
|
|
73
|
-
export { PTableV11 };
|
|
149
|
+
export { PTableV11, PTableV12 };
|
|
74
150
|
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","names":[],"sources":["../../../src/pframe/internal_api/table.ts"],"mappings":";;;;;A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;;;EAWlD,OAAA,CACE,aAAA,YACA,GAAA;IACE,KAAA,GAAQ,UAAA;IACR,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA,CAAQ,YAAA;;;;;;;;;;;;;;;;;EAkBX,MAAA,CACE,IAAA,UACA,GAAA;IACE,OAAA;IACA,MAAA,GAAS,WAAA;EAAA,IAEV,OAAA;;EAGH,OAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-model-middle-layer",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.2",
|
|
4
4
|
"description": "Common model between middle layer and non-block UI code",
|
|
5
5
|
"files": [
|
|
6
6
|
"./dist/**/*",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"es-toolkit": "^1.39.10",
|
|
21
21
|
"utility-types": "^3.11.0",
|
|
22
22
|
"zod": "~3.25.76",
|
|
23
|
-
"@milaboratories/
|
|
24
|
-
"@milaboratories/
|
|
23
|
+
"@milaboratories/helpers": "1.14.2",
|
|
24
|
+
"@milaboratories/pl-model-common": "1.46.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "~24.5.2",
|
|
28
28
|
"typescript": "~5.9.3",
|
|
29
|
-
"@milaboratories/
|
|
29
|
+
"@milaboratories/ts-builder": "1.5.0",
|
|
30
30
|
"@milaboratories/ts-configs": "1.2.3",
|
|
31
|
-
"@milaboratories/
|
|
31
|
+
"@milaboratories/build-configs": "2.0.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "ts-builder build --target node",
|