@milaboratories/pl-model-common 1.47.3 → 1.49.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/author_marker.d.ts +1 -2
- package/dist/author_marker.d.ts.map +1 -1
- package/dist/base64.d.ts +4 -6
- package/dist/base64.d.ts.map +1 -1
- package/dist/block_state.d.ts +13 -9
- package/dist/block_state.d.ts.map +1 -1
- package/dist/bmodel/block_config.d.ts +51 -29
- package/dist/bmodel/block_config.d.ts.map +1 -1
- package/dist/bmodel/block_kind_ref.cjs +45 -0
- package/dist/bmodel/block_kind_ref.cjs.map +1 -0
- package/dist/bmodel/block_kind_ref.d.ts +55 -0
- package/dist/bmodel/block_kind_ref.d.ts.map +1 -0
- package/dist/bmodel/block_kind_ref.js +43 -0
- package/dist/bmodel/block_kind_ref.js.map +1 -0
- package/dist/bmodel/code.d.ts +4 -5
- package/dist/bmodel/code.d.ts.map +1 -1
- package/dist/bmodel/container.d.ts +13 -5
- package/dist/bmodel/container.d.ts.map +1 -1
- package/dist/bmodel/index.cjs +4 -0
- package/dist/bmodel/index.d.ts +2 -1
- package/dist/bmodel/index.js +2 -1
- package/dist/bmodel/normalization.d.ts +1 -3
- package/dist/bmodel/normalization.d.ts.map +1 -1
- package/dist/bmodel/types.d.ts +1 -2
- package/dist/bmodel/types.d.ts.map +1 -1
- package/dist/branding.d.ts +2 -3
- package/dist/branding.d.ts.map +1 -1
- package/dist/columns/accessor_traversal.d.ts +6 -8
- package/dist/columns/accessor_traversal.d.ts.map +1 -1
- package/dist/columns/column_registry.d.ts +2 -3
- package/dist/columns/column_registry.d.ts.map +1 -1
- package/dist/columns/column_selector.d.ts +9 -9
- package/dist/columns/column_selector.d.ts.map +1 -1
- package/dist/columns/dedup.cjs +1 -1
- package/dist/columns/dedup.cjs.map +1 -1
- package/dist/columns/dedup.d.ts +2 -4
- package/dist/columns/dedup.d.ts.map +1 -1
- package/dist/columns/dedup.js +1 -1
- package/dist/columns/dedup.js.map +1 -1
- package/dist/columns/providers.cjs +1 -1
- package/dist/columns/providers.cjs.map +1 -1
- package/dist/columns/providers.d.ts +4 -5
- package/dist/columns/providers.d.ts.map +1 -1
- package/dist/columns/providers.js +1 -1
- package/dist/columns/providers.js.map +1 -1
- package/dist/columns/types.d.ts +12 -9
- package/dist/columns/types.d.ts.map +1 -1
- package/dist/common_types.d.ts +4 -6
- package/dist/common_types.d.ts.map +1 -1
- package/dist/dialog/index.d.ts +4 -5
- package/dist/dialog/index.d.ts.map +1 -1
- package/dist/driver_kit.d.ts +2 -2
- package/dist/driver_kit.d.ts.map +1 -1
- package/dist/drivers/ChunkedStreamReader.d.ts +3 -5
- package/dist/drivers/ChunkedStreamReader.d.ts.map +1 -1
- package/dist/drivers/blob.d.ts +36 -25
- package/dist/drivers/blob.d.ts.map +1 -1
- package/dist/drivers/columns/columns_collection_driver.d.ts +6 -7
- package/dist/drivers/columns/columns_collection_driver.d.ts.map +1 -1
- package/dist/drivers/columns/discover_columns_options.d.ts +9 -8
- package/dist/drivers/columns/discover_columns_options.d.ts.map +1 -1
- package/dist/drivers/index.cjs +5 -0
- package/dist/drivers/index.d.ts +5 -3
- package/dist/drivers/index.js +3 -3
- package/dist/drivers/interfaces.d.ts +2 -3
- package/dist/drivers/interfaces.d.ts.map +1 -1
- package/dist/drivers/log.d.ts +26 -28
- package/dist/drivers/log.d.ts.map +1 -1
- package/dist/drivers/ls.d.ts +37 -27
- package/dist/drivers/ls.d.ts.map +1 -1
- package/dist/drivers/pframe/column_filter.d.ts +1 -3
- package/dist/drivers/pframe/column_filter.d.ts.map +1 -1
- package/dist/drivers/pframe/data_info.d.ts +77 -50
- package/dist/drivers/pframe/data_info.d.ts.map +1 -1
- package/dist/drivers/pframe/data_types.d.ts +50 -45
- package/dist/drivers/pframe/data_types.d.ts.map +1 -1
- package/dist/drivers/pframe/driver.d.ts +5 -5
- package/dist/drivers/pframe/driver.d.ts.map +1 -1
- package/dist/drivers/pframe/filter_spec.d.ts +10 -12
- package/dist/drivers/pframe/filter_spec.d.ts.map +1 -1
- package/dist/drivers/pframe/find_columns.d.ts +2 -4
- package/dist/drivers/pframe/find_columns.d.ts.map +1 -1
- package/dist/drivers/pframe/index.cjs +5 -0
- package/dist/drivers/pframe/index.d.ts +5 -3
- package/dist/drivers/pframe/index.js +3 -3
- package/dist/drivers/pframe/linker_columns.d.ts +4 -10
- package/dist/drivers/pframe/linker_columns.d.ts.map +1 -1
- package/dist/drivers/pframe/pframe.d.ts +3 -3
- package/dist/drivers/pframe/pframe.d.ts.map +1 -1
- package/dist/drivers/pframe/query/query_common.d.ts +52 -46
- package/dist/drivers/pframe/query/query_common.d.ts.map +1 -1
- package/dist/drivers/pframe/query/query_data.d.ts +26 -21
- package/dist/drivers/pframe/query/query_data.d.ts.map +1 -1
- package/dist/drivers/pframe/query/query_spec.d.ts +22 -19
- package/dist/drivers/pframe/query/query_spec.d.ts.map +1 -1
- package/dist/drivers/pframe/query/utils.d.ts +15 -11
- package/dist/drivers/pframe/query/utils.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/anchored.d.ts +3 -5
- package/dist/drivers/pframe/spec/anchored.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/discovered_column.d.ts +10 -11
- package/dist/drivers/pframe/spec/discovered_column.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/filtered_column.d.ts +17 -18
- package/dist/drivers/pframe/spec/filtered_column.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/ids.cjs +151 -0
- package/dist/drivers/pframe/spec/ids.cjs.map +1 -1
- package/dist/drivers/pframe/spec/ids.d.ts +63 -11
- package/dist/drivers/pframe/spec/ids.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/ids.js +150 -3
- package/dist/drivers/pframe/spec/ids.js.map +1 -1
- package/dist/drivers/pframe/spec/index.cjs +5 -0
- package/dist/drivers/pframe/spec/index.d.ts +3 -3
- package/dist/drivers/pframe/spec/index.js +3 -3
- package/dist/drivers/pframe/spec/native_id.d.ts +3 -3
- package/dist/drivers/pframe/spec/native_id.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/overridden.d.ts +14 -16
- package/dist/drivers/pframe/spec/overridden.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/selectors.d.ts +22 -22
- package/dist/drivers/pframe/spec/selectors.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/spec.cjs +31 -0
- package/dist/drivers/pframe/spec/spec.cjs.map +1 -1
- package/dist/drivers/pframe/spec/spec.d.ts +94 -70
- package/dist/drivers/pframe/spec/spec.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/spec.js +31 -1
- package/dist/drivers/pframe/spec/spec.js.map +1 -1
- package/dist/drivers/pframe/spec_driver.d.ts +30 -25
- package/dist/drivers/pframe/spec_driver.d.ts.map +1 -1
- package/dist/drivers/pframe/table.d.ts +1 -3
- package/dist/drivers/pframe/table.d.ts.map +1 -1
- package/dist/drivers/pframe/table_calculate.d.ts +55 -46
- package/dist/drivers/pframe/table_calculate.d.ts.map +1 -1
- package/dist/drivers/pframe/table_common.d.ts +9 -10
- package/dist/drivers/pframe/table_common.d.ts.map +1 -1
- package/dist/drivers/pframe/unique_values.d.ts +3 -3
- package/dist/drivers/pframe/unique_values.d.ts.map +1 -1
- package/dist/drivers/upload.d.ts +2 -3
- package/dist/drivers/upload.d.ts.map +1 -1
- package/dist/drivers/urls.d.ts +7 -8
- package/dist/drivers/urls.d.ts.map +1 -1
- package/dist/errors.d.ts +35 -36
- package/dist/errors.d.ts.map +1 -1
- package/dist/flags/block_flags.cjs.map +1 -1
- package/dist/flags/block_flags.d.ts +7 -7
- package/dist/flags/block_flags.d.ts.map +1 -1
- package/dist/flags/block_flags.js.map +1 -1
- package/dist/flags/flag_utils.d.ts +6 -8
- package/dist/flags/flag_utils.d.ts.map +1 -1
- package/dist/flags/type_utils.d.ts +6 -7
- package/dist/flags/type_utils.d.ts.map +1 -1
- package/dist/httpAuth.d.ts +4 -5
- package/dist/httpAuth.d.ts.map +1 -1
- package/dist/index.cjs +30 -0
- package/dist/index.d.ts +15 -3
- package/dist/index.js +9 -3
- package/dist/json.d.ts +11 -12
- package/dist/json.d.ts.map +1 -1
- package/dist/navigation.d.ts +16 -11
- package/dist/navigation.d.ts.map +1 -1
- package/dist/plid.cjs +1 -1
- package/dist/plid.cjs.map +1 -1
- package/dist/plid.d.ts +8 -9
- package/dist/plid.d.ts.map +1 -1
- package/dist/plid.js +1 -1
- package/dist/plid.js.map +1 -1
- package/dist/pool/entry.d.ts +8 -6
- package/dist/pool/entry.d.ts.map +1 -1
- package/dist/pool/query.d.ts +3 -4
- package/dist/pool/query.d.ts.map +1 -1
- package/dist/pool/spec.d.ts +33 -30
- package/dist/pool/spec.d.ts.map +1 -1
- package/dist/pool_entry.d.ts +2 -3
- package/dist/pool_entry.d.ts.map +1 -1
- package/dist/project_id.d.ts +1 -3
- package/dist/project_id.d.ts.map +1 -1
- package/dist/ref.d.ts +22 -23
- package/dist/ref.d.ts.map +1 -1
- package/dist/resource_types.d.ts +2 -3
- package/dist/resource_types.d.ts.map +1 -1
- package/dist/services/node_service_handlers.d.ts +1 -3
- package/dist/services/node_service_handlers.d.ts.map +1 -1
- package/dist/services/service_capabilities.d.ts +7 -9
- package/dist/services/service_capabilities.d.ts.map +1 -1
- package/dist/services/service_declarations.d.ts +2 -2
- package/dist/services/service_declarations.d.ts.map +1 -1
- package/dist/services/service_injectors.d.ts +7 -8
- package/dist/services/service_injectors.d.ts.map +1 -1
- package/dist/services/service_registry.d.ts +2 -4
- package/dist/services/service_registry.d.ts.map +1 -1
- package/dist/services/service_types.d.ts +24 -26
- package/dist/services/service_types.d.ts.map +1 -1
- package/dist/template/index.cjs +20 -0
- package/dist/template/index.d.ts +5 -0
- package/dist/template/index.js +5 -0
- package/dist/template/kind_selector.cjs +92 -0
- package/dist/template/kind_selector.cjs.map +1 -0
- package/dist/template/kind_selector.d.ts +78 -0
- package/dist/template/kind_selector.d.ts.map +1 -0
- package/dist/template/kind_selector.js +87 -0
- package/dist/template/kind_selector.js.map +1 -0
- package/dist/template/project_template_v1.cjs +231 -0
- package/dist/template/project_template_v1.cjs.map +1 -0
- package/dist/template/project_template_v1.d.ts +217 -0
- package/dist/template/project_template_v1.d.ts.map +1 -0
- package/dist/template/project_template_v1.js +225 -0
- package/dist/template/project_template_v1.js.map +1 -0
- package/dist/template/template_ref_form.cjs +73 -0
- package/dist/template/template_ref_form.cjs.map +1 -0
- package/dist/template/template_ref_form.d.ts +75 -0
- package/dist/template/template_ref_form.d.ts.map +1 -0
- package/dist/template/template_ref_form.js +72 -0
- package/dist/template/template_ref_form.js.map +1 -0
- package/dist/template/template_relocate.cjs +67 -0
- package/dist/template/template_relocate.cjs.map +1 -0
- package/dist/template/template_relocate.d.ts +36 -0
- package/dist/template/template_relocate.d.ts.map +1 -0
- package/dist/template/template_relocate.js +67 -0
- package/dist/template/template_relocate.js.map +1 -0
- package/dist/utag.d.ts +2 -4
- package/dist/utag.d.ts.map +1 -1
- package/dist/util.d.ts +2 -3
- package/dist/util.d.ts.map +1 -1
- package/dist/value_or_error.d.ts +2 -3
- package/dist/value_or_error.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/bmodel/block_kind_ref.ts +59 -0
- package/src/bmodel/container.ts +9 -0
- package/src/bmodel/index.ts +1 -0
- package/src/columns/dedup.ts +1 -1
- package/src/columns/providers.ts +1 -1
- package/src/drivers/pframe/spec/ids.test.ts +90 -0
- package/src/drivers/pframe/spec/ids.ts +191 -1
- package/src/drivers/pframe/spec/spec.ts +31 -0
- package/src/flags/block_flags.ts +1 -1
- package/src/index.ts +1 -0
- package/src/plid.ts +5 -5
- package/src/template/index.ts +4 -0
- package/src/template/kind_selector.ts +126 -0
- package/src/template/project_template_v1.test.ts +315 -0
- package/src/template/project_template_v1.ts +444 -0
- package/src/template/template_ref_form.test.ts +86 -0
- package/src/template/template_ref_form.ts +108 -0
- package/src/template/template_relocate.test.ts +239 -0
- package/src/template/template_relocate.ts +89 -0
|
@@ -6,26 +6,30 @@
|
|
|
6
6
|
* Note: Actual columns can hold more value types, which are converted to these JavaScript types
|
|
7
7
|
* once they enter the JavaScript runtime.
|
|
8
8
|
*/
|
|
9
|
-
type PColumnValue = null | number | string;
|
|
9
|
+
export type PColumnValue = null | number | string;
|
|
10
10
|
/**
|
|
11
11
|
* Represents a key for a PColumn value.
|
|
12
12
|
* Can be an array of strings or numbers.
|
|
13
13
|
*/
|
|
14
|
-
type PColumnKey = (number | string)[];
|
|
14
|
+
export type PColumnKey = (number | string)[];
|
|
15
15
|
/**
|
|
16
16
|
* Represents a single entry in a PColumn's data structure.
|
|
17
17
|
* Contains a key and a value.
|
|
18
18
|
*/
|
|
19
|
-
type PColumnDataEntry<T> = {
|
|
20
|
-
/** Key for the value */
|
|
19
|
+
export type PColumnDataEntry<T> = {
|
|
20
|
+
/** Key for the value */
|
|
21
|
+
key: PColumnKey;
|
|
22
|
+
/** Value / blob at the given key */
|
|
21
23
|
value: T;
|
|
22
24
|
};
|
|
23
25
|
/**
|
|
24
26
|
* Represents column data stored as a simple JSON structure.
|
|
25
27
|
* Used for small datasets that can be efficiently stored directly in memory.
|
|
26
28
|
*/
|
|
27
|
-
type JsonDataInfo = {
|
|
28
|
-
/** Identifier for this data format ('Json') */
|
|
29
|
+
export type JsonDataInfo = {
|
|
30
|
+
/** Identifier for this data format ('Json') */
|
|
31
|
+
type: "Json";
|
|
32
|
+
/** Number of axes that make up the complete key (tuple length) */
|
|
29
33
|
keyLength: number;
|
|
30
34
|
/**
|
|
31
35
|
* Key-value pairs where keys are stringified tuples of axis values
|
|
@@ -37,57 +41,81 @@ type JsonDataInfo = {
|
|
|
37
41
|
* Represents column data partitioned across multiple JSON blobs.
|
|
38
42
|
* Used for larger datasets that need to be split into manageable chunks.
|
|
39
43
|
*/
|
|
40
|
-
type JsonPartitionedDataInfo<Blob> = {
|
|
41
|
-
/** Identifier for this data format ('JsonPartitioned') */
|
|
42
|
-
|
|
44
|
+
export type JsonPartitionedDataInfo<Blob> = {
|
|
45
|
+
/** Identifier for this data format ('JsonPartitioned') */
|
|
46
|
+
type: "JsonPartitioned";
|
|
47
|
+
/** Number of leading axes used for partitioning */
|
|
48
|
+
partitionKeyLength: number;
|
|
49
|
+
/** Map of stringified partition keys to blob references */
|
|
43
50
|
parts: Record<string, Blob>;
|
|
44
51
|
};
|
|
45
52
|
/**
|
|
46
53
|
* Represents a binary format chunk containing index and values as separate blobs.
|
|
47
54
|
* Used for efficient storage and retrieval of column data in binary format.
|
|
48
55
|
*/
|
|
49
|
-
type BinaryChunk<Blob> = {
|
|
50
|
-
/** Binary blob containing structured index information */
|
|
56
|
+
export type BinaryChunk<Blob> = {
|
|
57
|
+
/** Binary blob containing structured index information */
|
|
58
|
+
index: Blob;
|
|
59
|
+
/** Binary blob containing the actual values */
|
|
51
60
|
values: Blob;
|
|
52
61
|
};
|
|
53
62
|
/**
|
|
54
63
|
* Represents column data partitioned across multiple binary chunks.
|
|
55
64
|
* Optimized for efficient storage and retrieval of large datasets.
|
|
56
65
|
*/
|
|
57
|
-
type BinaryPartitionedDataInfo<Blob> = {
|
|
58
|
-
/** Identifier for this data format ('BinaryPartitioned') */
|
|
59
|
-
|
|
66
|
+
export type BinaryPartitionedDataInfo<Blob> = {
|
|
67
|
+
/** Identifier for this data format ('BinaryPartitioned') */
|
|
68
|
+
type: "BinaryPartitioned";
|
|
69
|
+
/** Number of leading axes used for partitioning */
|
|
70
|
+
partitionKeyLength: number;
|
|
71
|
+
/** Map of stringified partition keys to binary chunks */
|
|
60
72
|
parts: Record<string, BinaryChunk<Blob>>;
|
|
61
73
|
};
|
|
62
|
-
type ParquetChunkMappingAxis = {
|
|
63
|
-
/** Data type (matches PColumn axis types) */
|
|
74
|
+
export type ParquetChunkMappingAxis = {
|
|
75
|
+
/** Data type (matches PColumn axis types) */
|
|
76
|
+
type: "Int" | "Long" | "String";
|
|
77
|
+
/** Field name in the Parquet file */
|
|
64
78
|
id: string;
|
|
65
79
|
};
|
|
66
|
-
type ParquetChunkMappingColumn = {
|
|
67
|
-
/** Data type (matches PColumn value type) */
|
|
80
|
+
export type ParquetChunkMappingColumn = {
|
|
81
|
+
/** Data type (matches PColumn value type) */
|
|
82
|
+
type: "Int" | "Long" | "Float" | "Double" | "String";
|
|
83
|
+
/** Field name in the Parquet file */
|
|
68
84
|
id: string;
|
|
69
85
|
};
|
|
70
|
-
type ParquetChunkMapping = {
|
|
71
|
-
/** Axes mappings - Parquet file is sorted by these fields in this order */
|
|
86
|
+
export type ParquetChunkMapping = {
|
|
87
|
+
/** Axes mappings - Parquet file is sorted by these fields in this order */
|
|
88
|
+
axes: ParquetChunkMappingAxis[];
|
|
89
|
+
/** Column mapping */
|
|
72
90
|
column: ParquetChunkMappingColumn;
|
|
73
91
|
};
|
|
74
|
-
type ParquetChunkStats = {
|
|
75
|
-
/** Number of rows in the chunk */
|
|
92
|
+
export type ParquetChunkStats = {
|
|
93
|
+
/** Number of rows in the chunk */
|
|
94
|
+
numberOfRows: number;
|
|
95
|
+
/** Byte size information for storage optimization and query planning */
|
|
76
96
|
size: {
|
|
77
|
-
/** Byte sizes for each axis column in the same order as axes mapping */
|
|
97
|
+
/** Byte sizes for each axis column in the same order as axes mapping */
|
|
98
|
+
axes: number[];
|
|
99
|
+
/** Byte size for the data column */
|
|
78
100
|
column: number;
|
|
79
101
|
};
|
|
80
102
|
};
|
|
81
|
-
type ParquetChunkMetadata = {
|
|
82
|
-
/** Content hash calculated for the specific axes and data this chunk represents */
|
|
103
|
+
export type ParquetChunkMetadata = {
|
|
104
|
+
/** Content hash calculated for the specific axes and data this chunk represents */
|
|
105
|
+
dataDigest: string;
|
|
106
|
+
/** Pre-computed statistics for optimization without blob download */
|
|
83
107
|
stats: Partial<ParquetChunkStats>;
|
|
84
108
|
};
|
|
85
|
-
type ParquetChunk<Blob> = {
|
|
86
|
-
/** Parquet file (PTable) containing column data */
|
|
109
|
+
export type ParquetChunk<Blob> = {
|
|
110
|
+
/** Parquet file (PTable) containing column data */
|
|
111
|
+
data: Blob;
|
|
87
112
|
} & ParquetChunkMapping & Partial<ParquetChunkMetadata>;
|
|
88
|
-
type ParquetPartitionedDataInfo<Blob> = {
|
|
89
|
-
/** Identifier for this data format ('ParquetPartitioned') */
|
|
90
|
-
|
|
113
|
+
export type ParquetPartitionedDataInfo<Blob> = {
|
|
114
|
+
/** Identifier for this data format ('ParquetPartitioned') */
|
|
115
|
+
type: "ParquetPartitioned";
|
|
116
|
+
/** Number of leading axes used for partitioning */
|
|
117
|
+
partitionKeyLength: number;
|
|
118
|
+
/** Map of stringified partition keys to parquet files */
|
|
91
119
|
parts: Record<string, Blob>;
|
|
92
120
|
};
|
|
93
121
|
/**
|
|
@@ -96,14 +124,14 @@ type ParquetPartitionedDataInfo<Blob> = {
|
|
|
96
124
|
*
|
|
97
125
|
* @template Blob - Type parameter representing the storage reference type (could be ResourceInfo, PFrameBlobId, etc.)
|
|
98
126
|
*/
|
|
99
|
-
type DataInfo<Blob> = JsonDataInfo | JsonPartitionedDataInfo<Blob> | BinaryPartitionedDataInfo<Blob> | ParquetPartitionedDataInfo<Blob>;
|
|
127
|
+
export type DataInfo<Blob> = JsonDataInfo | JsonPartitionedDataInfo<Blob> | BinaryPartitionedDataInfo<Blob> | ParquetPartitionedDataInfo<Blob>;
|
|
100
128
|
/**
|
|
101
129
|
* Type guard function that checks if the given value is a valid DataInfo.
|
|
102
130
|
*
|
|
103
131
|
* @param value - The value to check
|
|
104
132
|
* @returns True if the value is a valid DataInfo, false otherwise
|
|
105
133
|
*/
|
|
106
|
-
declare function isDataInfo<Blob>(value: unknown): value is DataInfo<Blob>;
|
|
134
|
+
export declare function isDataInfo<Blob>(value: unknown): value is DataInfo<Blob>;
|
|
107
135
|
/**
|
|
108
136
|
* Maps blob references in a DataInfo object from one type to another using a mapping function.
|
|
109
137
|
*
|
|
@@ -113,20 +141,20 @@ declare function isDataInfo<Blob>(value: unknown): value is DataInfo<Blob>;
|
|
|
113
141
|
* @param mapFn - Function to transform blobs from type B1 to type B2
|
|
114
142
|
* @returns A new DataInfo object with transformed blob references
|
|
115
143
|
*/
|
|
116
|
-
declare function mapDataInfo<B1, B2>(dataInfo: ParquetPartitionedDataInfo<B1>, mapFn: (blob: B1) => B2): ParquetPartitionedDataInfo<B2>;
|
|
117
|
-
declare function mapDataInfo<B1, B2>(dataInfo: Exclude<DataInfo<B1>, ParquetPartitionedDataInfo<B1>>, mapFn: (blob: B1) => B2): Exclude<DataInfo<B2>, ParquetPartitionedDataInfo<B2>>;
|
|
118
|
-
declare function mapDataInfo<B1, B2>(dataInfo: DataInfo<B1>, mapFn: (blob: B1) => B2): DataInfo<B2>;
|
|
144
|
+
export declare function mapDataInfo<B1, B2>(dataInfo: ParquetPartitionedDataInfo<B1>, mapFn: (blob: B1) => B2): ParquetPartitionedDataInfo<B2>;
|
|
145
|
+
export declare function mapDataInfo<B1, B2>(dataInfo: Exclude<DataInfo<B1>, ParquetPartitionedDataInfo<B1>>, mapFn: (blob: B1) => B2): Exclude<DataInfo<B2>, ParquetPartitionedDataInfo<B2>>;
|
|
146
|
+
export declare function mapDataInfo<B1, B2>(dataInfo: DataInfo<B1>, mapFn: (blob: B1) => B2): DataInfo<B2>;
|
|
119
147
|
/**
|
|
120
148
|
* @param dataInfo - The source DataInfo object
|
|
121
149
|
* @param cb - Callback, function that have access to every blob to visit them all
|
|
122
150
|
* @returns Nothing
|
|
123
151
|
*/
|
|
124
|
-
declare function visitDataInfo<B>(dataInfo: DataInfo<B>, cb: (blob: B) => void): void;
|
|
152
|
+
export declare function visitDataInfo<B>(dataInfo: DataInfo<B>, cb: (blob: B) => void): void;
|
|
125
153
|
/**
|
|
126
154
|
* Represents a single key-value entry in a column's explicit data structure.
|
|
127
155
|
* Used when directly instantiating PColumns with explicit data.
|
|
128
156
|
*/
|
|
129
|
-
type PColumnValuesEntry = {
|
|
157
|
+
export type PColumnValuesEntry = {
|
|
130
158
|
key: PColumnKey;
|
|
131
159
|
val: PColumnValue;
|
|
132
160
|
};
|
|
@@ -134,11 +162,11 @@ type PColumnValuesEntry = {
|
|
|
134
162
|
* Array of key-value entries representing explicit column data.
|
|
135
163
|
* Used for lightweight explicit instantiation of PColumns.
|
|
136
164
|
*/
|
|
137
|
-
type PColumnValues = PColumnValuesEntry[];
|
|
165
|
+
export type PColumnValues = PColumnValuesEntry[];
|
|
138
166
|
/**
|
|
139
167
|
* Entry-based representation of JsonDataInfo
|
|
140
168
|
*/
|
|
141
|
-
interface JsonDataInfoEntries {
|
|
169
|
+
export interface JsonDataInfoEntries {
|
|
142
170
|
type: "Json";
|
|
143
171
|
keyLength: number;
|
|
144
172
|
data: PColumnDataEntry<PColumnValue>[];
|
|
@@ -146,7 +174,7 @@ interface JsonDataInfoEntries {
|
|
|
146
174
|
/**
|
|
147
175
|
* Entry-based representation of JsonPartitionedDataInfo
|
|
148
176
|
*/
|
|
149
|
-
interface JsonPartitionedDataInfoEntries<Blob> {
|
|
177
|
+
export interface JsonPartitionedDataInfoEntries<Blob> {
|
|
150
178
|
type: "JsonPartitioned";
|
|
151
179
|
partitionKeyLength: number;
|
|
152
180
|
parts: PColumnDataEntry<Blob>[];
|
|
@@ -154,7 +182,7 @@ interface JsonPartitionedDataInfoEntries<Blob> {
|
|
|
154
182
|
/**
|
|
155
183
|
* Entry-based representation of BinaryPartitionedDataInfo
|
|
156
184
|
*/
|
|
157
|
-
interface BinaryPartitionedDataInfoEntries<Blob> {
|
|
185
|
+
export interface BinaryPartitionedDataInfoEntries<Blob> {
|
|
158
186
|
type: "BinaryPartitioned";
|
|
159
187
|
partitionKeyLength: number;
|
|
160
188
|
parts: PColumnDataEntry<BinaryChunk<Blob>>[];
|
|
@@ -162,7 +190,7 @@ interface BinaryPartitionedDataInfoEntries<Blob> {
|
|
|
162
190
|
/**
|
|
163
191
|
* Entry-based representation of ParquetPartitionedDataInfo
|
|
164
192
|
*/
|
|
165
|
-
interface ParquetPartitionedDataInfoEntries<Blob> {
|
|
193
|
+
export interface ParquetPartitionedDataInfoEntries<Blob> {
|
|
166
194
|
type: "ParquetPartitioned";
|
|
167
195
|
partitionKeyLength: number;
|
|
168
196
|
parts: PColumnDataEntry<Blob>[];
|
|
@@ -170,18 +198,18 @@ interface ParquetPartitionedDataInfoEntries<Blob> {
|
|
|
170
198
|
/**
|
|
171
199
|
* Union type representing all possible entry-based partitioned data storage formats
|
|
172
200
|
*/
|
|
173
|
-
type PartitionedDataInfoEntries<Blob> = JsonPartitionedDataInfoEntries<Blob> | BinaryPartitionedDataInfoEntries<Blob> | ParquetPartitionedDataInfoEntries<Blob>;
|
|
201
|
+
export type PartitionedDataInfoEntries<Blob> = JsonPartitionedDataInfoEntries<Blob> | BinaryPartitionedDataInfoEntries<Blob> | ParquetPartitionedDataInfoEntries<Blob>;
|
|
174
202
|
/**
|
|
175
203
|
* Union type representing all possible entry-based data storage formats
|
|
176
204
|
*/
|
|
177
|
-
type DataInfoEntries<Blob> = JsonDataInfoEntries | PartitionedDataInfoEntries<Blob>;
|
|
205
|
+
export type DataInfoEntries<Blob> = JsonDataInfoEntries | PartitionedDataInfoEntries<Blob>;
|
|
178
206
|
/**
|
|
179
207
|
* Type guard function that checks if the given value is a valid DataInfoEntries.
|
|
180
208
|
*
|
|
181
209
|
* @param value - The value to check
|
|
182
210
|
* @returns True if the value is a valid DataInfoEntries, false otherwise
|
|
183
211
|
*/
|
|
184
|
-
declare function isDataInfoEntries<Blob>(value: unknown): value is DataInfoEntries<Blob>;
|
|
212
|
+
export declare function isDataInfoEntries<Blob>(value: unknown): value is DataInfoEntries<Blob>;
|
|
185
213
|
/**
|
|
186
214
|
* Type guard function that checks if the given value is a valid PartitionedDataInfoEntries.
|
|
187
215
|
*
|
|
@@ -189,21 +217,21 @@ declare function isDataInfoEntries<Blob>(value: unknown): value is DataInfoEntri
|
|
|
189
217
|
* @param value - The value to check
|
|
190
218
|
* @returns True if the value is a valid PartitionedDataInfoEntries, false otherwise
|
|
191
219
|
*/
|
|
192
|
-
declare function isPartitionedDataInfoEntries<Blob>(value: unknown): value is PartitionedDataInfoEntries<Blob>;
|
|
220
|
+
export declare function isPartitionedDataInfoEntries<Blob>(value: unknown): value is PartitionedDataInfoEntries<Blob>;
|
|
193
221
|
/**
|
|
194
222
|
* Converts DataInfo to DataInfoEntries
|
|
195
223
|
*
|
|
196
224
|
* @param dataInfo - The record-based DataInfo object
|
|
197
225
|
* @returns The equivalent entry-based DataInfoEntries object
|
|
198
226
|
*/
|
|
199
|
-
declare function dataInfoToEntries<Blob>(dataInfo: DataInfo<Blob>): DataInfoEntries<Blob>;
|
|
227
|
+
export declare function dataInfoToEntries<Blob>(dataInfo: DataInfo<Blob>): DataInfoEntries<Blob>;
|
|
200
228
|
/**
|
|
201
229
|
* Converts DataInfoEntries to DataInfo
|
|
202
230
|
*
|
|
203
231
|
* @param dataInfoEntries - The entry-based DataInfoEntries object
|
|
204
232
|
* @returns The equivalent record-based DataInfo object
|
|
205
233
|
*/
|
|
206
|
-
declare function entriesToDataInfo<Blob>(dataInfoEntries: DataInfoEntries<Blob>): DataInfo<Blob>;
|
|
234
|
+
export declare function entriesToDataInfo<Blob>(dataInfoEntries: DataInfoEntries<Blob>): DataInfo<Blob>;
|
|
207
235
|
/**
|
|
208
236
|
* Maps blob references in a DataInfoEntries object from one type to another using a mapping function.
|
|
209
237
|
*
|
|
@@ -213,7 +241,6 @@ declare function entriesToDataInfo<Blob>(dataInfoEntries: DataInfoEntries<Blob>)
|
|
|
213
241
|
* @param mapFn - Function to transform blobs from type B1 to type B2
|
|
214
242
|
* @returns A new DataInfoEntries object with transformed blob references
|
|
215
243
|
*/
|
|
216
|
-
declare function mapDataInfoEntries<B1, B2>(dataInfoEntries: DataInfoEntries<B1>, mapFn: (blob: B1) => B2): DataInfoEntries<B2>;
|
|
244
|
+
export declare function mapDataInfoEntries<B1, B2>(dataInfoEntries: DataInfoEntries<B1>, mapFn: (blob: B1) => B2): DataInfoEntries<B2>;
|
|
217
245
|
//#endregion
|
|
218
|
-
export { BinaryChunk, BinaryPartitionedDataInfo, BinaryPartitionedDataInfoEntries, DataInfo, DataInfoEntries, JsonDataInfo, JsonDataInfoEntries, JsonPartitionedDataInfo, JsonPartitionedDataInfoEntries, PColumnDataEntry, PColumnKey, PColumnValue, PColumnValues, PColumnValuesEntry, ParquetChunk, ParquetChunkMapping, ParquetChunkMappingAxis, ParquetChunkMappingColumn, ParquetChunkMetadata, ParquetChunkStats, ParquetPartitionedDataInfo, ParquetPartitionedDataInfoEntries, PartitionedDataInfoEntries, dataInfoToEntries, entriesToDataInfo, isDataInfo, isDataInfoEntries, isPartitionedDataInfoEntries, mapDataInfo, mapDataInfoEntries, visitDataInfo };
|
|
219
246
|
//# sourceMappingURL=data_info.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data_info.d.ts","names":[],"sources":["../../../src/drivers/pframe/data_info.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"data_info.d.ts","names":[],"sources":["../../../src/drivers/pframe/data_info.ts"],"mappings":";;;;;;;;YASY;;;;;YAMA;;;;;YAMA,iBAAiB;;EAE3B,KAAK;;EAGL,OAAO;;;;;;YAOG;;EAEV;;EAGA;;;;;EAMA,MAAM,eAAe;;;;;;YAOX,wBAAwB;;EAElC;;EAGA;;EAGA,OAAO,eAAe;;;;;;YAOZ,YAAY;;EAEtB,OAAO;;EAGP,QAAQ;;;;;;YAOE,0BAA0B;;EAEpC;;EAGA;;EAGA,OAAO,eAAe,YAAY;;YAGxB;;EAEV;;EAGA;;YAGU;;EAEV;;EAGA;;YAGU;;EAEV,MAAM;;EAGN,QAAQ;;YAGE;;EAEV;;EAEA;;IAEE;;IAEA;;;YAIQ;;EAEV;;EAGA,OAAO,QAAQ;;YAGL,aAAa;;EAEvB,MAAM;IACJ,sBACF,QAAQ;YAEE,2BAA2B;;EAErC;;EAGA;;EAGA,OAAO,eAAe;;;;;;;;YASZ,SAAS,QACjB,eACA,wBAAwB,QACxB,0BAA0B,QAC1B,2BAA2B;;;;;;;wBAQf,WAAW,MAAM,iBAAiB,SAAS,SAAS;;;;;;;;;;wBAuCpD,YAAY,IAAI,IAC9B,UAAU,2BAA2B,KACrC,QAAQ,MAAM,OAAO,KACpB,2BAA2B;wBACd,YAAY,IAAI,IAC9B,UAAU,QAAQ,SAAS,KAAK,2BAA2B,MAC3D,QAAQ,MAAM,OAAO,KACpB,QAAQ,SAAS,KAAK,2BAA2B;wBACpC,YAAY,IAAI,IAAI,UAAU,SAAS,KAAK,QAAQ,MAAM,OAAO,KAAK,SAAS;;;;;;wBAyD/E,cAAc,GAAG,UAAU,SAAS,IAAI,KAAK,MAAM;;;;;YAkCvD;EACV,KAAK;EACL,KAAK;;;;;;YAOK,gBAAgB;;;;iBAKX;EACf;EACA;EACA,MAAM,iBAAiB;;;;;iBAMR,+BAA+B;EAC9C;EACA;EACA,OAAO,iBAAiB;;;;;iBAMT,iCAAiC;EAChD;EACA;EACA,OAAO,iBAAiB,YAAY;;;;;iBAMrB,kCAAkC;EACjD;EACA;EACA,OAAO,iBAAiB;;;;;YAKd,2BAA2B,QACnC,+BAA+B,QAC/B,iCAAiC,QACjC,kCAAkC;;;;YAK1B,gBAAgB,QAAQ,sBAAsB,2BAA2B;;;;;;;wBAQrE,kBAAkB,MAAM,iBAAiB,SAAS,gBAAgB;;;;;;;;wBA6BlE,6BAA6B,MAC3C,iBACC,SAAS,2BAA2B;;;;;;;wBAkBvB,kBAAkB,MAAM,UAAU,SAAS,QAAQ,gBAAgB;;;;;;;wBAiDnE,kBAAkB,MAAM,iBAAiB,gBAAgB,QAAQ,SAAS;;;;;;;;;;wBAgD1E,mBAAmB,IAAI,IACrC,iBAAiB,gBAAgB,KACjC,QAAQ,MAAM,OAAO,KACpB,gBAAgB"}
|
|
@@ -1,77 +1,83 @@
|
|
|
1
1
|
import { Branded } from "../../branding.js";
|
|
2
2
|
import { ValueType } from "./spec/spec.js";
|
|
3
|
-
|
|
4
3
|
//#region src/drivers/pframe/data_types.d.ts
|
|
5
|
-
type PVectorDataInt = Int32Array;
|
|
6
|
-
type PVectorDataLong = BigInt64Array;
|
|
7
|
-
type PVectorDataFloat = Float32Array;
|
|
8
|
-
type PVectorDataDouble = Float64Array;
|
|
9
|
-
type PVectorDataString = (null | string)[];
|
|
10
|
-
type PVectorDataBytes = (null | Uint8Array)[];
|
|
11
|
-
type PVectorDataTyped<DataType extends ValueType> = DataType extends typeof ValueType.Int ? PVectorDataInt : DataType extends typeof ValueType.Long ? PVectorDataLong : DataType extends typeof ValueType.Float ? PVectorDataFloat : DataType extends typeof ValueType.Double ? PVectorDataDouble : DataType extends typeof ValueType.String ? PVectorDataString : DataType extends typeof ValueType.Bytes ? PVectorDataBytes : never;
|
|
12
|
-
type PVectorData = PVectorDataTyped<ValueType>;
|
|
13
|
-
type PTableVectorTyped<DataType extends ValueType> = {
|
|
14
|
-
/** Stored data type */
|
|
4
|
+
export type PVectorDataInt = Int32Array;
|
|
5
|
+
export type PVectorDataLong = BigInt64Array;
|
|
6
|
+
export type PVectorDataFloat = Float32Array;
|
|
7
|
+
export type PVectorDataDouble = Float64Array;
|
|
8
|
+
export type PVectorDataString = (null | string)[];
|
|
9
|
+
export type PVectorDataBytes = (null | Uint8Array)[];
|
|
10
|
+
export type PVectorDataTyped<DataType extends ValueType> = DataType extends typeof ValueType.Int ? PVectorDataInt : DataType extends typeof ValueType.Long ? PVectorDataLong : DataType extends typeof ValueType.Float ? PVectorDataFloat : DataType extends typeof ValueType.Double ? PVectorDataDouble : DataType extends typeof ValueType.String ? PVectorDataString : DataType extends typeof ValueType.Bytes ? PVectorDataBytes : never;
|
|
11
|
+
export type PVectorData = PVectorDataTyped<ValueType>;
|
|
12
|
+
export type PTableVectorTyped<DataType extends ValueType> = {
|
|
13
|
+
/** Stored data type */
|
|
14
|
+
readonly type: DataType;
|
|
15
|
+
/** Values for present positions */
|
|
15
16
|
readonly data: PVectorDataTyped<DataType>;
|
|
16
17
|
/**
|
|
17
18
|
* Encoded bit array marking some elements of this vector as NA,
|
|
18
19
|
* call {@link bitSet} to read the data.
|
|
19
20
|
* In old desktop versions NA values are encoded as magic values in data array.
|
|
20
21
|
* */
|
|
21
|
-
readonly isNA?: Uint8Array;
|
|
22
|
+
readonly isNA?: Uint8Array;
|
|
23
|
+
/** @deprecated Always empty. Kept for backwards compatibility with old blocks. */
|
|
22
24
|
readonly absent?: Uint8Array;
|
|
23
25
|
};
|
|
24
26
|
/** Table column data */
|
|
25
|
-
type PTableVector = PTableVectorTyped<ValueType>;
|
|
26
|
-
declare function isValueNA(vector: PTableVector, row: number): boolean;
|
|
27
|
-
declare const PTableNA: null;
|
|
28
|
-
type PTableNA = typeof PTableNA;
|
|
27
|
+
export type PTableVector = PTableVectorTyped<ValueType>;
|
|
28
|
+
export declare function isValueNA(vector: PTableVector, row: number): boolean;
|
|
29
|
+
export declare const PTableNA: null;
|
|
30
|
+
export type PTableNA = typeof PTableNA;
|
|
29
31
|
/** Type guard for NA value */
|
|
30
|
-
declare function isPTableNA(value: unknown): value is PTableNA;
|
|
31
|
-
type ValueTypeSupported = Exclude<ValueType, typeof ValueType.Bytes>;
|
|
32
|
-
type PTableValueInt = number;
|
|
33
|
-
type PTableValueLong = number;
|
|
34
|
-
type PTableValueFloat = number;
|
|
35
|
-
type PTableValueDouble = number;
|
|
36
|
-
type PTableValueString = string;
|
|
37
|
-
type PTableValueData<DataType extends ValueTypeSupported> = DataType extends typeof ValueType.Int ? PTableValueInt : DataType extends typeof ValueType.Long ? PTableValueLong : DataType extends typeof ValueType.Float ? PTableValueFloat : DataType extends typeof ValueType.Double ? PTableValueDouble : DataType extends typeof ValueType.String ? PTableValueString : never;
|
|
38
|
-
type PTableValueDataBranded<DataType extends ValueTypeSupported> = Branded<PTableValueData<DataType>, DataType>;
|
|
39
|
-
type PTableValue<NA = PTableNA, DataType extends ValueTypeSupported = ValueTypeSupported> = NA | PTableValueData<DataType>;
|
|
40
|
-
type PTableValueBranded<NA = PTableNA, DataType extends ValueTypeSupported = ValueTypeSupported> = NA | PTableValueDataBranded<DataType>;
|
|
41
|
-
type PTableValueAxis<DataType extends ValueTypeSupported = ValueTypeSupported> = PTableValueData<DataType>;
|
|
32
|
+
export declare function isPTableNA(value: unknown): value is PTableNA;
|
|
33
|
+
export type ValueTypeSupported = Exclude<ValueType, typeof ValueType.Bytes>;
|
|
34
|
+
export type PTableValueInt = number;
|
|
35
|
+
export type PTableValueLong = number;
|
|
36
|
+
export type PTableValueFloat = number;
|
|
37
|
+
export type PTableValueDouble = number;
|
|
38
|
+
export type PTableValueString = string;
|
|
39
|
+
export type PTableValueData<DataType extends ValueTypeSupported> = DataType extends typeof ValueType.Int ? PTableValueInt : DataType extends typeof ValueType.Long ? PTableValueLong : DataType extends typeof ValueType.Float ? PTableValueFloat : DataType extends typeof ValueType.Double ? PTableValueDouble : DataType extends typeof ValueType.String ? PTableValueString : never;
|
|
40
|
+
export type PTableValueDataBranded<DataType extends ValueTypeSupported> = Branded<PTableValueData<DataType>, DataType>;
|
|
41
|
+
export type PTableValue<NA = PTableNA, DataType extends ValueTypeSupported = ValueTypeSupported> = NA | PTableValueData<DataType>;
|
|
42
|
+
export type PTableValueBranded<NA = PTableNA, DataType extends ValueTypeSupported = ValueTypeSupported> = NA | PTableValueDataBranded<DataType>;
|
|
43
|
+
export type PTableValueAxis<DataType extends ValueTypeSupported = ValueTypeSupported> = PTableValueData<DataType>;
|
|
42
44
|
/** Read PTableValue from PTable column at specified row */
|
|
43
|
-
declare function pTableValue<DataType extends ValueType>(column: PTableVectorTyped<DataType>, row: number): DataType extends ValueTypeSupported ? PTableValue<PTableNA, DataType> : never;
|
|
44
|
-
declare function pTableValue<FillNA, DataType extends ValueType>(column: PTableVectorTyped<DataType>, row: number, options: {
|
|
45
|
+
export declare function pTableValue<DataType extends ValueType>(column: PTableVectorTyped<DataType>, row: number): DataType extends ValueTypeSupported ? PTableValue<PTableNA, DataType> : never;
|
|
46
|
+
export declare function pTableValue<FillNA, DataType extends ValueType>(column: PTableVectorTyped<DataType>, row: number, options: {
|
|
45
47
|
na: FillNA;
|
|
46
48
|
}): DataType extends ValueTypeSupported ? PTableValue<FillNA, DataType> : never;
|
|
47
|
-
declare function pTableValue<FillNA, DataType extends ValueTypeSupported>(column: PTableVectorTyped<ValueType>, row: number, options: {
|
|
49
|
+
export declare function pTableValue<FillNA, DataType extends ValueTypeSupported>(column: PTableVectorTyped<ValueType>, row: number, options: {
|
|
48
50
|
na: FillNA;
|
|
49
51
|
dataType: DataType;
|
|
50
52
|
}): PTableValue<FillNA, DataType>;
|
|
51
|
-
declare function pTableValueBranded<DataType extends ValueType>(column: PTableVectorTyped<DataType>, row: number): DataType extends ValueTypeSupported ? PTableValueBranded<PTableNA, DataType> : never;
|
|
52
|
-
declare function pTableValueBranded<FillNA, DataType extends ValueType>(column: PTableVectorTyped<DataType>, row: number, options: {
|
|
53
|
+
export declare function pTableValueBranded<DataType extends ValueType>(column: PTableVectorTyped<DataType>, row: number): DataType extends ValueTypeSupported ? PTableValueBranded<PTableNA, DataType> : never;
|
|
54
|
+
export declare function pTableValueBranded<FillNA, DataType extends ValueType>(column: PTableVectorTyped<DataType>, row: number, options: {
|
|
53
55
|
na: FillNA;
|
|
54
56
|
}): DataType extends ValueTypeSupported ? PTableValueBranded<FillNA, DataType> : never;
|
|
55
|
-
declare function pTableValueBranded<FillNA, DataType extends ValueTypeSupported>(column: PTableVectorTyped<ValueType>, row: number, options: {
|
|
57
|
+
export declare function pTableValueBranded<FillNA, DataType extends ValueTypeSupported>(column: PTableVectorTyped<ValueType>, row: number, options: {
|
|
56
58
|
na: FillNA;
|
|
57
59
|
dataType: DataType;
|
|
58
60
|
}): PTableValueBranded<FillNA, DataType>;
|
|
59
61
|
/** Used in requests to partially retrieve table's data */
|
|
60
|
-
type TableRange = {
|
|
61
|
-
/** Index of the first record to retrieve */
|
|
62
|
+
export type TableRange = {
|
|
63
|
+
/** Index of the first record to retrieve */
|
|
64
|
+
readonly offset: number;
|
|
65
|
+
/** Block length */
|
|
62
66
|
readonly length: number;
|
|
63
67
|
};
|
|
64
68
|
/** Unified information about table shape */
|
|
65
|
-
type PTableShape = {
|
|
66
|
-
/** Number of unified table columns, including all axes and PColumn values */
|
|
69
|
+
export type PTableShape = {
|
|
70
|
+
/** Number of unified table columns, including all axes and PColumn values */
|
|
71
|
+
columns: number;
|
|
72
|
+
/** Number of rows */
|
|
67
73
|
rows: number;
|
|
68
74
|
};
|
|
69
75
|
/** Supported formats for PTable file download. */
|
|
70
|
-
type PTableDownloadFormat = "csv" | "tsv";
|
|
76
|
+
export type PTableDownloadFormat = "csv" | "tsv";
|
|
71
77
|
/** Compression applied to the written file. */
|
|
72
|
-
type PTableDownloadCompression = "none" | "gzip";
|
|
78
|
+
export type PTableDownloadCompression = "none" | "gzip";
|
|
73
79
|
/** Options for downloading PTable data to a file. */
|
|
74
|
-
interface WritePTableToFsOptions {
|
|
80
|
+
export interface WritePTableToFsOptions {
|
|
75
81
|
path: string;
|
|
76
82
|
format: PTableDownloadFormat;
|
|
77
83
|
columnIndices: number[];
|
|
@@ -98,7 +104,7 @@ interface WritePTableToFsOptions {
|
|
|
98
104
|
signal?: AbortSignal;
|
|
99
105
|
}
|
|
100
106
|
/** Result of a PTable file download. */
|
|
101
|
-
interface WritePTableToFsResult {
|
|
107
|
+
export interface WritePTableToFsResult {
|
|
102
108
|
path: string;
|
|
103
109
|
rowsWritten: number;
|
|
104
110
|
bytesWritten: number;
|
|
@@ -108,9 +114,9 @@ interface WritePTableToFsResult {
|
|
|
108
114
|
* Excel's hard limit of 1,048,576. The driver rejects oversized `xlsx` exports
|
|
109
115
|
* (see {@link PFrameDriver.exportPTable}); UIs use it to gate the `xlsx` option.
|
|
110
116
|
*/
|
|
111
|
-
declare const XLSX_MAX_ROWS_PER_SHEET = 1000000;
|
|
117
|
+
export declare const XLSX_MAX_ROWS_PER_SHEET = 1000000;
|
|
112
118
|
/** Options for {@link PFrameDriver.exportPTable}. */
|
|
113
|
-
interface ExportPTableOptions {
|
|
119
|
+
export interface ExportPTableOptions {
|
|
114
120
|
/** Destination file path; its extension selects the output format
|
|
115
121
|
* (`csv`/`tsv`/`parquet`/`xlsx`). */
|
|
116
122
|
path: string;
|
|
@@ -131,5 +137,4 @@ interface ExportPTableOptions {
|
|
|
131
137
|
headerNames?: string[];
|
|
132
138
|
}
|
|
133
139
|
//#endregion
|
|
134
|
-
export { ExportPTableOptions, PTableDownloadCompression, PTableDownloadFormat, PTableNA, PTableShape, PTableValue, PTableValueAxis, PTableValueBranded, PTableValueData, PTableValueDataBranded, PTableValueDouble, PTableValueFloat, PTableValueInt, PTableValueLong, PTableValueString, PTableVector, PTableVectorTyped, PVectorData, PVectorDataBytes, PVectorDataDouble, PVectorDataFloat, PVectorDataInt, PVectorDataLong, PVectorDataString, PVectorDataTyped, TableRange, ValueTypeSupported, WritePTableToFsOptions, WritePTableToFsResult, XLSX_MAX_ROWS_PER_SHEET, isPTableNA, isValueNA, pTableValue, pTableValueBranded };
|
|
135
140
|
//# sourceMappingURL=data_types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data_types.d.ts","names":[],"sources":["../../../src/drivers/pframe/data_types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"data_types.d.ts","names":[],"sources":["../../../src/drivers/pframe/data_types.ts"],"mappings":";;;YAGY,iBAAiB;YACjB,kBAAkB;YAClB,mBAAmB;YACnB,oBAAoB;YACpB;YACA,2BAA2B;YAC3B,iBAAiB,iBAAiB,aAAa,wBAAwB,UAAU,MACzF,iBACA,wBAAwB,UAAU,OAChC,kBACA,wBAAwB,UAAU,QAChC,mBACA,wBAAwB,UAAU,SAChC,oBACA,wBAAwB,UAAU,SAChC,oBACA,wBAAwB,UAAU,QAChC;YAEF,cAAc,iBAAiB;YAE/B,kBAAkB,iBAAiB;;WAEpC,MAAM;;WAGN,MAAM,iBAAiB;;;;;;WAOvB,OAAO;;WAGP,SAAS;;;YAGR,eAAe,kBAAkB;wBAQ7B,UAAU,QAAQ,cAAc;qBAwBnC;YACD,kBAAkB;;wBAGd,WAAW,iBAAiB,SAAS;YAIzC,qBAAqB,QAAQ,kBAAkB,UAAU;YAEzD;YACA;YACA;YACA;YACA;YACA,gBAAgB,iBAAiB,sBAC3C,wBAAwB,UAAU,MAC9B,iBACA,wBAAwB,UAAU,OAChC,kBACA,wBAAwB,UAAU,QAChC,mBACA,wBAAwB,UAAU,SAChC,oBACA,wBAAwB,UAAU,SAChC;YAEF,uBAAuB,iBAAiB,sBAAsB,QACxE,gBAAgB,WAChB;YAEU,YAAY,KAAK,UAAU,iBAAiB,qBAAqB,sBACzE,KACA,gBAAgB;YACR,mBACV,KAAK,UACL,iBAAiB,qBAAqB,sBACpC,KAAK,uBAAuB;YAEpB,gBAAgB,iBAAiB,qBAAqB,sBAChE,gBAAgB;;wBA4CF,YAAY,iBAAiB,WAC3C,QAAQ,kBAAkB,WAC1B,cACC,iBAAiB,qBAAqB,YAAY,UAAU;wBAC/C,YAAY,QAAQ,iBAAiB,WACnD,QAAQ,kBAAkB,WAC1B,aACA;EACE,IAAI;IAEL,iBAAiB,qBAAqB,YAAY,QAAQ;wBAC7C,YAAY,QAAQ,iBAAiB,oBACnD,QAAQ,kBAAkB,YAC1B,aACA;EACE,IAAI;EACJ,UAAU;IAEX,YAAY,QAAQ;wBAYP,mBAAmB,iBAAiB,WAClD,QAAQ,kBAAkB,WAC1B,cACC,iBAAiB,qBAAqB,mBAAmB,UAAU;wBACtD,mBAAmB,QAAQ,iBAAiB,WAC1D,QAAQ,kBAAkB,WAC1B,aACA;EACE,IAAI;IAEL,iBAAiB,qBAAqB,mBAAmB,QAAQ;wBACpD,mBAAmB,QAAQ,iBAAiB,oBAC1D,QAAQ,kBAAkB,YAC1B,aACA;EACE,IAAI;EACJ,UAAU;IAEX,mBAAmB,QAAQ;;YAgBlB;;WAED;;WAGA;;;YAIC;;EAEV;;EAGA;;;YAIU;;YAGA;;iBAGK;EACf;EACA,QAAQ;EACR;;;;;;;;;;;;EAYA;EACA,QAAQ;EACR;EACA;EACA;EACA;IACE;IACA;;EAEF,SAAS;;;iBAIM;EACf;EACA;EACA;;;;;;;qBAQW;;iBAGI;;;EAGf;;;EAGA;;;;;;;;;;;;EAYA"}
|
|
@@ -8,19 +8,20 @@ import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
|
|
|
8
8
|
import { UniqueValuesRequest, UniqueValuesResponse } from "./unique_values.js";
|
|
9
9
|
import { PFrameDef } from "./pframe.js";
|
|
10
10
|
import { PObjectId } from "../../pool/spec.js";
|
|
11
|
+
import "../../pool/index.js";
|
|
11
12
|
//#region src/drivers/pframe/driver.d.ts
|
|
12
13
|
/** PFrame handle */
|
|
13
|
-
type PFrameHandle = Branded<string, "PFrame">;
|
|
14
|
+
export type PFrameHandle = Branded<string, "PFrame">;
|
|
14
15
|
/** PFrame handle */
|
|
15
|
-
type PTableHandle = Branded<string, "PTable">;
|
|
16
|
+
export type PTableHandle = Branded<string, "PTable">;
|
|
16
17
|
/** Model-side PFrame service — creates frames/tables from column definitions. */
|
|
17
|
-
interface PFrameModelDriver<Col = PColumn<string | PColumnValues | DataInfo<string>>> {
|
|
18
|
+
export interface PFrameModelDriver<Col = PColumn<string | PColumnValues | DataInfo<string>>> {
|
|
18
19
|
createPFrame(def: PFrameDef<Col>): PFrameHandle;
|
|
19
20
|
createPTable(def: PTableDef<Col>): PTableHandle;
|
|
20
21
|
createPTableV2(def: PTableDefV2<Col>): PTableHandle;
|
|
21
22
|
}
|
|
22
23
|
/** Allows to access main data layer features of platforma */
|
|
23
|
-
interface PFrameDriver {
|
|
24
|
+
export interface PFrameDriver {
|
|
24
25
|
/**
|
|
25
26
|
* Finds columns given filtering criteria on column name, annotations etc.
|
|
26
27
|
* and a set of axes ids to find only columns with compatible specs.
|
|
@@ -75,5 +76,4 @@ interface PFrameDriver {
|
|
|
75
76
|
exportPTable(handle: PTableHandle, options: ExportPTableOptions): Promise<void>;
|
|
76
77
|
}
|
|
77
78
|
//#endregion
|
|
78
|
-
export { PFrameDriver, PFrameHandle, PFrameModelDriver, PTableHandle };
|
|
79
79
|
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","names":[],"sources":["../../../src/drivers/pframe/driver.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"driver.d.ts","names":[],"sources":["../../../src/drivers/pframe/driver.ts"],"mappings":";;;;;;;;;;;;;YAuBY,eAAe;;YAGf,eAAe;;iBAGV,kBAAkB,MAAM,iBAAiB,gBAAgB;EACxE,aAAa,KAAK,UAAU,OAAO;EACnC,aAAa,KAAK,UAAU,OAAO;EACnC,eAAe,KAAK,YAAY,OAAO;;;iBAIxB;;;;;EASf,YAAY,QAAQ,cAAc,SAAS,qBAAqB,QAAQ;;EAGxE,cAAc,QAAQ,cAAc,UAAU,YAAY,QAAQ;;EAGlE,YAAY,QAAQ,eAAe,QAAQ;;EAG3C,mBACE,QAAQ,cACR,SAAS,0BAA0B,YACnC,QAAQ,aACP,QAAQ;;EAGX,gBACE,QAAQ,cACR,SAAS,sBACR,QAAQ;;EAOX,SAAS,QAAQ,eAAe,QAAQ;;;;;;;;;;EAWxC,QAAQ,QAAQ,eAAe,QAAQ;;;;;;;;;EAUvC,QACE,QAAQ,cACR,yBACA,QAAQ,aACP,QAAQ;;;;;EAMX,gBACE,QAAQ,cACR,SAAS,yBACR,QAAQ;;;;;;;;;;;;;EAcX,aAAa,QAAQ,cAAc,SAAS,sBAAsB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SUniversalPColumnId } from "./spec/ids.js";
|
|
2
|
-
|
|
3
2
|
//#region src/drivers/pframe/filter_spec.d.ts
|
|
4
|
-
type FilterSpecNode<Leaf, CommonNode = {}, CommonLeaf = {}> = (CommonLeaf & Leaf) | (CommonNode & {
|
|
3
|
+
export type FilterSpecNode<Leaf, CommonNode = {}, CommonLeaf = {}> = (CommonLeaf & Leaf) | (CommonNode & {
|
|
5
4
|
type: "not";
|
|
6
5
|
filter: FilterSpecNode<Leaf, CommonNode, CommonLeaf>;
|
|
7
6
|
}) | (CommonNode & {
|
|
@@ -11,7 +10,7 @@ type FilterSpecNode<Leaf, CommonNode = {}, CommonLeaf = {}> = (CommonLeaf & Leaf
|
|
|
11
10
|
type: "and";
|
|
12
11
|
filters: FilterSpecNode<Leaf, CommonNode, CommonLeaf>[];
|
|
13
12
|
});
|
|
14
|
-
type FilterSpecLeaf<T = SUniversalPColumnId> = {
|
|
13
|
+
export type FilterSpecLeaf<T = SUniversalPColumnId> = {
|
|
15
14
|
type: undefined;
|
|
16
15
|
} | {
|
|
17
16
|
type: "isNA";
|
|
@@ -115,22 +114,21 @@ type FilterSpecLeaf<T = SUniversalPColumnId> = {
|
|
|
115
114
|
rhs: T;
|
|
116
115
|
minDiff?: number;
|
|
117
116
|
};
|
|
118
|
-
type FilterSpec<Leaf extends FilterSpecLeaf<unknown> = FilterSpecLeaf<SUniversalPColumnId>, CommonNode = {}, CommonLeaf = CommonNode> = FilterSpecNode<Leaf, CommonNode, CommonLeaf>;
|
|
119
|
-
type RootFilterSpec<Leaf extends FilterSpecLeaf<unknown> = FilterSpecLeaf<SUniversalPColumnId>, CommonNode = {}, CommonLeaf = CommonNode> = Extract<FilterSpec<Leaf, CommonNode, CommonLeaf>, {
|
|
117
|
+
export type FilterSpec<Leaf extends FilterSpecLeaf<unknown> = FilterSpecLeaf<SUniversalPColumnId>, CommonNode = {}, CommonLeaf = CommonNode> = FilterSpecNode<Leaf, CommonNode, CommonLeaf>;
|
|
118
|
+
export type RootFilterSpec<Leaf extends FilterSpecLeaf<unknown> = FilterSpecLeaf<SUniversalPColumnId>, CommonNode = {}, CommonLeaf = CommonNode> = Extract<FilterSpec<Leaf, CommonNode, CommonLeaf>, {
|
|
120
119
|
type: "or" | "and";
|
|
121
120
|
}>;
|
|
122
|
-
type FilterSpecType = Exclude<FilterSpec, {
|
|
121
|
+
export type FilterSpecType = Exclude<FilterSpec, {
|
|
123
122
|
type: undefined;
|
|
124
123
|
}>["type"];
|
|
125
|
-
type FilterSpecOfType<T extends FilterSpecType> = Extract<FilterSpec, {
|
|
124
|
+
export type FilterSpecOfType<T extends FilterSpecType> = Extract<FilterSpec, {
|
|
126
125
|
type: T;
|
|
127
126
|
}>;
|
|
128
|
-
type InferFilterSpecLeaf<T extends FilterSpec<FilterSpecLeaf<unknown>>> = T extends FilterSpecNode<infer Leaf, unknown, unknown> ? Leaf : never;
|
|
129
|
-
type InferFilterSpecLeafColumn<T extends FilterSpec<FilterSpecLeaf<unknown>>> = T extends FilterSpecNode<infer Leaf, unknown, unknown> ? Leaf extends {
|
|
127
|
+
export type InferFilterSpecLeaf<T extends FilterSpec<FilterSpecLeaf<unknown>>> = T extends FilterSpecNode<infer Leaf, unknown, unknown> ? Leaf : never;
|
|
128
|
+
export type InferFilterSpecLeafColumn<T extends FilterSpec<FilterSpecLeaf<unknown>>> = T extends FilterSpecNode<infer Leaf, unknown, unknown> ? Leaf extends {
|
|
130
129
|
column: infer C;
|
|
131
130
|
} ? C : never : never;
|
|
132
|
-
type InferFilterSpecCommonNode<T extends FilterSpec<FilterSpecLeaf<unknown>, unknown, unknown>> = T extends FilterSpecNode<unknown, infer CommonNode, unknown> ? CommonNode : never;
|
|
133
|
-
type InferFilterSpecCommonLeaf<T extends FilterSpec<FilterSpecLeaf<unknown>, unknown, unknown>> = T extends FilterSpecNode<unknown, unknown, infer CommonLeaf> ? CommonLeaf : never;
|
|
131
|
+
export type InferFilterSpecCommonNode<T extends FilterSpec<FilterSpecLeaf<unknown>, unknown, unknown>> = T extends FilterSpecNode<unknown, infer CommonNode, unknown> ? CommonNode : never;
|
|
132
|
+
export type InferFilterSpecCommonLeaf<T extends FilterSpec<FilterSpecLeaf<unknown>, unknown, unknown>> = T extends FilterSpecNode<unknown, unknown, infer CommonLeaf> ? CommonLeaf : never;
|
|
134
133
|
//#endregion
|
|
135
|
-
export { FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, InferFilterSpecCommonLeaf, InferFilterSpecCommonNode, InferFilterSpecLeaf, InferFilterSpecLeafColumn, RootFilterSpec };
|
|
136
134
|
//# sourceMappingURL=filter_spec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter_spec.d.ts","names":[],"sources":["../../../src/drivers/pframe/filter_spec.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"filter_spec.d.ts","names":[],"sources":["../../../src/drivers/pframe/filter_spec.ts"],"mappings":";;YAEY,eAAe,MAAM,iBAAiB,oBAC7C,aAAa,SACb;EAAe;EAAa,QAAQ,eAAe,MAAM,YAAY;MACrE;EAAe;EAAY,SAAS,eAAe,MAAM,YAAY;MACrE;EAAe;EAAa,SAAS,eAAe,MAAM,YAAY;;YAE/D,eAAe,IAAI;EACzB;;EACA;EAAc,QAAQ;;EACtB;EAAiB,QAAQ;;EACzB;EAAc,QAAQ;EAAG;;EACzB;EAAuB,QAAQ;EAAG;;EAClC;EAA0B,QAAQ;EAAG;;EACrC;EAAmC,QAAQ;EAAG;;EAC9C;EAAsC,QAAQ;EAAG;;EACjD;EAAyC,QAAQ;EAAG;;EAEpD;EACA,QAAQ;EACR;EACA;EACA;EACA;;EAEA;EAAe,QAAQ;EAAG;;EAC1B;EAAkB,QAAQ;EAAG;;EAC7B;EAAc,QAAQ;EAAG;;EACzB;EAAiB,QAAQ;EAAG;;EAC5B;EAAe,QAAQ;EAAG;;EAC1B;EAAkB,QAAQ;EAAG;;EAC7B;EAAkB,QAAQ;EAAG;;EAC7B;EAAqB,QAAQ;EAAG;;EAChC;EAAyB,QAAQ;EAAG;;EACpC;EAA4B,QAAQ;EAAG;;EACvC;EAAuB,QAAQ;EAAG,KAAK;;EACvC;EAAwB,QAAQ;EAAG,KAAK;EAAG;;EAC3C;EAA2B,QAAQ;EAAG,KAAK;EAAG;;EAC9C;EAA+B,QAAQ;EAAG,KAAK;EAAG;;EAClD;EAAkC,QAAQ;EAAG,KAAK;EAAG;;YAE/C,WACV,aAAa,0BAA0B,eAAe,sBACtD,iBACA,aAAa,cACX,eAAe,MAAM,YAAY;YAEzB,eACV,aAAa,0BAA0B,eAAe,sBACtD,iBACA,aAAa,cACX,QAAQ,WAAW,MAAM,YAAY;EAAe;;YAE5C,iBAAiB,QAAQ;EAAc;;YAEvC,iBAAiB,UAAU,kBAAkB,QAAQ;EAAc,MAAM;;YAEzE,oBAAoB,UAAU,WAAW,4BACnD,UAAU,qBAAqB,0BAA0B;YAE/C,0BAA0B,UAAU,WAAW,4BACzD,UAAU,qBAAqB,0BAC3B;EAAe,cAAc;IAC3B;YAII,0BACV,UAAU,WAAW,8CACnB,UAAU,8BAA8B,uBAAuB;YAEvD,0BACV,UAAU,WAAW,8CACnB,UAAU,uCAAuC,cAAc"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AxisId, PColumnIdAndSpec } from "./spec/spec.js";
|
|
2
2
|
import { ColumnFilter } from "./column_filter.js";
|
|
3
|
-
|
|
4
3
|
//#region src/drivers/pframe/find_columns.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Request to search among existing columns in the PFrame. Two filtering
|
|
@@ -8,7 +7,7 @@ import { ColumnFilter } from "./column_filter.js";
|
|
|
8
7
|
* specific properties like name, annotations and domains, and (2) being
|
|
9
8
|
* compatible with the given list of axis ids.
|
|
10
9
|
* */
|
|
11
|
-
interface FindColumnsRequest {
|
|
10
|
+
export interface FindColumnsRequest {
|
|
12
11
|
/** Basic column filter */
|
|
13
12
|
readonly columnFilter: ColumnFilter;
|
|
14
13
|
/** Will only search for columns compatible with these list of axis ids */
|
|
@@ -22,10 +21,9 @@ interface FindColumnsRequest {
|
|
|
22
21
|
readonly strictlyCompatible: boolean;
|
|
23
22
|
}
|
|
24
23
|
/** Response for {@link FindColumnsRequest} */
|
|
25
|
-
interface FindColumnsResponse {
|
|
24
|
+
export interface FindColumnsResponse {
|
|
26
25
|
/** Array of column ids found using request criteria. */
|
|
27
26
|
readonly hits: PColumnIdAndSpec[];
|
|
28
27
|
}
|
|
29
28
|
//#endregion
|
|
30
|
-
export { FindColumnsRequest, FindColumnsResponse };
|
|
31
29
|
//# sourceMappingURL=find_columns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find_columns.d.ts","names":[],"sources":["../../../src/drivers/pframe/find_columns.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"find_columns.d.ts","names":[],"sources":["../../../src/drivers/pframe/find_columns.ts"],"mappings":";;;;;;;;;iBASiB;;WAEN,cAAc;;WAGd,gBAAgB;;;;;;;WAQhB;;;iBAIM;;WAEN,MAAM"}
|