@milaboratories/pl-model-common 1.24.2 → 1.24.4
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/base32_encode.cjs +11 -11
- package/dist/base32_encode.cjs.map +1 -1
- package/dist/base32_encode.d.ts +1 -1
- package/dist/base32_encode.js +11 -11
- package/dist/base32_encode.js.map +1 -1
- package/dist/base64.cjs +2 -2
- package/dist/base64.cjs.map +1 -1
- package/dist/base64.d.ts +1 -1
- package/dist/base64.d.ts.map +1 -1
- package/dist/base64.js +2 -2
- package/dist/base64.js.map +1 -1
- package/dist/block_state.d.ts +3 -3
- package/dist/bmodel/block_config.cjs +1 -1
- package/dist/bmodel/block_config.cjs.map +1 -1
- package/dist/bmodel/block_config.d.ts +3 -3
- package/dist/bmodel/block_config.d.ts.map +1 -1
- package/dist/bmodel/block_config.js +1 -1
- package/dist/bmodel/block_config.js.map +1 -1
- package/dist/bmodel/code.cjs +1 -1
- package/dist/bmodel/code.cjs.map +1 -1
- package/dist/bmodel/code.d.ts +2 -2
- package/dist/bmodel/code.js +1 -1
- package/dist/bmodel/code.js.map +1 -1
- package/dist/bmodel/container.d.ts +5 -5
- package/dist/bmodel/index.d.ts +5 -5
- package/dist/bmodel/normalization.cjs +17 -17
- package/dist/bmodel/normalization.cjs.map +1 -1
- package/dist/bmodel/normalization.d.ts +2 -2
- package/dist/bmodel/normalization.d.ts.map +1 -1
- package/dist/bmodel/normalization.js +17 -17
- package/dist/bmodel/normalization.js.map +1 -1
- package/dist/bmodel/types.d.ts +1 -1
- package/dist/branding.d.ts +2 -2
- package/dist/common_types.d.ts +1 -1
- package/dist/driver_kit.d.ts +1 -1
- package/dist/drivers/ChunkedStreamReader.cjs +13 -12
- package/dist/drivers/ChunkedStreamReader.cjs.map +1 -1
- package/dist/drivers/ChunkedStreamReader.d.ts +2 -2
- package/dist/drivers/ChunkedStreamReader.d.ts.map +1 -1
- package/dist/drivers/ChunkedStreamReader.js +13 -12
- package/dist/drivers/ChunkedStreamReader.js.map +1 -1
- package/dist/drivers/blob.cjs +1 -1
- package/dist/drivers/blob.cjs.map +1 -1
- package/dist/drivers/blob.d.ts +4 -4
- package/dist/drivers/blob.d.ts.map +1 -1
- package/dist/drivers/blob.js +1 -1
- package/dist/drivers/blob.js.map +1 -1
- package/dist/drivers/index.d.ts +8 -8
- package/dist/drivers/log.cjs +1 -1
- package/dist/drivers/log.cjs.map +1 -1
- package/dist/drivers/log.js +1 -1
- package/dist/drivers/log.js.map +1 -1
- package/dist/drivers/ls.cjs +3 -3
- package/dist/drivers/ls.cjs.map +1 -1
- package/dist/drivers/ls.d.ts +6 -6
- package/dist/drivers/ls.d.ts.map +1 -1
- package/dist/drivers/ls.js +3 -3
- package/dist/drivers/ls.js.map +1 -1
- package/dist/drivers/pframe/column_filter.d.ts +1 -1
- package/dist/drivers/pframe/data_info.cjs +119 -110
- package/dist/drivers/pframe/data_info.cjs.map +1 -1
- package/dist/drivers/pframe/data_info.d.ts +10 -10
- package/dist/drivers/pframe/data_info.d.ts.map +1 -1
- package/dist/drivers/pframe/data_info.js +119 -110
- package/dist/drivers/pframe/data_info.js.map +1 -1
- package/dist/drivers/pframe/data_types.cjs +7 -4
- package/dist/drivers/pframe/data_types.cjs.map +1 -1
- package/dist/drivers/pframe/data_types.d.ts +2 -2
- package/dist/drivers/pframe/data_types.d.ts.map +1 -1
- package/dist/drivers/pframe/data_types.js +7 -4
- package/dist/drivers/pframe/data_types.js.map +1 -1
- package/dist/drivers/pframe/driver.d.ts +10 -10
- package/dist/drivers/pframe/driver.d.ts.map +1 -1
- package/dist/drivers/pframe/find_columns.d.ts +2 -2
- package/dist/drivers/pframe/index.d.ts +14 -14
- package/dist/drivers/pframe/linker_columns.cjs +13 -5
- package/dist/drivers/pframe/linker_columns.cjs.map +1 -1
- package/dist/drivers/pframe/linker_columns.d.ts +2 -2
- package/dist/drivers/pframe/linker_columns.d.ts.map +1 -1
- package/dist/drivers/pframe/linker_columns.js +13 -5
- package/dist/drivers/pframe/linker_columns.js.map +1 -1
- package/dist/drivers/pframe/pframe.d.ts +6 -6
- package/dist/drivers/pframe/pframe.d.ts.map +1 -1
- package/dist/drivers/pframe/query/index.d.ts +2 -2
- package/dist/drivers/pframe/query/query_common.d.ts +40 -40
- package/dist/drivers/pframe/query/query_common.d.ts.map +1 -1
- package/dist/drivers/pframe/query/query_data.d.ts +2 -2
- package/dist/drivers/pframe/query/query_data.d.ts.map +1 -1
- package/dist/drivers/pframe/query/query_spec.d.ts +3 -3
- package/dist/drivers/pframe/query/query_spec.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/anchored.cjs +6 -6
- package/dist/drivers/pframe/spec/anchored.cjs.map +1 -1
- package/dist/drivers/pframe/spec/anchored.d.ts +4 -4
- package/dist/drivers/pframe/spec/anchored.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/anchored.js +6 -6
- package/dist/drivers/pframe/spec/anchored.js.map +1 -1
- package/dist/drivers/pframe/spec/filtered_column.cjs +1 -1
- package/dist/drivers/pframe/spec/filtered_column.cjs.map +1 -1
- package/dist/drivers/pframe/spec/filtered_column.d.ts +1 -1
- package/dist/drivers/pframe/spec/filtered_column.js +1 -1
- package/dist/drivers/pframe/spec/filtered_column.js.map +1 -1
- package/dist/drivers/pframe/spec/ids.cjs.map +1 -1
- package/dist/drivers/pframe/spec/ids.d.ts +5 -5
- package/dist/drivers/pframe/spec/ids.js.map +1 -1
- package/dist/drivers/pframe/spec/index.d.ts +6 -6
- package/dist/drivers/pframe/spec/native_id.cjs.map +1 -1
- 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/native_id.js.map +1 -1
- package/dist/drivers/pframe/spec/selectors.cjs +1 -1
- package/dist/drivers/pframe/spec/selectors.cjs.map +1 -1
- package/dist/drivers/pframe/spec/selectors.d.ts +4 -4
- package/dist/drivers/pframe/spec/selectors.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/selectors.js +1 -1
- package/dist/drivers/pframe/spec/selectors.js.map +1 -1
- package/dist/drivers/pframe/spec/spec.cjs +64 -59
- package/dist/drivers/pframe/spec/spec.cjs.map +1 -1
- package/dist/drivers/pframe/spec/spec.d.ts +15 -15
- package/dist/drivers/pframe/spec/spec.d.ts.map +1 -1
- package/dist/drivers/pframe/spec/spec.js +64 -59
- package/dist/drivers/pframe/spec/spec.js.map +1 -1
- package/dist/drivers/pframe/table.d.ts +2 -2
- package/dist/drivers/pframe/table_calculate.cjs +11 -11
- package/dist/drivers/pframe/table_calculate.cjs.map +1 -1
- package/dist/drivers/pframe/table_calculate.d.ts +30 -30
- package/dist/drivers/pframe/table_calculate.d.ts.map +1 -1
- package/dist/drivers/pframe/table_calculate.js +11 -11
- package/dist/drivers/pframe/table_calculate.js.map +1 -1
- package/dist/drivers/pframe/table_common.cjs +4 -4
- package/dist/drivers/pframe/table_common.cjs.map +1 -1
- package/dist/drivers/pframe/table_common.d.ts +6 -6
- package/dist/drivers/pframe/table_common.js +4 -4
- package/dist/drivers/pframe/table_common.js.map +1 -1
- package/dist/drivers/pframe/type_util.d.ts.map +1 -1
- package/dist/drivers/pframe/unique_values.d.ts +4 -4
- package/dist/drivers/urls.cjs +2 -2
- package/dist/drivers/urls.cjs.map +1 -1
- package/dist/drivers/urls.d.ts +1 -1
- package/dist/drivers/urls.js +2 -2
- package/dist/drivers/urls.js.map +1 -1
- package/dist/errors.cjs +12 -12
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +12 -12
- package/dist/errors.js.map +1 -1
- package/dist/flags/block_flags.cjs +2 -2
- package/dist/flags/block_flags.cjs.map +1 -1
- package/dist/flags/block_flags.d.ts.map +1 -1
- package/dist/flags/block_flags.js +2 -2
- package/dist/flags/block_flags.js.map +1 -1
- package/dist/flags/flag_utils.cjs +31 -29
- package/dist/flags/flag_utils.cjs.map +1 -1
- package/dist/flags/flag_utils.d.ts +33 -33
- package/dist/flags/flag_utils.d.ts.map +1 -1
- package/dist/flags/flag_utils.js +31 -29
- package/dist/flags/flag_utils.js.map +1 -1
- package/dist/flags/index.d.ts +3 -3
- package/dist/flags/type_utils.d.ts +1 -1
- package/dist/flags/type_utils.d.ts.map +1 -1
- package/dist/httpAuth.cjs +4 -5
- package/dist/httpAuth.cjs.map +1 -1
- package/dist/httpAuth.d.ts +1 -1
- package/dist/httpAuth.d.ts.map +1 -1
- package/dist/httpAuth.js +4 -5
- package/dist/httpAuth.js.map +1 -1
- package/dist/index.d.ts +19 -19
- package/dist/json.cjs +1 -1
- package/dist/json.cjs.map +1 -1
- package/dist/json.d.ts.map +1 -1
- package/dist/json.js +1 -1
- package/dist/json.js.map +1 -1
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.cjs.map +1 -1
- package/dist/navigation.d.ts +3 -3
- package/dist/navigation.js +1 -1
- package/dist/navigation.js.map +1 -1
- package/dist/plid.cjs +4 -4
- package/dist/plid.cjs.map +1 -1
- package/dist/plid.d.ts +1 -1
- package/dist/plid.js +4 -4
- package/dist/plid.js.map +1 -1
- package/dist/pool/entry.d.ts +1 -1
- package/dist/pool/index.d.ts +3 -3
- package/dist/pool/query.cjs +23 -23
- package/dist/pool/query.cjs.map +1 -1
- package/dist/pool/query.d.ts +9 -9
- package/dist/pool/query.d.ts.map +1 -1
- package/dist/pool/query.js +23 -23
- package/dist/pool/query.js.map +1 -1
- package/dist/pool/spec.cjs +9 -9
- package/dist/pool/spec.cjs.map +1 -1
- package/dist/pool/spec.d.ts +4 -4
- package/dist/pool/spec.d.ts.map +1 -1
- package/dist/pool/spec.js +9 -9
- package/dist/pool/spec.js.map +1 -1
- package/dist/ref.cjs +20 -18
- package/dist/ref.cjs.map +1 -1
- package/dist/ref.d.ts +1 -1
- package/dist/ref.d.ts.map +1 -1
- package/dist/ref.js +20 -18
- package/dist/ref.js.map +1 -1
- package/dist/utag.d.ts +1 -1
- package/dist/util.cjs +1 -1
- package/dist/util.cjs.map +1 -1
- package/dist/util.js +1 -1
- package/dist/util.js.map +1 -1
- package/dist/value_or_error.cjs.map +1 -1
- package/dist/value_or_error.d.ts.map +1 -1
- package/dist/value_or_error.js.map +1 -1
- package/package.json +18 -17
- package/src/base32_encode.ts +12 -12
- package/src/base64.ts +12 -8
- package/src/block_state.ts +3 -3
- package/src/bmodel/block_config.ts +12 -6
- package/src/bmodel/code.ts +3 -3
- package/src/bmodel/container.ts +5 -5
- package/src/bmodel/index.ts +5 -5
- package/src/bmodel/normalization.ts +33 -25
- package/src/bmodel/types.ts +1 -1
- package/src/branding.ts +2 -2
- package/src/common_types.ts +1 -1
- package/src/driver_kit.ts +1 -1
- package/src/drivers/ChunkedStreamReader.ts +16 -14
- package/src/drivers/blob.ts +7 -11
- package/src/drivers/index.ts +8 -8
- package/src/drivers/log.ts +3 -3
- package/src/drivers/ls.ts +18 -18
- package/src/drivers/pframe/column_filter.ts +1 -1
- package/src/drivers/pframe/data_info.ts +146 -146
- package/src/drivers/pframe/data_types.ts +56 -36
- package/src/drivers/pframe/driver.ts +20 -36
- package/src/drivers/pframe/find_columns.ts +2 -2
- package/src/drivers/pframe/index.ts +14 -14
- package/src/drivers/pframe/linker_columns.test.ts +280 -273
- package/src/drivers/pframe/linker_columns.ts +65 -39
- package/src/drivers/pframe/pframe.ts +6 -9
- package/src/drivers/pframe/query/index.ts +2 -2
- package/src/drivers/pframe/query/query_common.ts +50 -40
- package/src/drivers/pframe/query/query_data.ts +17 -10
- package/src/drivers/pframe/query/query_spec.ts +18 -10
- package/src/drivers/pframe/spec/anchored.ts +44 -33
- package/src/drivers/pframe/spec/filtered_column.ts +2 -2
- package/src/drivers/pframe/spec/ids.ts +6 -6
- package/src/drivers/pframe/spec/index.ts +6 -6
- package/src/drivers/pframe/spec/native_id.ts +7 -9
- package/src/drivers/pframe/spec/selectors.test.ts +170 -146
- package/src/drivers/pframe/spec/selectors.ts +22 -31
- package/src/drivers/pframe/spec/spec.test.ts +163 -176
- package/src/drivers/pframe/spec/spec.ts +132 -117
- package/src/drivers/pframe/table.ts +2 -2
- package/src/drivers/pframe/table_calculate.ts +44 -50
- package/src/drivers/pframe/table_common.ts +10 -10
- package/src/drivers/pframe/type_util.ts +2 -7
- package/src/drivers/pframe/unique_values.ts +4 -4
- package/src/drivers/urls.ts +3 -3
- package/src/errors.test.ts +20 -20
- package/src/errors.ts +24 -20
- package/src/flags/block_flags.ts +8 -7
- package/src/flags/flag_utils.test.ts +94 -73
- package/src/flags/flag_utils.ts +73 -50
- package/src/flags/index.ts +3 -3
- package/src/flags/type_utils.ts +10 -7
- package/src/httpAuth.ts +5 -6
- package/src/index.ts +19 -19
- package/src/json.ts +28 -17
- package/src/navigation.ts +4 -4
- package/src/plid.ts +6 -6
- package/src/pool/entry.ts +1 -1
- package/src/pool/index.ts +3 -3
- package/src/pool/query.ts +52 -56
- package/src/pool/spec.ts +20 -17
- package/src/ref.ts +25 -19
- package/src/utag.ts +1 -1
- package/src/util.ts +1 -1
- package/src/value_or_error.ts +6 -6
package/dist/drivers/ls.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ls.cjs","sources":["../../src/drivers/ls.ts"],"sourcesContent":["import { assertNever } from
|
|
1
|
+
{"version":3,"file":"ls.cjs","sources":["../../src/drivers/ls.ts"],"sourcesContent":["import { assertNever } from \"../util\";\nimport type { Branded } from \"../branding\";\nimport type { TableRange } from \"./pframe\";\nimport type { FileLike } from \"./interfaces\";\n\nconst uploadPrefix = \"upload://upload/\";\nconst indexPrefix = \"index://index/\";\n\nexport type ImportFileHandleUpload = `upload://upload/${string}`;\nexport type ImportFileHandleIndex = `index://index/${string}`;\n\nexport type ImportFileHandle = ImportFileHandleUpload | ImportFileHandleIndex;\n\nexport type LocalImportFileHandle = Branded<ImportFileHandle, \"Local\">;\n\nexport function isImportFileHandleUpload(\n handle: ImportFileHandle,\n): handle is ImportFileHandleUpload {\n return handle.startsWith(uploadPrefix);\n}\n\nexport function isImportFileHandleIndex(handle: ImportFileHandle): handle is ImportFileHandleIndex {\n return handle.startsWith(indexPrefix);\n}\n\n/** Results in upload */\nexport type StorageHandleLocal = `local://${string}`;\n\n/** Results in index */\nexport type StorageHandleRemote = `remote://${string}`;\n\nexport type StorageHandle = StorageHandleLocal | StorageHandleRemote;\n\nexport type StorageEntry = {\n name: string;\n handle: StorageHandle;\n initialFullPath: string;\n\n // TODO\n // pathStartsWithDisk\n};\n\nexport type ListFilesResult = {\n parent?: string;\n entries: LsEntry[];\n};\n\nexport type LsEntry =\n | {\n type: \"dir\";\n name: string;\n fullPath: string;\n }\n | {\n type: \"file\";\n name: string;\n fullPath: string;\n\n /** This handle should be set to args... */\n handle: ImportFileHandle;\n };\n\nexport type OpenDialogFilter = {\n /** Human-readable file type name */\n readonly name: string;\n /** File extensions */\n readonly extensions: string[];\n};\n\nexport type OpenDialogOps = {\n /** Open dialog window title */\n readonly title?: string;\n /** Custom label for the confirmation button, when left empty the default label will be used. */\n readonly buttonLabel?: string;\n /** Limits of file types user can select */\n readonly filters?: OpenDialogFilter[];\n};\n\nexport type OpenSingleFileResponse = {\n /** Contains local file handle, allowing file importing or content reading. If user canceled\n * the dialog, field will be undefined. */\n readonly file?: LocalImportFileHandle;\n};\n\nexport type OpenMultipleFilesResponse = {\n /** Contains local file handles, allowing file importing or content reading. If user canceled\n * the dialog, field will be undefined. */\n readonly files?: LocalImportFileHandle[];\n};\n\n/** Can be used to limit request for local file content to a certain bytes range */\nexport type FileRange = {\n /** From byte index (inclusive) */\n readonly from: number;\n /** To byte index (exclusive) */\n readonly to: number;\n};\n\nexport interface LsDriver {\n /** remote and local storages */\n getStorageList(): Promise<StorageEntry[]>;\n\n listFiles(storage: StorageHandle, fullPath: string): Promise<ListFilesResult>;\n\n /** Opens system file open dialog allowing to select single file and awaits user action */\n showOpenSingleFileDialog(ops: OpenDialogOps): Promise<OpenSingleFileResponse>;\n\n /** Opens system file open dialog allowing to multiple files and awaits user action */\n showOpenMultipleFilesDialog(ops: OpenDialogOps): Promise<OpenMultipleFilesResponse>;\n\n /** Given a handle to a local file, allows to get file size */\n getLocalFileSize(file: LocalImportFileHandle): Promise<number>;\n\n /** Given a handle to a local file, allows to get its content */\n getLocalFileContent(file: LocalImportFileHandle, range?: TableRange): Promise<Uint8Array>;\n\n /**\n * Resolves browser's File object into platforma's import file handle.\n *\n * This method is useful among other things for implementation of UI\n * components, that handle file Drag&Drop.\n * */\n fileToImportHandle(file: FileLike): Promise<ImportFileHandle>;\n\n /** Saves currently opened block webview as a PDF. */\n exportToPdf?(): Promise<void>;\n}\n\n/** Gets a file path from an import handle. */\nexport function getFilePathFromHandle(handle: ImportFileHandle): string {\n if (isImportFileHandleIndex(handle)) {\n const trimmed = handle.slice(indexPrefix.length);\n const data = JSON.parse(decodeURIComponent(trimmed)) as { path: string };\n return data.path;\n } else if (isImportFileHandleUpload(handle)) {\n const trimmed = handle.slice(uploadPrefix.length);\n const data = JSON.parse(decodeURIComponent(trimmed)) as { localPath: string };\n return data.localPath;\n }\n\n assertNever(handle);\n}\n\nfunction extractFileName(filePath: string) {\n return filePath.replace(/^.*[\\\\/]/, \"\");\n}\n\n/** Gets a file name from an import handle. */\nexport function getFileNameFromHandle(handle: ImportFileHandle): string {\n return extractFileName(getFilePathFromHandle(handle));\n}\n"],"names":["assertNever"],"mappings":";;;;AAKA,MAAM,YAAY,GAAG,kBAAkB;AACvC,MAAM,WAAW,GAAG,gBAAgB;AAS9B,SAAU,wBAAwB,CACtC,MAAwB,EAAA;AAExB,IAAA,OAAO,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC;AACxC;AAEM,SAAU,uBAAuB,CAAC,MAAwB,EAAA;AAC9D,IAAA,OAAO,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;AACvC;AAyGA;AACM,SAAU,qBAAqB,CAAC,MAAwB,EAAA;AAC5D,IAAA,IAAI,uBAAuB,CAAC,MAAM,CAAC,EAAE;QACnC,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC;QAChD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAqB;QACxE,OAAO,IAAI,CAAC,IAAI;IAClB;AAAO,SAAA,IAAI,wBAAwB,CAAC,MAAM,CAAC,EAAE;QAC3C,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC;QACjD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAA0B;QAC7E,OAAO,IAAI,CAAC,SAAS;IACvB;IAEAA,gBAAW,CAAC,MAAM,CAAC;AACrB;AAEA,SAAS,eAAe,CAAC,QAAgB,EAAA;IACvC,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;AACzC;AAEA;AACM,SAAU,qBAAqB,CAAC,MAAwB,EAAA;AAC5D,IAAA,OAAO,eAAe,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;AACvD;;;;;;;"}
|
package/dist/drivers/ls.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Branded } from
|
|
2
|
-
import type { TableRange } from
|
|
3
|
-
import type { FileLike } from
|
|
1
|
+
import type { Branded } from "../branding";
|
|
2
|
+
import type { TableRange } from "./pframe";
|
|
3
|
+
import type { FileLike } from "./interfaces";
|
|
4
4
|
export type ImportFileHandleUpload = `upload://upload/${string}`;
|
|
5
5
|
export type ImportFileHandleIndex = `index://index/${string}`;
|
|
6
6
|
export type ImportFileHandle = ImportFileHandleUpload | ImportFileHandleIndex;
|
|
7
|
-
export type LocalImportFileHandle = Branded<ImportFileHandle,
|
|
7
|
+
export type LocalImportFileHandle = Branded<ImportFileHandle, "Local">;
|
|
8
8
|
export declare function isImportFileHandleUpload(handle: ImportFileHandle): handle is ImportFileHandleUpload;
|
|
9
9
|
export declare function isImportFileHandleIndex(handle: ImportFileHandle): handle is ImportFileHandleIndex;
|
|
10
10
|
/** Results in upload */
|
|
@@ -22,11 +22,11 @@ export type ListFilesResult = {
|
|
|
22
22
|
entries: LsEntry[];
|
|
23
23
|
};
|
|
24
24
|
export type LsEntry = {
|
|
25
|
-
type:
|
|
25
|
+
type: "dir";
|
|
26
26
|
name: string;
|
|
27
27
|
fullPath: string;
|
|
28
28
|
} | {
|
|
29
|
-
type:
|
|
29
|
+
type: "file";
|
|
30
30
|
name: string;
|
|
31
31
|
fullPath: string;
|
|
32
32
|
/** This handle should be set to args... */
|
package/dist/drivers/ls.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ls.d.ts","sourceRoot":"","sources":["../../src/drivers/ls.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAK7C,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,MAAM,EAAE,CAAC;AACjE,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,MAAM,EAAE,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GAAG,qBAAqB,CAAC;AAE9E,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAEvE,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,gBAAgB,GACvB,MAAM,IAAI,sBAAsB,CAElC;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,IAAI,qBAAqB,CAEjG;AAED,wBAAwB;AACxB,MAAM,MAAM,kBAAkB,GAAG,WAAW,MAAM,EAAE,CAAC;AAErD,uBAAuB;AACvB,MAAM,MAAM,mBAAmB,GAAG,YAAY,MAAM,EAAE,CA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IAAI,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,QAAQ;IACvB,gCAAgC;IAChC,cAAc,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAE1C,SAAS,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAE9E,0FAA0F;IAC1F,wBAAwB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAE9E,sFAAsF;IACtF,2BAA2B,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAEpF,8DAA8D;IAC9D,gBAAgB,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE/D,gEAAgE;IAChE,mBAAmB,CAAC,IAAI,EAAE,qBAAqB,EAAE,KAAK,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAE1F;;;;;SAKK;IACL,kBAAkB,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE9D,qDAAqD;IACrD,WAAW,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,8CAA8C;AAC9C,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAYtE;AAMD,8CAA8C;AAC9C,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAEtE"}
|
package/dist/drivers/ls.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { assertNever } from '../util.js';
|
|
2
2
|
|
|
3
|
-
const uploadPrefix =
|
|
4
|
-
const indexPrefix =
|
|
3
|
+
const uploadPrefix = "upload://upload/";
|
|
4
|
+
const indexPrefix = "index://index/";
|
|
5
5
|
function isImportFileHandleUpload(handle) {
|
|
6
6
|
return handle.startsWith(uploadPrefix);
|
|
7
7
|
}
|
|
@@ -23,7 +23,7 @@ function getFilePathFromHandle(handle) {
|
|
|
23
23
|
assertNever(handle);
|
|
24
24
|
}
|
|
25
25
|
function extractFileName(filePath) {
|
|
26
|
-
return filePath.replace(/^.*[\\/]/,
|
|
26
|
+
return filePath.replace(/^.*[\\/]/, "");
|
|
27
27
|
}
|
|
28
28
|
/** Gets a file name from an import handle. */
|
|
29
29
|
function getFileNameFromHandle(handle) {
|
package/dist/drivers/ls.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ls.js","sources":["../../src/drivers/ls.ts"],"sourcesContent":["import { assertNever } from
|
|
1
|
+
{"version":3,"file":"ls.js","sources":["../../src/drivers/ls.ts"],"sourcesContent":["import { assertNever } from \"../util\";\nimport type { Branded } from \"../branding\";\nimport type { TableRange } from \"./pframe\";\nimport type { FileLike } from \"./interfaces\";\n\nconst uploadPrefix = \"upload://upload/\";\nconst indexPrefix = \"index://index/\";\n\nexport type ImportFileHandleUpload = `upload://upload/${string}`;\nexport type ImportFileHandleIndex = `index://index/${string}`;\n\nexport type ImportFileHandle = ImportFileHandleUpload | ImportFileHandleIndex;\n\nexport type LocalImportFileHandle = Branded<ImportFileHandle, \"Local\">;\n\nexport function isImportFileHandleUpload(\n handle: ImportFileHandle,\n): handle is ImportFileHandleUpload {\n return handle.startsWith(uploadPrefix);\n}\n\nexport function isImportFileHandleIndex(handle: ImportFileHandle): handle is ImportFileHandleIndex {\n return handle.startsWith(indexPrefix);\n}\n\n/** Results in upload */\nexport type StorageHandleLocal = `local://${string}`;\n\n/** Results in index */\nexport type StorageHandleRemote = `remote://${string}`;\n\nexport type StorageHandle = StorageHandleLocal | StorageHandleRemote;\n\nexport type StorageEntry = {\n name: string;\n handle: StorageHandle;\n initialFullPath: string;\n\n // TODO\n // pathStartsWithDisk\n};\n\nexport type ListFilesResult = {\n parent?: string;\n entries: LsEntry[];\n};\n\nexport type LsEntry =\n | {\n type: \"dir\";\n name: string;\n fullPath: string;\n }\n | {\n type: \"file\";\n name: string;\n fullPath: string;\n\n /** This handle should be set to args... */\n handle: ImportFileHandle;\n };\n\nexport type OpenDialogFilter = {\n /** Human-readable file type name */\n readonly name: string;\n /** File extensions */\n readonly extensions: string[];\n};\n\nexport type OpenDialogOps = {\n /** Open dialog window title */\n readonly title?: string;\n /** Custom label for the confirmation button, when left empty the default label will be used. */\n readonly buttonLabel?: string;\n /** Limits of file types user can select */\n readonly filters?: OpenDialogFilter[];\n};\n\nexport type OpenSingleFileResponse = {\n /** Contains local file handle, allowing file importing or content reading. If user canceled\n * the dialog, field will be undefined. */\n readonly file?: LocalImportFileHandle;\n};\n\nexport type OpenMultipleFilesResponse = {\n /** Contains local file handles, allowing file importing or content reading. If user canceled\n * the dialog, field will be undefined. */\n readonly files?: LocalImportFileHandle[];\n};\n\n/** Can be used to limit request for local file content to a certain bytes range */\nexport type FileRange = {\n /** From byte index (inclusive) */\n readonly from: number;\n /** To byte index (exclusive) */\n readonly to: number;\n};\n\nexport interface LsDriver {\n /** remote and local storages */\n getStorageList(): Promise<StorageEntry[]>;\n\n listFiles(storage: StorageHandle, fullPath: string): Promise<ListFilesResult>;\n\n /** Opens system file open dialog allowing to select single file and awaits user action */\n showOpenSingleFileDialog(ops: OpenDialogOps): Promise<OpenSingleFileResponse>;\n\n /** Opens system file open dialog allowing to multiple files and awaits user action */\n showOpenMultipleFilesDialog(ops: OpenDialogOps): Promise<OpenMultipleFilesResponse>;\n\n /** Given a handle to a local file, allows to get file size */\n getLocalFileSize(file: LocalImportFileHandle): Promise<number>;\n\n /** Given a handle to a local file, allows to get its content */\n getLocalFileContent(file: LocalImportFileHandle, range?: TableRange): Promise<Uint8Array>;\n\n /**\n * Resolves browser's File object into platforma's import file handle.\n *\n * This method is useful among other things for implementation of UI\n * components, that handle file Drag&Drop.\n * */\n fileToImportHandle(file: FileLike): Promise<ImportFileHandle>;\n\n /** Saves currently opened block webview as a PDF. */\n exportToPdf?(): Promise<void>;\n}\n\n/** Gets a file path from an import handle. */\nexport function getFilePathFromHandle(handle: ImportFileHandle): string {\n if (isImportFileHandleIndex(handle)) {\n const trimmed = handle.slice(indexPrefix.length);\n const data = JSON.parse(decodeURIComponent(trimmed)) as { path: string };\n return data.path;\n } else if (isImportFileHandleUpload(handle)) {\n const trimmed = handle.slice(uploadPrefix.length);\n const data = JSON.parse(decodeURIComponent(trimmed)) as { localPath: string };\n return data.localPath;\n }\n\n assertNever(handle);\n}\n\nfunction extractFileName(filePath: string) {\n return filePath.replace(/^.*[\\\\/]/, \"\");\n}\n\n/** Gets a file name from an import handle. */\nexport function getFileNameFromHandle(handle: ImportFileHandle): string {\n return extractFileName(getFilePathFromHandle(handle));\n}\n"],"names":[],"mappings":";;AAKA,MAAM,YAAY,GAAG,kBAAkB;AACvC,MAAM,WAAW,GAAG,gBAAgB;AAS9B,SAAU,wBAAwB,CACtC,MAAwB,EAAA;AAExB,IAAA,OAAO,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC;AACxC;AAEM,SAAU,uBAAuB,CAAC,MAAwB,EAAA;AAC9D,IAAA,OAAO,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;AACvC;AAyGA;AACM,SAAU,qBAAqB,CAAC,MAAwB,EAAA;AAC5D,IAAA,IAAI,uBAAuB,CAAC,MAAM,CAAC,EAAE;QACnC,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC;QAChD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAqB;QACxE,OAAO,IAAI,CAAC,IAAI;IAClB;AAAO,SAAA,IAAI,wBAAwB,CAAC,MAAM,CAAC,EAAE;QAC3C,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC;QACjD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAA0B;QAC7E,OAAO,IAAI,CAAC,SAAS;IACvB;IAEA,WAAW,CAAC,MAAM,CAAC;AACrB;AAEA,SAAS,eAAe,CAAC,QAAgB,EAAA;IACvC,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;AACzC;AAEA;AACM,SAAU,qBAAqB,CAAC,MAAwB,EAAA;AAC5D,IAAA,OAAO,eAAe,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;AACvD;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ValueType } from
|
|
1
|
+
import type { ValueType } from "./spec/spec";
|
|
2
2
|
/** Allows to search multiple columns in different contexts. */
|
|
3
3
|
export interface ColumnFilter {
|
|
4
4
|
/** Match any of the types listed here. If undefined, will be ignored during
|
|
@@ -9,24 +9,24 @@ var util = require('../../util.cjs');
|
|
|
9
9
|
* @returns True if the value is a valid DataInfo, false otherwise
|
|
10
10
|
*/
|
|
11
11
|
function isDataInfo(value) {
|
|
12
|
-
if (!value || typeof value !==
|
|
12
|
+
if (!value || typeof value !== "object") {
|
|
13
13
|
return false;
|
|
14
14
|
}
|
|
15
15
|
const data = value;
|
|
16
|
-
if (!(
|
|
16
|
+
if (!("type" in data)) {
|
|
17
17
|
return false;
|
|
18
18
|
}
|
|
19
19
|
switch (data.type) {
|
|
20
|
-
case
|
|
21
|
-
return (typeof data.keyLength ===
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
case
|
|
25
|
-
case
|
|
26
|
-
case
|
|
27
|
-
return (typeof data.partitionKeyLength ===
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
case "Json":
|
|
21
|
+
return (typeof data.keyLength === "number" &&
|
|
22
|
+
data.data !== undefined &&
|
|
23
|
+
typeof data.data === "object");
|
|
24
|
+
case "JsonPartitioned":
|
|
25
|
+
case "BinaryPartitioned":
|
|
26
|
+
case "ParquetPartitioned":
|
|
27
|
+
return (typeof data.partitionKeyLength === "number" &&
|
|
28
|
+
data.parts !== undefined &&
|
|
29
|
+
typeof data.parts === "object");
|
|
30
30
|
default:
|
|
31
31
|
return false;
|
|
32
32
|
}
|
|
@@ -36,10 +36,10 @@ function mapDataInfo(dataInfo, mapFn) {
|
|
|
36
36
|
return undefined;
|
|
37
37
|
}
|
|
38
38
|
switch (dataInfo.type) {
|
|
39
|
-
case
|
|
39
|
+
case "Json":
|
|
40
40
|
// Json type doesn't contain blobs, so return as is
|
|
41
41
|
return dataInfo;
|
|
42
|
-
case
|
|
42
|
+
case "JsonPartitioned": {
|
|
43
43
|
// Map each blob in parts
|
|
44
44
|
const newParts = {};
|
|
45
45
|
for (const [key, blob] of Object.entries(dataInfo.parts)) {
|
|
@@ -50,7 +50,7 @@ function mapDataInfo(dataInfo, mapFn) {
|
|
|
50
50
|
parts: newParts,
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
case
|
|
53
|
+
case "BinaryPartitioned": {
|
|
54
54
|
// Map each index and values blob in parts
|
|
55
55
|
const newParts = {};
|
|
56
56
|
for (const [key, chunk] of Object.entries(dataInfo.parts)) {
|
|
@@ -64,7 +64,7 @@ function mapDataInfo(dataInfo, mapFn) {
|
|
|
64
64
|
parts: newParts,
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
case
|
|
67
|
+
case "ParquetPartitioned": {
|
|
68
68
|
// Map each blob in parts
|
|
69
69
|
const newParts = {};
|
|
70
70
|
for (const [key, blob] of Object.entries(dataInfo.parts)) {
|
|
@@ -84,15 +84,15 @@ function mapDataInfo(dataInfo, mapFn) {
|
|
|
84
84
|
*/
|
|
85
85
|
function visitDataInfo(dataInfo, cb) {
|
|
86
86
|
switch (dataInfo.type) {
|
|
87
|
-
case
|
|
87
|
+
case "Json":
|
|
88
88
|
// Json type doesn't contain blobs, so return as is
|
|
89
89
|
break;
|
|
90
|
-
case
|
|
90
|
+
case "JsonPartitioned": {
|
|
91
91
|
// Visit each blob in parts
|
|
92
92
|
Object.values(dataInfo.parts).forEach(cb);
|
|
93
93
|
break;
|
|
94
94
|
}
|
|
95
|
-
case
|
|
95
|
+
case "BinaryPartitioned": {
|
|
96
96
|
// Visit each index and values blob in parts
|
|
97
97
|
Object.values(dataInfo.parts).forEach((chunk) => {
|
|
98
98
|
cb(chunk.index);
|
|
@@ -100,7 +100,7 @@ function visitDataInfo(dataInfo, cb) {
|
|
|
100
100
|
});
|
|
101
101
|
break;
|
|
102
102
|
}
|
|
103
|
-
case
|
|
103
|
+
case "ParquetPartitioned": {
|
|
104
104
|
// Visit each blob in parts
|
|
105
105
|
Object.values(dataInfo.parts).forEach(cb);
|
|
106
106
|
break;
|
|
@@ -114,22 +114,20 @@ function visitDataInfo(dataInfo, cb) {
|
|
|
114
114
|
* @returns True if the value is a valid DataInfoEntries, false otherwise
|
|
115
115
|
*/
|
|
116
116
|
function isDataInfoEntries(value) {
|
|
117
|
-
if (!value || typeof value !==
|
|
117
|
+
if (!value || typeof value !== "object") {
|
|
118
118
|
return false;
|
|
119
119
|
}
|
|
120
120
|
const data = value;
|
|
121
|
-
if (!(
|
|
121
|
+
if (!("type" in data)) {
|
|
122
122
|
return false;
|
|
123
123
|
}
|
|
124
124
|
switch (data.type) {
|
|
125
|
-
case
|
|
126
|
-
return
|
|
127
|
-
|
|
128
|
-
case
|
|
129
|
-
case
|
|
130
|
-
|
|
131
|
-
return (typeof data.partitionKeyLength === 'number'
|
|
132
|
-
&& Array.isArray(data.parts));
|
|
125
|
+
case "Json":
|
|
126
|
+
return typeof data.keyLength === "number" && Array.isArray(data.data);
|
|
127
|
+
case "JsonPartitioned":
|
|
128
|
+
case "BinaryPartitioned":
|
|
129
|
+
case "ParquetPartitioned":
|
|
130
|
+
return typeof data.partitionKeyLength === "number" && Array.isArray(data.parts);
|
|
133
131
|
default:
|
|
134
132
|
return false;
|
|
135
133
|
}
|
|
@@ -145,9 +143,9 @@ function isPartitionedDataInfoEntries(value) {
|
|
|
145
143
|
if (!isDataInfoEntries(value))
|
|
146
144
|
return false;
|
|
147
145
|
switch (value.type) {
|
|
148
|
-
case
|
|
149
|
-
case
|
|
150
|
-
case
|
|
146
|
+
case "JsonPartitioned":
|
|
147
|
+
case "BinaryPartitioned":
|
|
148
|
+
case "ParquetPartitioned":
|
|
151
149
|
return true;
|
|
152
150
|
default:
|
|
153
151
|
return false;
|
|
@@ -161,38 +159,42 @@ function isPartitionedDataInfoEntries(value) {
|
|
|
161
159
|
*/
|
|
162
160
|
function dataInfoToEntries(dataInfo) {
|
|
163
161
|
switch (dataInfo.type) {
|
|
164
|
-
case
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
162
|
+
case "Json":
|
|
163
|
+
return {
|
|
164
|
+
type: "Json",
|
|
165
|
+
keyLength: dataInfo.keyLength,
|
|
166
|
+
data: Object.entries(dataInfo.data).map(([keyStr, value]) => {
|
|
167
|
+
const key = JSON.parse(keyStr);
|
|
168
|
+
return { key, value };
|
|
169
|
+
}),
|
|
170
|
+
};
|
|
171
|
+
case "JsonPartitioned":
|
|
172
|
+
return {
|
|
173
|
+
type: "JsonPartitioned",
|
|
174
|
+
partitionKeyLength: dataInfo.partitionKeyLength,
|
|
175
|
+
parts: Object.entries(dataInfo.parts).map(([keyStr, blob]) => {
|
|
176
|
+
const key = JSON.parse(keyStr);
|
|
177
|
+
return { key, value: blob };
|
|
178
|
+
}),
|
|
179
|
+
};
|
|
180
|
+
case "BinaryPartitioned":
|
|
181
|
+
return {
|
|
182
|
+
type: "BinaryPartitioned",
|
|
183
|
+
partitionKeyLength: dataInfo.partitionKeyLength,
|
|
184
|
+
parts: Object.entries(dataInfo.parts).map(([keyStr, chunk]) => {
|
|
185
|
+
const key = JSON.parse(keyStr);
|
|
186
|
+
return { key, value: chunk };
|
|
187
|
+
}),
|
|
188
|
+
};
|
|
189
|
+
case "ParquetPartitioned":
|
|
190
|
+
return {
|
|
191
|
+
type: "ParquetPartitioned",
|
|
192
|
+
partitionKeyLength: dataInfo.partitionKeyLength,
|
|
193
|
+
parts: Object.entries(dataInfo.parts).map(([keyStr, blob]) => {
|
|
194
|
+
const key = JSON.parse(keyStr);
|
|
195
|
+
return { key, value: blob };
|
|
196
|
+
}),
|
|
197
|
+
};
|
|
196
198
|
default:
|
|
197
199
|
util.assertNever(dataInfo);
|
|
198
200
|
}
|
|
@@ -205,26 +207,30 @@ function dataInfoToEntries(dataInfo) {
|
|
|
205
207
|
*/
|
|
206
208
|
function entriesToDataInfo(dataInfoEntries) {
|
|
207
209
|
switch (dataInfoEntries.type) {
|
|
208
|
-
case
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
210
|
+
case "Json":
|
|
211
|
+
return {
|
|
212
|
+
type: "Json",
|
|
213
|
+
keyLength: dataInfoEntries.keyLength,
|
|
214
|
+
data: Object.fromEntries(dataInfoEntries.data.map(({ key, value }) => [JSON.stringify(key), value])),
|
|
215
|
+
};
|
|
216
|
+
case "JsonPartitioned":
|
|
217
|
+
return {
|
|
218
|
+
type: "JsonPartitioned",
|
|
219
|
+
partitionKeyLength: dataInfoEntries.partitionKeyLength,
|
|
220
|
+
parts: Object.fromEntries(dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value])),
|
|
221
|
+
};
|
|
222
|
+
case "BinaryPartitioned":
|
|
223
|
+
return {
|
|
224
|
+
type: "BinaryPartitioned",
|
|
225
|
+
partitionKeyLength: dataInfoEntries.partitionKeyLength,
|
|
226
|
+
parts: Object.fromEntries(dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value])),
|
|
227
|
+
};
|
|
228
|
+
case "ParquetPartitioned":
|
|
229
|
+
return {
|
|
230
|
+
type: "ParquetPartitioned",
|
|
231
|
+
partitionKeyLength: dataInfoEntries.partitionKeyLength,
|
|
232
|
+
parts: Object.fromEntries(dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value])),
|
|
233
|
+
};
|
|
228
234
|
default:
|
|
229
235
|
util.assertNever(dataInfoEntries);
|
|
230
236
|
}
|
|
@@ -234,33 +240,36 @@ function mapDataInfoEntries(dataInfoEntries, mapFn) {
|
|
|
234
240
|
return undefined;
|
|
235
241
|
}
|
|
236
242
|
switch (dataInfoEntries.type) {
|
|
237
|
-
case
|
|
243
|
+
case "Json":
|
|
238
244
|
// Json type doesn't contain blobs, so return as is
|
|
239
245
|
return dataInfoEntries;
|
|
240
|
-
case
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
246
|
+
case "JsonPartitioned":
|
|
247
|
+
return {
|
|
248
|
+
...dataInfoEntries,
|
|
249
|
+
parts: dataInfoEntries.parts.map((entry) => ({
|
|
250
|
+
key: entry.key,
|
|
251
|
+
value: mapFn(entry.value),
|
|
252
|
+
})),
|
|
253
|
+
};
|
|
254
|
+
case "BinaryPartitioned":
|
|
255
|
+
return {
|
|
256
|
+
...dataInfoEntries,
|
|
257
|
+
parts: dataInfoEntries.parts.map((entry) => ({
|
|
258
|
+
key: entry.key,
|
|
259
|
+
value: {
|
|
260
|
+
index: mapFn(entry.value.index),
|
|
261
|
+
values: mapFn(entry.value.values),
|
|
262
|
+
},
|
|
263
|
+
})),
|
|
264
|
+
};
|
|
265
|
+
case "ParquetPartitioned":
|
|
266
|
+
return {
|
|
267
|
+
...dataInfoEntries,
|
|
268
|
+
parts: dataInfoEntries.parts.map((entry) => ({
|
|
269
|
+
key: entry.key,
|
|
270
|
+
value: mapFn(entry.value),
|
|
271
|
+
})),
|
|
272
|
+
};
|
|
264
273
|
}
|
|
265
274
|
}
|
|
266
275
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data_info.cjs","sources":["../../../src/drivers/pframe/data_info.ts"],"sourcesContent":["import { assertNever } from '../../util';\n\n/**\n * Represents a JavaScript representation of a value in a PColumn. Can be null, a number, or a string.\n * These are the primitive types that can be stored directly in PColumns.\n *\n * Note: Actual columns can hold more value types, which are converted to these JavaScript types\n * once they enter the JavaScript runtime.\n */\nexport type PColumnValue = null | number | string;\n\n/**\n * Represents a key for a PColumn value.\n * Can be an array of strings or numbers.\n */\nexport type PColumnKey = (number | string)[];\n\n/**\n * Represents a single entry in a PColumn's data structure.\n * Contains a key and a value.\n */\nexport type PColumnDataEntry<T> = {\n /** Key for the value */\n key: PColumnKey;\n\n /** Value / blob at the given key */\n value: T;\n};\n\n/**\n * Represents column data stored as a simple JSON structure.\n * Used for small datasets that can be efficiently stored directly in memory.\n */\nexport type JsonDataInfo = {\n /** Identifier for this data format ('Json') */\n type: 'Json';\n\n /** Number of axes that make up the complete key (tuple length) */\n keyLength: number;\n\n /**\n * Key-value pairs where keys are stringified tuples of axis values\n * and values are the column values for those coordinates\n */\n data: Record<string, PColumnValue>;\n};\n\n/**\n * Represents column data partitioned across multiple JSON blobs.\n * Used for larger datasets that need to be split into manageable chunks.\n */\nexport type JsonPartitionedDataInfo<Blob> = {\n /** Identifier for this data format ('JsonPartitioned') */\n type: 'JsonPartitioned';\n\n /** Number of leading axes used for partitioning */\n partitionKeyLength: number;\n\n /** Map of stringified partition keys to blob references */\n parts: Record<string, Blob>;\n};\n\n/**\n * Represents a binary format chunk containing index and values as separate blobs.\n * Used for efficient storage and retrieval of column data in binary format.\n */\nexport type BinaryChunk<Blob> = {\n /** Binary blob containing structured index information */\n index: Blob;\n\n /** Binary blob containing the actual values */\n values: Blob;\n};\n\n/**\n * Represents column data partitioned across multiple binary chunks.\n * Optimized for efficient storage and retrieval of large datasets.\n */\nexport type BinaryPartitionedDataInfo<Blob> = {\n /** Identifier for this data format ('BinaryPartitioned') */\n type: 'BinaryPartitioned';\n\n /** Number of leading axes used for partitioning */\n partitionKeyLength: number;\n\n /** Map of stringified partition keys to binary chunks */\n parts: Record<string, BinaryChunk<Blob>>;\n};\n\nexport type ParquetChunkMappingAxis = {\n /** Data type (matches PColumn axis types) */\n type: 'Int' | 'Long' | 'String';\n\n /** Field name in the Parquet file */\n id: string;\n};\n\nexport type ParquetChunkMappingColumn = {\n /** Data type (matches PColumn value type) */\n type: 'Int' | 'Long' | 'Float' | 'Double' | 'String';\n\n /** Field name in the Parquet file */\n id: string;\n};\n\nexport type ParquetChunkMapping = {\n /** Axes mappings - Parquet file is sorted by these fields in this order */\n axes: ParquetChunkMappingAxis[];\n\n /** Column mapping */\n column: ParquetChunkMappingColumn;\n};\n\nexport type ParquetChunkStats = {\n /** Number of rows in the chunk */\n numberOfRows: number;\n /** Byte size information for storage optimization and query planning */\n size: {\n /** Byte sizes for each axis column in the same order as axes mapping */\n axes: number[];\n /** Byte size for the data column */\n column: number;\n };\n};\n\nexport type ParquetChunkMetadata = {\n /** Content hash calculated for the specific axes and data this chunk represents */\n dataDigest: string;\n\n /** Pre-computed statistics for optimization without blob download */\n stats: Partial<ParquetChunkStats>;\n};\n\nexport type ParquetChunk<Blob> = {\n /** Parquet file (PTable) containing column data */\n data: Blob;\n} & ParquetChunkMapping & Partial<ParquetChunkMetadata>;\n\nexport type ParquetPartitionedDataInfo<Blob> = {\n /** Identifier for this data format ('ParquetPartitioned') */\n type: 'ParquetPartitioned';\n\n /** Number of leading axes used for partitioning */\n partitionKeyLength: number;\n\n /** Map of stringified partition keys to parquet files */\n parts: Record<string, Blob>;\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<Blob>;\n\n/**\n * Type guard function that checks if the given value is a valid DataInfo.\n *\n * @param value - The value to check\n * @returns True if the value is a valid DataInfo, false otherwise\n */\nexport function isDataInfo<Blob>(value: unknown): value is DataInfo<Blob> {\n if (!value || typeof value !== 'object') {\n return false;\n }\n\n const data = value as Record<string, unknown>;\n if (!('type' in data)) {\n return false;\n }\n\n switch (data.type) {\n case 'Json':\n return (\n typeof data.keyLength === 'number'\n && data.data !== undefined\n && typeof data.data === 'object'\n );\n case 'JsonPartitioned':\n case 'BinaryPartitioned':\n case 'ParquetPartitioned':\n return (\n typeof data.partitionKeyLength === 'number'\n && data.parts !== undefined\n && typeof data.parts === 'object'\n );\n default:\n return false;\n }\n}\n\n/**\n * Maps blob references in a DataInfo object from one type to another using a mapping function.\n *\n * @template B1 - Source blob type\n * @template B2 - Target blob type\n * @param dataInfo - The source DataInfo object\n * @param mapFn - Function to transform blobs from type B1 to type B2\n * @returns A new DataInfo object with transformed blob references\n */\nexport function mapDataInfo<B1, B2>(\n dataInfo: ParquetPartitionedDataInfo<B1>,\n mapFn: (blob: B1) => B2,\n): ParquetPartitionedDataInfo<B2>;\nexport function mapDataInfo<B1, B2>(\n dataInfo: Exclude<DataInfo<B1>, ParquetPartitionedDataInfo<B1>>,\n mapFn: (blob: B1) => B2,\n): Exclude<DataInfo<B2>, ParquetPartitionedDataInfo<B2>>;\nexport function mapDataInfo<B1, B2>(\n dataInfo: DataInfo<B1>,\n mapFn: (blob: B1) => B2,\n): DataInfo<B2>;\nexport function mapDataInfo<B1, B2>(\n dataInfo: DataInfo<B1> | undefined,\n mapFn: (blob: B1) => B2,\n): DataInfo<B2> | undefined {\n if (dataInfo === undefined) {\n return undefined;\n }\n\n switch (dataInfo.type) {\n case 'Json':\n // Json type doesn't contain blobs, so return as is\n return dataInfo;\n case 'JsonPartitioned': {\n // Map each blob in parts\n const newParts: Record<string, B2> = {};\n for (const [key, blob] of Object.entries(dataInfo.parts)) {\n newParts[key] = mapFn(blob);\n }\n return {\n ...dataInfo,\n parts: newParts,\n };\n }\n case 'BinaryPartitioned': {\n // Map each index and values blob in parts\n const newParts: Record<string, BinaryChunk<B2>> = {};\n for (const [key, chunk] of Object.entries(dataInfo.parts)) {\n newParts[key] = {\n index: mapFn(chunk.index),\n values: mapFn(chunk.values),\n };\n }\n return {\n ...dataInfo,\n parts: newParts,\n };\n }\n case 'ParquetPartitioned': {\n // Map each blob in parts\n const newParts: Record<string, B2> = {};\n for (const [key, blob] of Object.entries(dataInfo.parts)) {\n newParts[key] = mapFn(blob);\n }\n return {\n ...dataInfo,\n parts: newParts,\n };\n }\n }\n}\n\n/**\n * @param dataInfo - The source DataInfo object\n * @param cb - Callback, function that have access to every blob to visit them all\n * @returns Nothing\n */\nexport function visitDataInfo<B>(\n dataInfo: DataInfo<B>,\n cb: (blob: B) => void,\n): void {\n switch (dataInfo.type) {\n case 'Json':\n // Json type doesn't contain blobs, so return as is\n break;\n case 'JsonPartitioned': {\n // Visit each blob in parts\n Object.values(dataInfo.parts).forEach(cb);\n break;\n }\n case 'BinaryPartitioned': {\n // Visit each index and values blob in parts\n Object.values(dataInfo.parts).forEach((chunk) => {\n cb(chunk.index);\n cb(chunk.values);\n });\n break;\n }\n case 'ParquetPartitioned': {\n // Visit each blob in parts\n Object.values(dataInfo.parts).forEach(cb);\n break;\n }\n }\n}\n\n//\n// Lightway representation for ExplicitJsonData\n//\n\n/**\n * Represents a single key-value entry in a column's explicit data structure.\n * Used when directly instantiating PColumns with explicit data.\n */\nexport type PColumnValuesEntry = {\n key: PColumnKey;\n val: PColumnValue;\n};\n\n/**\n * Array of key-value entries representing explicit column data.\n * Used for lightweight explicit instantiation of PColumns.\n */\nexport type PColumnValues = PColumnValuesEntry[];\n\n/**\n * Entry-based representation of JsonDataInfo\n */\nexport interface JsonDataInfoEntries {\n type: 'Json';\n keyLength: number;\n data: PColumnDataEntry<PColumnValue>[];\n}\n\n/**\n * Entry-based representation of JsonPartitionedDataInfo\n */\nexport interface JsonPartitionedDataInfoEntries<Blob> {\n type: 'JsonPartitioned';\n partitionKeyLength: number;\n parts: PColumnDataEntry<Blob>[];\n}\n\n/**\n * Entry-based representation of BinaryPartitionedDataInfo\n */\nexport interface BinaryPartitionedDataInfoEntries<Blob> {\n type: 'BinaryPartitioned';\n partitionKeyLength: number;\n parts: PColumnDataEntry<BinaryChunk<Blob>>[];\n}\n\n/**\n * Entry-based representation of ParquetPartitionedDataInfo\n */\nexport interface ParquetPartitionedDataInfoEntries<Blob> {\n type: 'ParquetPartitioned';\n partitionKeyLength: number;\n parts: PColumnDataEntry<Blob>[];\n}\n/**\n * Union type representing all possible entry-based partitioned data storage formats\n */\nexport type PartitionedDataInfoEntries<Blob> =\n | JsonPartitionedDataInfoEntries<Blob>\n | BinaryPartitionedDataInfoEntries<Blob>\n | ParquetPartitionedDataInfoEntries<Blob>;\n\n/**\n * Union type representing all possible entry-based data storage formats\n */\nexport type DataInfoEntries<Blob> =\n | JsonDataInfoEntries\n | PartitionedDataInfoEntries<Blob>;\n\n/**\n * Type guard function that checks if the given value is a valid DataInfoEntries.\n *\n * @param value - The value to check\n * @returns True if the value is a valid DataInfoEntries, false otherwise\n */\nexport function isDataInfoEntries<Blob>(value: unknown): value is DataInfoEntries<Blob> {\n if (!value || typeof value !== 'object') {\n return false;\n }\n\n const data = value as Record<string, unknown>;\n if (!('type' in data)) {\n return false;\n }\n\n switch (data.type) {\n case 'Json':\n return (\n typeof data.keyLength === 'number'\n && Array.isArray(data.data)\n );\n case 'JsonPartitioned':\n case 'BinaryPartitioned':\n case 'ParquetPartitioned':\n return (\n typeof data.partitionKeyLength === 'number'\n && Array.isArray(data.parts)\n );\n default:\n return false;\n }\n}\n\n/**\n * Type guard function that checks if the given value is a valid PartitionedDataInfoEntries.\n *\n * @template Blob - Type parameter representing the storage reference type\n * @param value - The value to check\n * @returns True if the value is a valid PartitionedDataInfoEntries, false otherwise\n */\nexport function isPartitionedDataInfoEntries<Blob>(value: unknown): value is PartitionedDataInfoEntries<Blob> {\n if (!isDataInfoEntries(value)) return false;\n switch (value.type) {\n case 'JsonPartitioned':\n case 'BinaryPartitioned':\n case 'ParquetPartitioned':\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Converts DataInfo to DataInfoEntries\n *\n * @param dataInfo - The record-based DataInfo object\n * @returns The equivalent entry-based DataInfoEntries object\n */\nexport function dataInfoToEntries<Blob>(dataInfo: DataInfo<Blob>): DataInfoEntries<Blob> {\n switch (dataInfo.type) {\n case 'Json': return {\n type: 'Json',\n keyLength: dataInfo.keyLength,\n data: Object.entries(dataInfo.data).map(([keyStr, value]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value } as PColumnDataEntry<PColumnValue>;\n }),\n };\n case 'JsonPartitioned': return {\n type: 'JsonPartitioned',\n partitionKeyLength: dataInfo.partitionKeyLength,\n parts: Object.entries(dataInfo.parts).map(([keyStr, blob]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value: blob } as PColumnDataEntry<Blob>;\n }),\n };\n case 'BinaryPartitioned': return {\n type: 'BinaryPartitioned',\n partitionKeyLength: dataInfo.partitionKeyLength,\n parts: Object.entries(dataInfo.parts).map(([keyStr, chunk]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value: chunk } as PColumnDataEntry<BinaryChunk<Blob>>;\n }),\n };\n case 'ParquetPartitioned': return {\n type: 'ParquetPartitioned',\n partitionKeyLength: dataInfo.partitionKeyLength,\n parts: Object.entries(dataInfo.parts).map(([keyStr, blob]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value: blob } as PColumnDataEntry<Blob>;\n }),\n };\n default:\n assertNever(dataInfo);\n }\n}\n\n/**\n * Converts DataInfoEntries to DataInfo\n *\n * @param dataInfoEntries - The entry-based DataInfoEntries object\n * @returns The equivalent record-based DataInfo object\n */\nexport function entriesToDataInfo<Blob>(dataInfoEntries: DataInfoEntries<Blob>): DataInfo<Blob> {\n switch (dataInfoEntries.type) {\n case 'Json': return {\n type: 'Json',\n keyLength: dataInfoEntries.keyLength,\n data: Object.fromEntries(\n dataInfoEntries.data.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n case 'JsonPartitioned': return {\n type: 'JsonPartitioned',\n partitionKeyLength: dataInfoEntries.partitionKeyLength,\n parts: Object.fromEntries(\n dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n case 'BinaryPartitioned': return {\n type: 'BinaryPartitioned',\n partitionKeyLength: dataInfoEntries.partitionKeyLength,\n parts: Object.fromEntries(\n dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n case 'ParquetPartitioned': return {\n type: 'ParquetPartitioned',\n partitionKeyLength: dataInfoEntries.partitionKeyLength,\n parts: Object.fromEntries(\n dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n default:\n assertNever(dataInfoEntries);\n }\n}\n\n/**\n * Maps blob references in a DataInfoEntries object from one type to another using a mapping function.\n *\n * @template B1 - Source blob type\n * @template B2 - Target blob type\n * @param dataInfoEntries - The source DataInfoEntries object\n * @param mapFn - Function to transform blobs from type B1 to type B2\n * @returns A new DataInfoEntries object with transformed blob references\n */\nexport function mapDataInfoEntries<B1, B2>(\n dataInfoEntries: DataInfoEntries<B1>,\n mapFn: (blob: B1) => B2,\n): DataInfoEntries<B2>;\nexport function mapDataInfoEntries<B1, B2>(\n dataInfoEntries: DataInfoEntries<B1> | undefined,\n mapFn: (blob: B1) => B2,\n): DataInfoEntries<B2> | undefined {\n if (dataInfoEntries === undefined) {\n return undefined;\n }\n\n switch (dataInfoEntries.type) {\n case 'Json':\n // Json type doesn't contain blobs, so return as is\n return dataInfoEntries;\n case 'JsonPartitioned': return {\n ...dataInfoEntries,\n parts: dataInfoEntries.parts.map((entry) => ({\n key: entry.key,\n value: mapFn(entry.value),\n })),\n };\n case 'BinaryPartitioned': return {\n ...dataInfoEntries,\n parts: dataInfoEntries.parts.map((entry) => ({\n key: entry.key,\n value: {\n index: mapFn(entry.value.index),\n values: mapFn(entry.value.values),\n },\n })),\n };\n case 'ParquetPartitioned': return {\n ...dataInfoEntries,\n parts: dataInfoEntries.parts.map((entry) => ({\n key: entry.key,\n value: mapFn(entry.value),\n })),\n };\n }\n}\n"],"names":["assertNever"],"mappings":";;;;AAiKA;;;;;AAKG;AACG,SAAU,UAAU,CAAO,KAAc,EAAA;IAC7C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACvC,QAAA,OAAO,KAAK;IACd;IAEA,MAAM,IAAI,GAAG,KAAgC;AAC7C,IAAA,IAAI,EAAE,MAAM,IAAI,IAAI,CAAC,EAAE;AACrB,QAAA,OAAO,KAAK;IACd;AAEA,IAAA,QAAQ,IAAI,CAAC,IAAI;AACf,QAAA,KAAK,MAAM;AACT,YAAA,QACE,OAAO,IAAI,CAAC,SAAS,KAAK;mBACvB,IAAI,CAAC,IAAI,KAAK;AACd,mBAAA,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ;AAEpC,QAAA,KAAK,iBAAiB;AACtB,QAAA,KAAK,mBAAmB;AACxB,QAAA,KAAK,oBAAoB;AACvB,YAAA,QACE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\"../../util\";\n\n/**\n * Represents a JavaScript representation of a value in a PColumn. Can be null, a number, or a string.\n * These are the primitive types that can be stored directly in PColumns.\n *\n * Note: Actual columns can hold more value types, which are converted to these JavaScript types\n * once they enter the JavaScript runtime.\n */\nexport type PColumnValue = null | number | string;\n\n/**\n * Represents a key for a PColumn value.\n * Can be an array of strings or numbers.\n */\nexport type PColumnKey = (number | string)[];\n\n/**\n * Represents a single entry in a PColumn's data structure.\n * Contains a key and a value.\n */\nexport type PColumnDataEntry<T> = {\n /** Key for the value */\n key: PColumnKey;\n\n /** Value / blob at the given key */\n value: T;\n};\n\n/**\n * Represents column data stored as a simple JSON structure.\n * Used for small datasets that can be efficiently stored directly in memory.\n */\nexport type JsonDataInfo = {\n /** Identifier for this data format ('Json') */\n type: \"Json\";\n\n /** Number of axes that make up the complete key (tuple length) */\n keyLength: number;\n\n /**\n * Key-value pairs where keys are stringified tuples of axis values\n * and values are the column values for those coordinates\n */\n data: Record<string, PColumnValue>;\n};\n\n/**\n * Represents column data partitioned across multiple JSON blobs.\n * Used for larger datasets that need to be split into manageable chunks.\n */\nexport type JsonPartitionedDataInfo<Blob> = {\n /** Identifier for this data format ('JsonPartitioned') */\n type: \"JsonPartitioned\";\n\n /** Number of leading axes used for partitioning */\n partitionKeyLength: number;\n\n /** Map of stringified partition keys to blob references */\n parts: Record<string, Blob>;\n};\n\n/**\n * Represents a binary format chunk containing index and values as separate blobs.\n * Used for efficient storage and retrieval of column data in binary format.\n */\nexport type BinaryChunk<Blob> = {\n /** Binary blob containing structured index information */\n index: Blob;\n\n /** Binary blob containing the actual values */\n values: Blob;\n};\n\n/**\n * Represents column data partitioned across multiple binary chunks.\n * Optimized for efficient storage and retrieval of large datasets.\n */\nexport type BinaryPartitionedDataInfo<Blob> = {\n /** Identifier for this data format ('BinaryPartitioned') */\n type: \"BinaryPartitioned\";\n\n /** Number of leading axes used for partitioning */\n partitionKeyLength: number;\n\n /** Map of stringified partition keys to binary chunks */\n parts: Record<string, BinaryChunk<Blob>>;\n};\n\nexport type ParquetChunkMappingAxis = {\n /** Data type (matches PColumn axis types) */\n type: \"Int\" | \"Long\" | \"String\";\n\n /** Field name in the Parquet file */\n id: string;\n};\n\nexport type ParquetChunkMappingColumn = {\n /** Data type (matches PColumn value type) */\n type: \"Int\" | \"Long\" | \"Float\" | \"Double\" | \"String\";\n\n /** Field name in the Parquet file */\n id: string;\n};\n\nexport type ParquetChunkMapping = {\n /** Axes mappings - Parquet file is sorted by these fields in this order */\n axes: ParquetChunkMappingAxis[];\n\n /** Column mapping */\n column: ParquetChunkMappingColumn;\n};\n\nexport type ParquetChunkStats = {\n /** Number of rows in the chunk */\n numberOfRows: number;\n /** Byte size information for storage optimization and query planning */\n size: {\n /** Byte sizes for each axis column in the same order as axes mapping */\n axes: number[];\n /** Byte size for the data column */\n column: number;\n };\n};\n\nexport type ParquetChunkMetadata = {\n /** Content hash calculated for the specific axes and data this chunk represents */\n dataDigest: string;\n\n /** Pre-computed statistics for optimization without blob download */\n stats: Partial<ParquetChunkStats>;\n};\n\nexport type ParquetChunk<Blob> = {\n /** Parquet file (PTable) containing column data */\n data: Blob;\n} & ParquetChunkMapping &\n Partial<ParquetChunkMetadata>;\n\nexport type ParquetPartitionedDataInfo<Blob> = {\n /** Identifier for this data format ('ParquetPartitioned') */\n type: \"ParquetPartitioned\";\n\n /** Number of leading axes used for partitioning */\n partitionKeyLength: number;\n\n /** Map of stringified partition keys to parquet files */\n parts: Record<string, Blob>;\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<Blob>;\n\n/**\n * Type guard function that checks if the given value is a valid DataInfo.\n *\n * @param value - The value to check\n * @returns True if the value is a valid DataInfo, false otherwise\n */\nexport function isDataInfo<Blob>(value: unknown): value is DataInfo<Blob> {\n if (!value || typeof value !== \"object\") {\n return false;\n }\n\n const data = value as Record<string, unknown>;\n if (!(\"type\" in data)) {\n return false;\n }\n\n switch (data.type) {\n case \"Json\":\n return (\n typeof data.keyLength === \"number\" &&\n data.data !== undefined &&\n typeof data.data === \"object\"\n );\n case \"JsonPartitioned\":\n case \"BinaryPartitioned\":\n case \"ParquetPartitioned\":\n return (\n typeof data.partitionKeyLength === \"number\" &&\n data.parts !== undefined &&\n typeof data.parts === \"object\"\n );\n default:\n return false;\n }\n}\n\n/**\n * Maps blob references in a DataInfo object from one type to another using a mapping function.\n *\n * @template B1 - Source blob type\n * @template B2 - Target blob type\n * @param dataInfo - The source DataInfo object\n * @param mapFn - Function to transform blobs from type B1 to type B2\n * @returns A new DataInfo object with transformed blob references\n */\nexport function mapDataInfo<B1, B2>(\n dataInfo: ParquetPartitionedDataInfo<B1>,\n mapFn: (blob: B1) => B2,\n): ParquetPartitionedDataInfo<B2>;\nexport function mapDataInfo<B1, B2>(\n dataInfo: Exclude<DataInfo<B1>, ParquetPartitionedDataInfo<B1>>,\n mapFn: (blob: B1) => B2,\n): Exclude<DataInfo<B2>, ParquetPartitionedDataInfo<B2>>;\nexport function mapDataInfo<B1, B2>(dataInfo: DataInfo<B1>, mapFn: (blob: B1) => B2): DataInfo<B2>;\nexport function mapDataInfo<B1, B2>(\n dataInfo: DataInfo<B1> | undefined,\n mapFn: (blob: B1) => B2,\n): DataInfo<B2> | undefined {\n if (dataInfo === undefined) {\n return undefined;\n }\n\n switch (dataInfo.type) {\n case \"Json\":\n // Json type doesn't contain blobs, so return as is\n return dataInfo;\n case \"JsonPartitioned\": {\n // Map each blob in parts\n const newParts: Record<string, B2> = {};\n for (const [key, blob] of Object.entries(dataInfo.parts)) {\n newParts[key] = mapFn(blob);\n }\n return {\n ...dataInfo,\n parts: newParts,\n };\n }\n case \"BinaryPartitioned\": {\n // Map each index and values blob in parts\n const newParts: Record<string, BinaryChunk<B2>> = {};\n for (const [key, chunk] of Object.entries(dataInfo.parts)) {\n newParts[key] = {\n index: mapFn(chunk.index),\n values: mapFn(chunk.values),\n };\n }\n return {\n ...dataInfo,\n parts: newParts,\n };\n }\n case \"ParquetPartitioned\": {\n // Map each blob in parts\n const newParts: Record<string, B2> = {};\n for (const [key, blob] of Object.entries(dataInfo.parts)) {\n newParts[key] = mapFn(blob);\n }\n return {\n ...dataInfo,\n parts: newParts,\n };\n }\n }\n}\n\n/**\n * @param dataInfo - The source DataInfo object\n * @param cb - Callback, function that have access to every blob to visit them all\n * @returns Nothing\n */\nexport function visitDataInfo<B>(dataInfo: DataInfo<B>, cb: (blob: B) => void): void {\n switch (dataInfo.type) {\n case \"Json\":\n // Json type doesn't contain blobs, so return as is\n break;\n case \"JsonPartitioned\": {\n // Visit each blob in parts\n Object.values(dataInfo.parts).forEach(cb);\n break;\n }\n case \"BinaryPartitioned\": {\n // Visit each index and values blob in parts\n Object.values(dataInfo.parts).forEach((chunk) => {\n cb(chunk.index);\n cb(chunk.values);\n });\n break;\n }\n case \"ParquetPartitioned\": {\n // Visit each blob in parts\n Object.values(dataInfo.parts).forEach(cb);\n break;\n }\n }\n}\n\n//\n// Lightway representation for ExplicitJsonData\n//\n\n/**\n * Represents a single key-value entry in a column's explicit data structure.\n * Used when directly instantiating PColumns with explicit data.\n */\nexport type PColumnValuesEntry = {\n key: PColumnKey;\n val: PColumnValue;\n};\n\n/**\n * Array of key-value entries representing explicit column data.\n * Used for lightweight explicit instantiation of PColumns.\n */\nexport type PColumnValues = PColumnValuesEntry[];\n\n/**\n * Entry-based representation of JsonDataInfo\n */\nexport interface JsonDataInfoEntries {\n type: \"Json\";\n keyLength: number;\n data: PColumnDataEntry<PColumnValue>[];\n}\n\n/**\n * Entry-based representation of JsonPartitionedDataInfo\n */\nexport interface JsonPartitionedDataInfoEntries<Blob> {\n type: \"JsonPartitioned\";\n partitionKeyLength: number;\n parts: PColumnDataEntry<Blob>[];\n}\n\n/**\n * Entry-based representation of BinaryPartitionedDataInfo\n */\nexport interface BinaryPartitionedDataInfoEntries<Blob> {\n type: \"BinaryPartitioned\";\n partitionKeyLength: number;\n parts: PColumnDataEntry<BinaryChunk<Blob>>[];\n}\n\n/**\n * Entry-based representation of ParquetPartitionedDataInfo\n */\nexport interface ParquetPartitionedDataInfoEntries<Blob> {\n type: \"ParquetPartitioned\";\n partitionKeyLength: number;\n parts: PColumnDataEntry<Blob>[];\n}\n/**\n * Union type representing all possible entry-based partitioned data storage formats\n */\nexport type PartitionedDataInfoEntries<Blob> =\n | JsonPartitionedDataInfoEntries<Blob>\n | BinaryPartitionedDataInfoEntries<Blob>\n | ParquetPartitionedDataInfoEntries<Blob>;\n\n/**\n * Union type representing all possible entry-based data storage formats\n */\nexport type DataInfoEntries<Blob> = JsonDataInfoEntries | PartitionedDataInfoEntries<Blob>;\n\n/**\n * Type guard function that checks if the given value is a valid DataInfoEntries.\n *\n * @param value - The value to check\n * @returns True if the value is a valid DataInfoEntries, false otherwise\n */\nexport function isDataInfoEntries<Blob>(value: unknown): value is DataInfoEntries<Blob> {\n if (!value || typeof value !== \"object\") {\n return false;\n }\n\n const data = value as Record<string, unknown>;\n if (!(\"type\" in data)) {\n return false;\n }\n\n switch (data.type) {\n case \"Json\":\n return typeof data.keyLength === \"number\" && Array.isArray(data.data);\n case \"JsonPartitioned\":\n case \"BinaryPartitioned\":\n case \"ParquetPartitioned\":\n return typeof data.partitionKeyLength === \"number\" && Array.isArray(data.parts);\n default:\n return false;\n }\n}\n\n/**\n * Type guard function that checks if the given value is a valid PartitionedDataInfoEntries.\n *\n * @template Blob - Type parameter representing the storage reference type\n * @param value - The value to check\n * @returns True if the value is a valid PartitionedDataInfoEntries, false otherwise\n */\nexport function isPartitionedDataInfoEntries<Blob>(\n value: unknown,\n): value is PartitionedDataInfoEntries<Blob> {\n if (!isDataInfoEntries(value)) return false;\n switch (value.type) {\n case \"JsonPartitioned\":\n case \"BinaryPartitioned\":\n case \"ParquetPartitioned\":\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Converts DataInfo to DataInfoEntries\n *\n * @param dataInfo - The record-based DataInfo object\n * @returns The equivalent entry-based DataInfoEntries object\n */\nexport function dataInfoToEntries<Blob>(dataInfo: DataInfo<Blob>): DataInfoEntries<Blob> {\n switch (dataInfo.type) {\n case \"Json\":\n return {\n type: \"Json\",\n keyLength: dataInfo.keyLength,\n data: Object.entries(dataInfo.data).map(([keyStr, value]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value } as PColumnDataEntry<PColumnValue>;\n }),\n };\n case \"JsonPartitioned\":\n return {\n type: \"JsonPartitioned\",\n partitionKeyLength: dataInfo.partitionKeyLength,\n parts: Object.entries(dataInfo.parts).map(([keyStr, blob]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value: blob } as PColumnDataEntry<Blob>;\n }),\n };\n case \"BinaryPartitioned\":\n return {\n type: \"BinaryPartitioned\",\n partitionKeyLength: dataInfo.partitionKeyLength,\n parts: Object.entries(dataInfo.parts).map(([keyStr, chunk]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value: chunk } as PColumnDataEntry<BinaryChunk<Blob>>;\n }),\n };\n case \"ParquetPartitioned\":\n return {\n type: \"ParquetPartitioned\",\n partitionKeyLength: dataInfo.partitionKeyLength,\n parts: Object.entries(dataInfo.parts).map(([keyStr, blob]) => {\n const key = JSON.parse(keyStr) as PColumnKey;\n return { key, value: blob } as PColumnDataEntry<Blob>;\n }),\n };\n default:\n assertNever(dataInfo);\n }\n}\n\n/**\n * Converts DataInfoEntries to DataInfo\n *\n * @param dataInfoEntries - The entry-based DataInfoEntries object\n * @returns The equivalent record-based DataInfo object\n */\nexport function entriesToDataInfo<Blob>(dataInfoEntries: DataInfoEntries<Blob>): DataInfo<Blob> {\n switch (dataInfoEntries.type) {\n case \"Json\":\n return {\n type: \"Json\",\n keyLength: dataInfoEntries.keyLength,\n data: Object.fromEntries(\n dataInfoEntries.data.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n case \"JsonPartitioned\":\n return {\n type: \"JsonPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength,\n parts: Object.fromEntries(\n dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n case \"BinaryPartitioned\":\n return {\n type: \"BinaryPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength,\n parts: Object.fromEntries(\n dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n case \"ParquetPartitioned\":\n return {\n type: \"ParquetPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength,\n parts: Object.fromEntries(\n dataInfoEntries.parts.map(({ key, value }) => [JSON.stringify(key), value]),\n ),\n };\n default:\n assertNever(dataInfoEntries);\n }\n}\n\n/**\n * Maps blob references in a DataInfoEntries object from one type to another using a mapping function.\n *\n * @template B1 - Source blob type\n * @template B2 - Target blob type\n * @param dataInfoEntries - The source DataInfoEntries object\n * @param mapFn - Function to transform blobs from type B1 to type B2\n * @returns A new DataInfoEntries object with transformed blob references\n */\nexport function mapDataInfoEntries<B1, B2>(\n dataInfoEntries: DataInfoEntries<B1>,\n mapFn: (blob: B1) => B2,\n): DataInfoEntries<B2>;\nexport function mapDataInfoEntries<B1, B2>(\n dataInfoEntries: DataInfoEntries<B1> | undefined,\n mapFn: (blob: B1) => B2,\n): DataInfoEntries<B2> | undefined {\n if (dataInfoEntries === undefined) {\n return undefined;\n }\n\n switch (dataInfoEntries.type) {\n case \"Json\":\n // Json type doesn't contain blobs, so return as is\n return dataInfoEntries;\n case \"JsonPartitioned\":\n return {\n ...dataInfoEntries,\n parts: dataInfoEntries.parts.map((entry) => ({\n key: entry.key,\n value: mapFn(entry.value),\n })),\n };\n case \"BinaryPartitioned\":\n return {\n ...dataInfoEntries,\n parts: dataInfoEntries.parts.map((entry) => ({\n key: entry.key,\n value: {\n index: mapFn(entry.value.index),\n values: mapFn(entry.value.values),\n },\n })),\n };\n case \"ParquetPartitioned\":\n return {\n ...dataInfoEntries,\n parts: dataInfoEntries.parts.map((entry) => ({\n key: entry.key,\n value: mapFn(entry.value),\n })),\n };\n }\n}\n"],"names":["assertNever"],"mappings":";;;;AAkKA;;;;;AAKG;AACG,SAAU,UAAU,CAAO,KAAc,EAAA;IAC7C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACvC,QAAA,OAAO,KAAK;IACd;IAEA,MAAM,IAAI,GAAG,KAAgC;AAC7C,IAAA,IAAI,EAAE,MAAM,IAAI,IAAI,CAAC,EAAE;AACrB,QAAA,OAAO,KAAK;IACd;AAEA,IAAA,QAAQ,IAAI,CAAC,IAAI;AACf,QAAA,KAAK,MAAM;AACT,YAAA,QACE,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ;gBAClC,IAAI,CAAC,IAAI,KAAK,SAAS;AACvB,gBAAA,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ;AAEjC,QAAA,KAAK,iBAAiB;AACtB,QAAA,KAAK,mBAAmB;AACxB,QAAA,KAAK,oBAAoB;AACvB,YAAA,QACE,OAAO,IAAI,CAAC,kBAAkB,KAAK,QAAQ;gBAC3C,IAAI,CAAC,KAAK,KAAK,SAAS;AACxB,gBAAA,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ;AAElC,QAAA;AACE,YAAA,OAAO,KAAK;;AAElB;AAoBM,SAAU,WAAW,CACzB,QAAkC,EAClC,KAAuB,EAAA;AAEvB,IAAA,IAAI,QAAQ,KAAK,SAAS,EAAE;AAC1B,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,QAAQ,QAAQ,CAAC,IAAI;AACnB,QAAA,KAAK,MAAM;;AAET,YAAA,OAAO,QAAQ;QACjB,KAAK,iBAAiB,EAAE;;YAEtB,MAAM,QAAQ,GAAuB,EAAE;AACvC,YAAA,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC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