@platforma-sdk/model 1.53.10 → 1.53.13
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/annotations/converter.cjs +11 -11
- package/dist/annotations/converter.cjs.map +1 -1
- package/dist/annotations/converter.d.ts +1 -1
- package/dist/annotations/converter.d.ts.map +1 -1
- package/dist/annotations/converter.js +11 -11
- package/dist/annotations/converter.js.map +1 -1
- package/dist/annotations/index.d.ts +2 -2
- package/dist/annotations/types.d.ts +4 -4
- package/dist/bconfig/index.d.ts +5 -5
- package/dist/bconfig/lambdas.d.ts +7 -7
- package/dist/bconfig/lambdas.d.ts.map +1 -1
- package/dist/bconfig/normalization.cjs.map +1 -1
- package/dist/bconfig/normalization.d.ts +3 -3
- package/dist/bconfig/normalization.js.map +1 -1
- package/dist/bconfig/types.cjs.map +1 -1
- package/dist/bconfig/types.d.ts +2 -2
- package/dist/bconfig/types.d.ts.map +1 -1
- package/dist/bconfig/types.js.map +1 -1
- package/dist/bconfig/util.d.ts +4 -4
- package/dist/bconfig/v3.d.ts +3 -3
- package/dist/block_api_v1.d.ts +2 -2
- package/dist/block_api_v1.d.ts.map +1 -1
- package/dist/block_api_v2.d.ts +2 -2
- package/dist/block_api_v2.d.ts.map +1 -1
- package/dist/block_api_v3.d.ts +3 -3
- package/dist/block_migrations.cjs +10 -10
- package/dist/block_migrations.cjs.map +1 -1
- package/dist/block_migrations.d.ts.map +1 -1
- package/dist/block_migrations.js +10 -10
- package/dist/block_migrations.js.map +1 -1
- package/dist/block_model.cjs +11 -11
- package/dist/block_model.cjs.map +1 -1
- package/dist/block_model.d.ts +8 -8
- package/dist/block_model.d.ts.map +1 -1
- package/dist/block_model.js +11 -11
- package/dist/block_model.js.map +1 -1
- package/dist/block_state_patch.d.ts +2 -2
- package/dist/block_state_util.cjs +1 -1
- package/dist/block_state_util.cjs.map +1 -1
- package/dist/block_state_util.d.ts +3 -3
- package/dist/block_state_util.js +1 -1
- package/dist/block_state_util.js.map +1 -1
- package/dist/block_storage.cjs +10 -10
- package/dist/block_storage.cjs.map +1 -1
- package/dist/block_storage.d.ts +2 -2
- package/dist/block_storage.d.ts.map +1 -1
- package/dist/block_storage.js +10 -10
- package/dist/block_storage.js.map +1 -1
- package/dist/block_storage_vm.cjs +22 -22
- package/dist/block_storage_vm.cjs.map +1 -1
- package/dist/block_storage_vm.d.ts +1 -1
- package/dist/block_storage_vm.d.ts.map +1 -1
- package/dist/block_storage_vm.js +22 -22
- package/dist/block_storage_vm.js.map +1 -1
- package/dist/builder.cjs +32 -23
- package/dist/builder.cjs.map +1 -1
- package/dist/builder.d.ts +7 -7
- package/dist/builder.d.ts.map +1 -1
- package/dist/builder.js +32 -23
- package/dist/builder.js.map +1 -1
- package/dist/components/PFrameForGraphs.cjs +7 -6
- package/dist/components/PFrameForGraphs.cjs.map +1 -1
- package/dist/components/PFrameForGraphs.d.ts +4 -4
- package/dist/components/PFrameForGraphs.d.ts.map +1 -1
- package/dist/components/PFrameForGraphs.js +7 -6
- package/dist/components/PFrameForGraphs.js.map +1 -1
- package/dist/components/PlAnnotations/filter.d.ts +14 -14
- package/dist/components/PlAnnotations/filter.d.ts.map +1 -1
- package/dist/components/PlAnnotations/filters_ui.cjs +46 -46
- package/dist/components/PlAnnotations/filters_ui.cjs.map +1 -1
- package/dist/components/PlAnnotations/filters_ui.d.ts +10 -34
- package/dist/components/PlAnnotations/filters_ui.d.ts.map +1 -1
- package/dist/components/PlAnnotations/filters_ui.js +46 -46
- package/dist/components/PlAnnotations/filters_ui.js.map +1 -1
- package/dist/components/PlAnnotations/index.d.ts +2 -2
- package/dist/components/PlAnnotations/types.d.ts +2 -2
- package/dist/components/PlDataTable.cjs +19 -20
- package/dist/components/PlDataTable.cjs.map +1 -1
- package/dist/components/PlDataTable.d.ts +27 -27
- package/dist/components/PlDataTable.d.ts.map +1 -1
- package/dist/components/PlDataTable.js +19 -20
- package/dist/components/PlDataTable.js.map +1 -1
- package/dist/components/PlMultiSequenceAlignment.cjs +2 -2
- package/dist/components/PlMultiSequenceAlignment.cjs.map +1 -1
- package/dist/components/PlMultiSequenceAlignment.d.ts +6 -6
- package/dist/components/PlMultiSequenceAlignment.d.ts.map +1 -1
- package/dist/components/PlMultiSequenceAlignment.js +2 -2
- package/dist/components/PlMultiSequenceAlignment.js.map +1 -1
- package/dist/components/PlSelectionModel.cjs.map +1 -1
- package/dist/components/PlSelectionModel.d.ts +1 -1
- package/dist/components/PlSelectionModel.js.map +1 -1
- package/dist/components/index.d.ts +5 -5
- package/dist/config/actions.cjs +39 -39
- package/dist/config/actions.cjs.map +1 -1
- package/dist/config/actions.d.ts +9 -9
- package/dist/config/actions.d.ts.map +1 -1
- package/dist/config/actions.js +39 -39
- package/dist/config/actions.js.map +1 -1
- package/dist/config/actions_kinds.d.ts +30 -30
- package/dist/config/actions_kinds.d.ts.map +1 -1
- package/dist/config/index.d.ts +6 -6
- package/dist/config/model.d.ts +28 -28
- package/dist/config/model_meta.d.ts +1 -1
- package/dist/config/type_engine.d.ts +3 -3
- package/dist/config/type_util.d.ts +2 -2
- package/dist/env_value.cjs +1 -1
- package/dist/env_value.cjs.map +1 -1
- package/dist/env_value.js +1 -1
- package/dist/env_value.js.map +1 -1
- package/dist/filters/converter.cjs +36 -32
- package/dist/filters/converter.cjs.map +1 -1
- package/dist/filters/converter.d.ts +2 -2
- package/dist/filters/converter.d.ts.map +1 -1
- package/dist/filters/converter.js +36 -32
- package/dist/filters/converter.js.map +1 -1
- package/dist/filters/index.d.ts +2 -2
- package/dist/filters/types.d.ts +33 -33
- package/dist/filters/types.d.ts.map +1 -1
- package/dist/index.d.ts +24 -24
- package/dist/internal.cjs +7 -7
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.ts +4 -4
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +7 -7
- package/dist/internal.js.map +1 -1
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/dist/pframe.cjs +1 -1
- package/dist/pframe.cjs.map +1 -1
- package/dist/pframe.d.ts +1 -1
- package/dist/pframe.js +1 -1
- package/dist/pframe.js.map +1 -1
- package/dist/pframe_utils/columns.cjs +23 -15
- package/dist/pframe_utils/columns.cjs.map +1 -1
- package/dist/pframe_utils/columns.d.ts +3 -3
- package/dist/pframe_utils/columns.d.ts.map +1 -1
- package/dist/pframe_utils/columns.js +23 -15
- package/dist/pframe_utils/columns.js.map +1 -1
- package/dist/pframe_utils/index.cjs +25 -25
- package/dist/pframe_utils/index.cjs.map +1 -1
- package/dist/pframe_utils/index.d.ts +3 -3
- package/dist/pframe_utils/index.d.ts.map +1 -1
- package/dist/pframe_utils/index.js +25 -25
- package/dist/pframe_utils/index.js.map +1 -1
- package/dist/platforma.d.ts +7 -7
- package/dist/platforma.d.ts.map +1 -1
- package/dist/raw_globals.cjs +4 -1
- package/dist/raw_globals.cjs.map +1 -1
- package/dist/raw_globals.d.ts +2 -2
- package/dist/raw_globals.d.ts.map +1 -1
- package/dist/raw_globals.js +4 -1
- package/dist/raw_globals.js.map +1 -1
- package/dist/ref_util.cjs +4 -4
- package/dist/ref_util.cjs.map +1 -1
- package/dist/ref_util.d.ts +1 -1
- package/dist/ref_util.js +4 -4
- package/dist/ref_util.js.map +1 -1
- package/dist/render/accessor.cjs +24 -24
- package/dist/render/accessor.cjs.map +1 -1
- package/dist/render/accessor.d.ts +10 -10
- package/dist/render/accessor.d.ts.map +1 -1
- package/dist/render/accessor.js +24 -24
- package/dist/render/accessor.js.map +1 -1
- package/dist/render/api.cjs +23 -23
- package/dist/render/api.cjs.map +1 -1
- package/dist/render/api.d.ts +11 -11
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/api.js +23 -23
- package/dist/render/api.js.map +1 -1
- package/dist/render/future.cjs.map +1 -1
- package/dist/render/future.d.ts +1 -1
- package/dist/render/future.js.map +1 -1
- package/dist/render/index.d.ts +6 -6
- package/dist/render/internal.cjs +4 -4
- package/dist/render/internal.cjs.map +1 -1
- package/dist/render/internal.d.ts +7 -7
- package/dist/render/internal.d.ts.map +1 -1
- package/dist/render/internal.js +4 -4
- package/dist/render/internal.js.map +1 -1
- package/dist/render/traversal_ops.d.ts +1 -1
- package/dist/render/util/axis_filtering.cjs +48 -44
- package/dist/render/util/axis_filtering.cjs.map +1 -1
- package/dist/render/util/axis_filtering.d.ts +2 -2
- package/dist/render/util/axis_filtering.js +48 -44
- package/dist/render/util/axis_filtering.js.map +1 -1
- package/dist/render/util/column_collection.cjs +42 -35
- package/dist/render/util/column_collection.cjs.map +1 -1
- package/dist/render/util/column_collection.d.ts +4 -4
- package/dist/render/util/column_collection.d.ts.map +1 -1
- package/dist/render/util/column_collection.js +42 -35
- package/dist/render/util/column_collection.js.map +1 -1
- package/dist/render/util/index.d.ts +4 -4
- package/dist/render/util/label.cjs +15 -21
- package/dist/render/util/label.cjs.map +1 -1
- package/dist/render/util/label.d.ts +2 -2
- package/dist/render/util/label.d.ts.map +1 -1
- package/dist/render/util/label.js +15 -21
- package/dist/render/util/label.js.map +1 -1
- package/dist/render/util/pcolumn_data.cjs +56 -54
- package/dist/render/util/pcolumn_data.cjs.map +1 -1
- package/dist/render/util/pcolumn_data.d.ts +5 -5
- package/dist/render/util/pcolumn_data.d.ts.map +1 -1
- package/dist/render/util/pcolumn_data.js +56 -54
- package/dist/render/util/pcolumn_data.js.map +1 -1
- package/dist/render/util/pframe_upgraders.cjs +6 -6
- package/dist/render/util/pframe_upgraders.cjs.map +1 -1
- package/dist/render/util/pframe_upgraders.d.ts +1 -1
- package/dist/render/util/pframe_upgraders.d.ts.map +1 -1
- package/dist/render/util/pframe_upgraders.js +6 -6
- package/dist/render/util/pframe_upgraders.js.map +1 -1
- package/dist/render/util/split_selectors.d.ts +1 -1
- package/dist/render/util/split_selectors.d.ts.map +1 -1
- package/dist/sdk_info.cjs.map +1 -1
- package/dist/sdk_info.js.map +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +23 -21
- package/src/annotations/converter.test.ts +98 -101
- package/src/annotations/converter.ts +21 -17
- package/src/annotations/index.ts +2 -2
- package/src/annotations/types.ts +4 -4
- package/src/bconfig/index.ts +5 -5
- package/src/bconfig/lambdas.ts +10 -12
- package/src/bconfig/normalization.ts +5 -5
- package/src/bconfig/types.ts +3 -5
- package/src/bconfig/util.ts +3 -3
- package/src/bconfig/v3.ts +3 -3
- package/src/block_api_v1.ts +7 -3
- package/src/block_api_v2.ts +7 -3
- package/src/block_api_v3.ts +3 -3
- package/src/block_migrations.test.ts +66 -67
- package/src/block_migrations.ts +16 -16
- package/src/block_model.ts +76 -140
- package/src/block_state_patch.ts +2 -2
- package/src/block_state_util.ts +4 -4
- package/src/block_storage.test.ts +106 -99
- package/src/block_storage.ts +22 -25
- package/src/block_storage_vm.ts +41 -35
- package/src/builder.ts +107 -95
- package/src/components/PFrameForGraphs.test.ts +261 -255
- package/src/components/PFrameForGraphs.ts +35 -22
- package/src/components/PlAnnotations/filter.ts +21 -15
- package/src/components/PlAnnotations/filters_ui.test.ts +230 -73
- package/src/components/PlAnnotations/filters_ui.ts +138 -105
- package/src/components/PlAnnotations/index.ts +2 -2
- package/src/components/PlAnnotations/types.ts +2 -2
- package/src/components/PlDataTable.ts +177 -164
- package/src/components/PlMultiSequenceAlignment.ts +11 -18
- package/src/components/PlSelectionModel.ts +1 -1
- package/src/components/index.ts +5 -5
- package/src/config/actions.ts +64 -59
- package/src/config/actions_kinds.ts +38 -34
- package/src/config/index.ts +6 -6
- package/src/config/model.ts +28 -28
- package/src/config/model_meta.ts +1 -1
- package/src/config/type_engine.ts +3 -3
- package/src/config/type_util.ts +2 -2
- package/src/env_value.ts +2 -2
- package/src/filters/converter.test.ts +185 -144
- package/src/filters/converter.ts +47 -35
- package/src/filters/index.ts +2 -2
- package/src/filters/types.ts +44 -39
- package/src/global.d.ts +1 -1
- package/src/index.ts +24 -24
- package/src/internal.ts +27 -17
- package/src/pframe.ts +3 -3
- package/src/pframe_utils/columns.ts +81 -31
- package/src/pframe_utils/index.ts +65 -43
- package/src/platforma.ts +44 -21
- package/src/raw_globals.ts +13 -7
- package/src/ref_util.ts +6 -6
- package/src/render/accessor.ts +43 -44
- package/src/render/api.ts +102 -78
- package/src/render/future.ts +2 -2
- package/src/render/index.ts +6 -6
- package/src/render/internal.ts +11 -12
- package/src/render/traversal_ops.ts +1 -1
- package/src/render/util/axis_filtering.ts +67 -52
- package/src/render/util/column_collection.ts +171 -91
- package/src/render/util/index.ts +4 -4
- package/src/render/util/label.test.ts +139 -139
- package/src/render/util/label.ts +42 -33
- package/src/render/util/pcolumn_data.ts +111 -75
- package/src/render/util/pframe_upgraders.ts +24 -13
- package/src/render/util/split_selectors.ts +6 -1
- package/src/sdk_info.ts +1 -1
- package/src/typing.test.ts +56 -56
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sources":["../../src/render/internal.ts"],"sourcesContent":["import type { Optional } from
|
|
1
|
+
{"version":3,"file":"internal.js","sources":["../../src/render/internal.ts"],"sourcesContent":["import type { Optional } from \"utility-types\";\nimport type { Branded } from \"../branding\";\nimport type { CommonFieldTraverseOps, FieldTraversalStep, ResourceType } from \"./traversal_ops\";\nimport type {\n ArchiveFormat,\n AnyFunction,\n Option,\n PColumn,\n PColumnValues,\n PFrameDef,\n PFrameHandle,\n PObject,\n PObjectSpec,\n PSpecPredicate,\n PTableDef,\n PTableHandle,\n ResultCollection,\n ValueOrError,\n DataInfo,\n RangeBytes,\n} from \"@milaboratories/pl-model-common\";\n\nexport const StagingAccessorName = \"staging\";\nexport const MainAccessorName = \"main\";\n\nexport type AccessorHandle = Branded<string, \"AccessorHandle\">;\nexport type FutureHandle = Branded<string, \"FutureHandle\">;\n\nexport interface GlobalCfgRenderCtxMethods<AHandle = AccessorHandle, FHandle = FutureHandle> {\n //\n // Root accessor creation\n //\n\n getAccessorHandleByName(name: string): AHandle | undefined;\n\n //\n // Basic resource accessor actions\n //\n\n resolveWithCommon(\n handle: AHandle,\n commonOptions: CommonFieldTraverseOps,\n ...steps: (FieldTraversalStep | string)[]\n ): AHandle | undefined;\n\n getResourceType(handle: AHandle): ResourceType;\n\n getInputsLocked(handle: AHandle): boolean;\n\n getOutputsLocked(handle: AHandle): boolean;\n\n getIsReadyOrError(handle: AHandle): boolean;\n\n getIsFinal(handle: AHandle): boolean;\n\n getError(handle: AHandle): AHandle | undefined;\n\n listInputFields(handle: AHandle): string[];\n\n listOutputFields(handle: AHandle): string[];\n\n listDynamicFields(handle: AHandle): string[];\n\n getKeyValueBase64(handle: AHandle, key: string): string | undefined;\n\n getKeyValueAsString(handle: AHandle, key: string): string | undefined;\n\n getDataBase64(handle: AHandle): string | undefined;\n\n getDataAsString(handle: AHandle): string | undefined;\n\n /** If not final returns undefined */\n parsePObjectCollection(\n handle: AHandle,\n errorOnUnknownField: boolean,\n prefix: string,\n ...resolvePath: string[]\n ): Record<string, PObject<AHandle>> | undefined;\n\n //\n // Blob\n //\n\n getBlobContentAsBase64(handle: AHandle, range?: RangeBytes): FHandle; // string | undefined\n\n getBlobContentAsString(handle: AHandle, range?: RangeBytes): FHandle; // string | undefined\n\n getDownloadedBlobContentHandle(handle: AHandle): FHandle; // LocalBlobHandleAndSize | undefined;\n\n getOnDemandBlobContentHandle(handle: AHandle): FHandle; // RemoteBlobHandleAndSize | undefined;\n\n //\n // Blobs to URLs\n //\n\n extractArchiveAndGetURL(handle: AHandle, format: ArchiveFormat): FHandle;\n\n //\n // Import progress\n //\n\n getImportProgress(handle: AHandle): FHandle; // ImportProgress;\n\n //\n // Logs\n //\n\n getLastLogs(handle: AHandle, nLines: number): FHandle; // string | undefined;\n\n getProgressLog(handle: AHandle, patternToSearch: string): FHandle; // string | undefined;\n\n getProgressLogWithInfo(handle: AHandle, patternToSearch: string): FHandle; // ProgressLogWithInfo | undefined;\n\n getLogHandle(handle: AHandle): FHandle; // AnyLogHandle | undefined;\n\n //\n // Blocks\n //\n\n /** @deprecated at some point will stop working and will return dummy values */\n getBlockLabel(blockId: string): string;\n\n //\n // Result Pool\n //\n\n getDataFromResultPool(): ResultCollection<PObject<AHandle>>;\n\n getDataWithErrorsFromResultPool(): ResultCollection<\n Optional<PObject<ValueOrError<AHandle, Error>>, \"id\">\n >;\n\n getSpecsFromResultPool(): ResultCollection<PObjectSpec>;\n\n getSpecFromResultPoolByRef(blockId: string, exportName: string): PObjectSpec | undefined;\n\n getDataFromResultPoolByRef(blockId: string, exportName: string): PObject<AHandle> | undefined;\n\n calculateOptions(predicate: PSpecPredicate): Option[];\n\n //\n // PFrame / PTable\n //\n\n createPFrame(def: PFrameDef<PColumn<AHandle | PColumnValues | DataInfo<AHandle>>>): PFrameHandle;\n\n createPTable(def: PTableDef<PColumn<AHandle | PColumnValues | DataInfo<AHandle>>>): PTableHandle;\n\n //\n // Computable\n //\n\n getCurrentUnstableMarker(): string | undefined;\n\n //\n // Logging\n //\n\n logInfo(message: string): void;\n\n logWarn(message: string): void;\n\n logError(message: string): void;\n}\n\nexport const GlobalCfgRenderCtxFeatureFlags = {\n explicitColumnsSupport: true as const,\n inlineColumnsSupport: true as const,\n activeArgs: true as const,\n pTablePartitionFiltersSupport: true as const,\n pFrameInSetFilterSupport: true as const,\n};\n\nexport interface GlobalCfgRenderCtx extends GlobalCfgRenderCtxMethods {\n //\n // State: Args, UI State, Active Args\n //\n // Old runtime injects these values as strings, new runtime injects them as functions\n // that return strings, if block declares supportsLazyState flag.\n // If function not called in lazy state API, then resulting output will not depend on these values,\n // and thus will not be recalculated on corresponding state change.\n //\n\n readonly args: string | (() => string);\n /** @deprecated Use `data` instead. Optional for backward compatibility - falls back to `data` if not injected. */\n readonly uiState?: string | (() => string);\n readonly data: string | (() => string);\n readonly activeArgs: undefined | string | (() => string | undefined);\n\n // Note: strings below are used because, anyway, using strings is the only way\n // to get data inside the QuickJS context, as it is implemented now. With this\n // approach deserialization can be lazily postponed until it is actually needed.\n readonly callbackRegistry: Record<string, AnyFunction>;\n readonly featureFlags?: typeof GlobalCfgRenderCtxFeatureFlags;\n}\n\nexport type FutureAwait = {\n __awaited_futures__: FutureHandle[];\n};\n\nexport function isFutureAwait(obj: unknown): obj is FutureAwait {\n return typeof obj === \"object\" && obj !== null && \"__awaited_futures__\" in obj;\n}\n\nfunction addAllFutureAwaits(set: Set<string>, visited: Set<unknown>, node: unknown) {\n if (visited.has(node)) return;\n visited.add(node);\n\n const type = typeof node;\n if (type === \"object\") {\n if (isFutureAwait(node)) node.__awaited_futures__.forEach((a) => set.add(a));\n else if (Array.isArray(node))\n for (const nested of node) addAllFutureAwaits(set, visited, nested);\n else\n for (const [, nested] of Object.entries(node as object))\n if (nested !== node) addAllFutureAwaits(set, visited, nested);\n }\n}\n\nexport function getAllFutureAwaits(obj: unknown): Set<string> {\n const set = new Set<string>();\n addAllFutureAwaits(set, new Set(), obj);\n return set;\n}\n"],"names":[],"mappings":"AAsBO,MAAM,mBAAmB,GAAG;AAC5B,MAAM,gBAAgB,GAAG;AA8IzB,MAAM,8BAA8B,GAAG;AAC5C,IAAA,sBAAsB,EAAE,IAAa;AACrC,IAAA,oBAAoB,EAAE,IAAa;AACnC,IAAA,UAAU,EAAE,IAAa;AACzB,IAAA,6BAA6B,EAAE,IAAa;AAC5C,IAAA,wBAAwB,EAAE,IAAa;;AA8BnC,SAAU,aAAa,CAAC,GAAY,EAAA;AACxC,IAAA,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,qBAAqB,IAAI,GAAG;AAChF;AAEA,SAAS,kBAAkB,CAAC,GAAgB,EAAE,OAAqB,EAAE,IAAa,EAAA;AAChF,IAAA,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE;AACvB,IAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;AAEjB,IAAA,MAAM,IAAI,GAAG,OAAO,IAAI;AACxB,IAAA,IAAI,IAAI,KAAK,QAAQ,EAAE;QACrB,IAAI,aAAa,CAAC,IAAI,CAAC;AAAE,YAAA,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACvE,aAAA,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;YAC1B,KAAK,MAAM,MAAM,IAAI,IAAI;AAAE,gBAAA,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC;;YAEnE,KAAK,MAAM,GAAG,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAc,CAAC;gBACrD,IAAI,MAAM,KAAK,IAAI;AAAE,oBAAA,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC;IACnE;AACF;AAEM,SAAU,kBAAkB,CAAC,GAAY,EAAA;AAC7C,IAAA,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU;IAC7B,kBAAkB,CAAC,GAAG,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,CAAC;AACvC,IAAA,OAAO,GAAG;AACZ;;;;"}
|
|
@@ -17,7 +17,7 @@ export type CommonFieldTraverseOps = {
|
|
|
17
17
|
/** Will not mark current context as unstable, if field is not found. */
|
|
18
18
|
stableIfNotFound?: true;
|
|
19
19
|
};
|
|
20
|
-
export type FieldType =
|
|
20
|
+
export type FieldType = "Input" | "Output" | "Service" | "OTW" | "Dynamic" | "MTW";
|
|
21
21
|
export interface ResourceType {
|
|
22
22
|
readonly name: string;
|
|
23
23
|
readonly version: string;
|
|
@@ -6,16 +6,16 @@ function filterDataInfoEntries(dataInfoEntries, axisFilters) {
|
|
|
6
6
|
// Check for invalid filter axes
|
|
7
7
|
const { type } = dataInfoEntries;
|
|
8
8
|
switch (type) {
|
|
9
|
-
case
|
|
9
|
+
case "Json": {
|
|
10
10
|
const { keyLength } = dataInfoEntries;
|
|
11
11
|
for (const [axisIdx] of axisFilters)
|
|
12
12
|
if (axisIdx >= keyLength)
|
|
13
13
|
throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);
|
|
14
14
|
break;
|
|
15
15
|
}
|
|
16
|
-
case
|
|
17
|
-
case
|
|
18
|
-
case
|
|
16
|
+
case "JsonPartitioned":
|
|
17
|
+
case "BinaryPartitioned":
|
|
18
|
+
case "ParquetPartitioned": {
|
|
19
19
|
const { partitionKeyLength } = dataInfoEntries;
|
|
20
20
|
for (const [axisIdx] of axisFilters)
|
|
21
21
|
if (axisIdx >= partitionKeyLength)
|
|
@@ -40,46 +40,50 @@ function filterDataInfoEntries(dataInfoEntries, axisFilters) {
|
|
|
40
40
|
return newKey;
|
|
41
41
|
};
|
|
42
42
|
switch (dataInfoEntries.type) {
|
|
43
|
-
case
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
.
|
|
58
|
-
.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
43
|
+
case "Json":
|
|
44
|
+
return {
|
|
45
|
+
type: "Json",
|
|
46
|
+
keyLength: dataInfoEntries.keyLength - axisFilters.length,
|
|
47
|
+
data: dataInfoEntries.data
|
|
48
|
+
.filter((entry) => keyMatchesFilters(entry.key))
|
|
49
|
+
.map((entry) => ({
|
|
50
|
+
key: removeFilteredAxes(entry.key),
|
|
51
|
+
value: entry.value,
|
|
52
|
+
})),
|
|
53
|
+
};
|
|
54
|
+
case "JsonPartitioned":
|
|
55
|
+
return {
|
|
56
|
+
type: "JsonPartitioned",
|
|
57
|
+
partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
|
|
58
|
+
parts: dataInfoEntries.parts
|
|
59
|
+
.filter((entry) => keyMatchesFilters(entry.key))
|
|
60
|
+
.map((entry) => ({
|
|
61
|
+
key: removeFilteredAxes(entry.key),
|
|
62
|
+
value: entry.value,
|
|
63
|
+
})),
|
|
64
|
+
};
|
|
65
|
+
case "BinaryPartitioned":
|
|
66
|
+
return {
|
|
67
|
+
type: "BinaryPartitioned",
|
|
68
|
+
partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
|
|
69
|
+
parts: dataInfoEntries.parts
|
|
70
|
+
.filter((entry) => keyMatchesFilters(entry.key))
|
|
71
|
+
.map((entry) => ({
|
|
72
|
+
key: removeFilteredAxes(entry.key),
|
|
73
|
+
value: entry.value,
|
|
74
|
+
})),
|
|
75
|
+
};
|
|
76
|
+
case "ParquetPartitioned":
|
|
77
|
+
return {
|
|
78
|
+
type: "ParquetPartitioned",
|
|
79
|
+
partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
|
|
80
|
+
parts: dataInfoEntries.parts
|
|
81
|
+
.filter((entry) => keyMatchesFilters(entry.key))
|
|
82
|
+
.map((entry) => ({
|
|
83
|
+
key: removeFilteredAxes(entry.key),
|
|
84
|
+
value: entry.value,
|
|
85
|
+
})),
|
|
86
|
+
};
|
|
83
87
|
}
|
|
84
88
|
}
|
|
85
89
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis_filtering.cjs","sources":["../../../src/render/util/axis_filtering.ts"],"sourcesContent":["import type {\n BinaryChunk,\n DataInfoEntries,\n PColumnDataEntry,\n PColumnKey,\n PColumnValue,\n JsonDataInfoEntries,\n JsonPartitionedDataInfoEntries,\n BinaryPartitionedDataInfoEntries,\n ParquetPartitionedDataInfoEntries,\n PartitionedDataInfoEntries,\n} from
|
|
1
|
+
{"version":3,"file":"axis_filtering.cjs","sources":["../../../src/render/util/axis_filtering.ts"],"sourcesContent":["import type {\n BinaryChunk,\n DataInfoEntries,\n PColumnDataEntry,\n PColumnKey,\n PColumnValue,\n JsonDataInfoEntries,\n JsonPartitionedDataInfoEntries,\n BinaryPartitionedDataInfoEntries,\n ParquetPartitionedDataInfoEntries,\n PartitionedDataInfoEntries,\n} from \"@milaboratories/pl-model-common\";\nimport type { AxisFilterByIdx } from \"@milaboratories/pl-model-common\";\n\n/**\n * Filters DataInfoEntries using axis filters, removing specified axes from keys and\n * only keeping entries that match the filter values.\n *\n * @param dataInfoEntries - The data info object to filter\n * @param axisFilters - Array of axis filters (index, value pairs)\n * @throws Error if any filter axis is outside the partitioning axes or data axes for Json data\n */\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: ParquetPartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): ParquetPartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: BinaryPartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): BinaryPartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: JsonPartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): JsonPartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: PartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): PartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries(\n dataInfoEntries: JsonDataInfoEntries,\n axisFilters: AxisFilterByIdx[],\n): JsonDataInfoEntries;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: DataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): DataInfoEntries<Blob> {\n // Sort filters by axis index in descending order to safely remove elements from arrays\n const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);\n\n // Check for invalid filter axes\n const { type } = dataInfoEntries;\n switch (type) {\n case \"Json\": {\n const { keyLength } = dataInfoEntries;\n for (const [axisIdx] of axisFilters)\n if (axisIdx >= keyLength)\n throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);\n break;\n }\n case \"JsonPartitioned\":\n case \"BinaryPartitioned\":\n case \"ParquetPartitioned\": {\n const { partitionKeyLength } = dataInfoEntries;\n for (const [axisIdx] of axisFilters)\n if (axisIdx >= partitionKeyLength)\n throw new Error(\n `Can't filter on non-partitioned axis ${axisIdx}. Must be >= ${partitionKeyLength}`,\n );\n break;\n }\n default:\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n throw new Error(`Unsupported data info type: ${type satisfies never}`);\n }\n\n const keyMatchesFilters = (key: PColumnKey): boolean => {\n for (const [axisIdx, axisValue] of sortedFilters) if (key[axisIdx] !== axisValue) return false;\n return true;\n };\n\n const removeFilteredAxes = (key: PColumnKey): PColumnKey => {\n const newKey = [...key];\n\n // Remove axes in descending order to maintain correct indices\n for (const [axisIdx] of sortedFilters) newKey.splice(axisIdx, 1);\n\n return newKey;\n };\n\n switch (dataInfoEntries.type) {\n case \"Json\":\n return {\n type: \"Json\",\n keyLength: dataInfoEntries.keyLength - axisFilters.length,\n data: dataInfoEntries.data\n .filter((entry) => keyMatchesFilters(entry.key))\n .map(\n (entry) =>\n ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n }) satisfies PColumnDataEntry<PColumnValue>,\n ),\n };\n case \"JsonPartitioned\":\n return {\n type: \"JsonPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,\n parts: dataInfoEntries.parts\n .filter((entry) => keyMatchesFilters(entry.key))\n .map(\n (entry) =>\n ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n }) satisfies PColumnDataEntry<Blob>,\n ),\n };\n case \"BinaryPartitioned\":\n return {\n type: \"BinaryPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,\n parts: dataInfoEntries.parts\n .filter((entry) => keyMatchesFilters(entry.key))\n .map(\n (entry) =>\n ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n }) satisfies PColumnDataEntry<BinaryChunk<Blob>>,\n ),\n };\n case \"ParquetPartitioned\":\n return {\n type: \"ParquetPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,\n parts: dataInfoEntries.parts\n .filter((entry) => keyMatchesFilters(entry.key))\n .map(\n (entry) =>\n ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n }) satisfies PColumnDataEntry<Blob>,\n ),\n };\n }\n}\n"],"names":[],"mappings":";;AA0CM,SAAU,qBAAqB,CACnC,eAAsC,EACtC,WAA8B,EAAA;;IAG9B,MAAM,aAAa,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;;AAGlE,IAAA,MAAM,EAAE,IAAI,EAAE,GAAG,eAAe;IAChC,QAAQ,IAAI;QACV,KAAK,MAAM,EAAE;AACX,YAAA,MAAM,EAAE,SAAS,EAAE,GAAG,eAAe;AACrC,YAAA,KAAK,MAAM,CAAC,OAAO,CAAC,IAAI,WAAW;gBACjC,IAAI,OAAO,IAAI,SAAS;oBACtB,MAAM,IAAI,KAAK,CAAC,CAAA,8BAAA,EAAiC,OAAO,CAAA,aAAA,EAAgB,SAAS,CAAA,CAAE,CAAC;YACxF;QACF;AACA,QAAA,KAAK,iBAAiB;AACtB,QAAA,KAAK,mBAAmB;QACxB,KAAK,oBAAoB,EAAE;AACzB,YAAA,MAAM,EAAE,kBAAkB,EAAE,GAAG,eAAe;AAC9C,YAAA,KAAK,MAAM,CAAC,OAAO,CAAC,IAAI,WAAW;gBACjC,IAAI,OAAO,IAAI,kBAAkB;oBAC/B,MAAM,IAAI,KAAK,CACb,CAAA,qCAAA,EAAwC,OAAO,CAAA,aAAA,EAAgB,kBAAkB,CAAA,CAA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Entries, ParquetPartitionedDataInfoEntries, PartitionedDataInfoEntries } from
|
|
2
|
-
import type { AxisFilterByIdx } from
|
|
1
|
+
import type { JsonDataInfoEntries, JsonPartitionedDataInfoEntries, BinaryPartitionedDataInfoEntries, ParquetPartitionedDataInfoEntries, PartitionedDataInfoEntries } from "@milaboratories/pl-model-common";
|
|
2
|
+
import type { AxisFilterByIdx } from "@milaboratories/pl-model-common";
|
|
3
3
|
/**
|
|
4
4
|
* Filters DataInfoEntries using axis filters, removing specified axes from keys and
|
|
5
5
|
* only keeping entries that match the filter values.
|
|
@@ -4,16 +4,16 @@ function filterDataInfoEntries(dataInfoEntries, axisFilters) {
|
|
|
4
4
|
// Check for invalid filter axes
|
|
5
5
|
const { type } = dataInfoEntries;
|
|
6
6
|
switch (type) {
|
|
7
|
-
case
|
|
7
|
+
case "Json": {
|
|
8
8
|
const { keyLength } = dataInfoEntries;
|
|
9
9
|
for (const [axisIdx] of axisFilters)
|
|
10
10
|
if (axisIdx >= keyLength)
|
|
11
11
|
throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);
|
|
12
12
|
break;
|
|
13
13
|
}
|
|
14
|
-
case
|
|
15
|
-
case
|
|
16
|
-
case
|
|
14
|
+
case "JsonPartitioned":
|
|
15
|
+
case "BinaryPartitioned":
|
|
16
|
+
case "ParquetPartitioned": {
|
|
17
17
|
const { partitionKeyLength } = dataInfoEntries;
|
|
18
18
|
for (const [axisIdx] of axisFilters)
|
|
19
19
|
if (axisIdx >= partitionKeyLength)
|
|
@@ -38,46 +38,50 @@ function filterDataInfoEntries(dataInfoEntries, axisFilters) {
|
|
|
38
38
|
return newKey;
|
|
39
39
|
};
|
|
40
40
|
switch (dataInfoEntries.type) {
|
|
41
|
-
case
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
.
|
|
56
|
-
.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
41
|
+
case "Json":
|
|
42
|
+
return {
|
|
43
|
+
type: "Json",
|
|
44
|
+
keyLength: dataInfoEntries.keyLength - axisFilters.length,
|
|
45
|
+
data: dataInfoEntries.data
|
|
46
|
+
.filter((entry) => keyMatchesFilters(entry.key))
|
|
47
|
+
.map((entry) => ({
|
|
48
|
+
key: removeFilteredAxes(entry.key),
|
|
49
|
+
value: entry.value,
|
|
50
|
+
})),
|
|
51
|
+
};
|
|
52
|
+
case "JsonPartitioned":
|
|
53
|
+
return {
|
|
54
|
+
type: "JsonPartitioned",
|
|
55
|
+
partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
|
|
56
|
+
parts: dataInfoEntries.parts
|
|
57
|
+
.filter((entry) => keyMatchesFilters(entry.key))
|
|
58
|
+
.map((entry) => ({
|
|
59
|
+
key: removeFilteredAxes(entry.key),
|
|
60
|
+
value: entry.value,
|
|
61
|
+
})),
|
|
62
|
+
};
|
|
63
|
+
case "BinaryPartitioned":
|
|
64
|
+
return {
|
|
65
|
+
type: "BinaryPartitioned",
|
|
66
|
+
partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
|
|
67
|
+
parts: dataInfoEntries.parts
|
|
68
|
+
.filter((entry) => keyMatchesFilters(entry.key))
|
|
69
|
+
.map((entry) => ({
|
|
70
|
+
key: removeFilteredAxes(entry.key),
|
|
71
|
+
value: entry.value,
|
|
72
|
+
})),
|
|
73
|
+
};
|
|
74
|
+
case "ParquetPartitioned":
|
|
75
|
+
return {
|
|
76
|
+
type: "ParquetPartitioned",
|
|
77
|
+
partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
|
|
78
|
+
parts: dataInfoEntries.parts
|
|
79
|
+
.filter((entry) => keyMatchesFilters(entry.key))
|
|
80
|
+
.map((entry) => ({
|
|
81
|
+
key: removeFilteredAxes(entry.key),
|
|
82
|
+
value: entry.value,
|
|
83
|
+
})),
|
|
84
|
+
};
|
|
81
85
|
}
|
|
82
86
|
}
|
|
83
87
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis_filtering.js","sources":["../../../src/render/util/axis_filtering.ts"],"sourcesContent":["import type {\n BinaryChunk,\n DataInfoEntries,\n PColumnDataEntry,\n PColumnKey,\n PColumnValue,\n JsonDataInfoEntries,\n JsonPartitionedDataInfoEntries,\n BinaryPartitionedDataInfoEntries,\n ParquetPartitionedDataInfoEntries,\n PartitionedDataInfoEntries,\n} from
|
|
1
|
+
{"version":3,"file":"axis_filtering.js","sources":["../../../src/render/util/axis_filtering.ts"],"sourcesContent":["import type {\n BinaryChunk,\n DataInfoEntries,\n PColumnDataEntry,\n PColumnKey,\n PColumnValue,\n JsonDataInfoEntries,\n JsonPartitionedDataInfoEntries,\n BinaryPartitionedDataInfoEntries,\n ParquetPartitionedDataInfoEntries,\n PartitionedDataInfoEntries,\n} from \"@milaboratories/pl-model-common\";\nimport type { AxisFilterByIdx } from \"@milaboratories/pl-model-common\";\n\n/**\n * Filters DataInfoEntries using axis filters, removing specified axes from keys and\n * only keeping entries that match the filter values.\n *\n * @param dataInfoEntries - The data info object to filter\n * @param axisFilters - Array of axis filters (index, value pairs)\n * @throws Error if any filter axis is outside the partitioning axes or data axes for Json data\n */\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: ParquetPartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): ParquetPartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: BinaryPartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): BinaryPartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: JsonPartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): JsonPartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: PartitionedDataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): PartitionedDataInfoEntries<Blob>;\nexport function filterDataInfoEntries(\n dataInfoEntries: JsonDataInfoEntries,\n axisFilters: AxisFilterByIdx[],\n): JsonDataInfoEntries;\nexport function filterDataInfoEntries<Blob>(\n dataInfoEntries: DataInfoEntries<Blob>,\n axisFilters: AxisFilterByIdx[],\n): DataInfoEntries<Blob> {\n // Sort filters by axis index in descending order to safely remove elements from arrays\n const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);\n\n // Check for invalid filter axes\n const { type } = dataInfoEntries;\n switch (type) {\n case \"Json\": {\n const { keyLength } = dataInfoEntries;\n for (const [axisIdx] of axisFilters)\n if (axisIdx >= keyLength)\n throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);\n break;\n }\n case \"JsonPartitioned\":\n case \"BinaryPartitioned\":\n case \"ParquetPartitioned\": {\n const { partitionKeyLength } = dataInfoEntries;\n for (const [axisIdx] of axisFilters)\n if (axisIdx >= partitionKeyLength)\n throw new Error(\n `Can't filter on non-partitioned axis ${axisIdx}. Must be >= ${partitionKeyLength}`,\n );\n break;\n }\n default:\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n throw new Error(`Unsupported data info type: ${type satisfies never}`);\n }\n\n const keyMatchesFilters = (key: PColumnKey): boolean => {\n for (const [axisIdx, axisValue] of sortedFilters) if (key[axisIdx] !== axisValue) return false;\n return true;\n };\n\n const removeFilteredAxes = (key: PColumnKey): PColumnKey => {\n const newKey = [...key];\n\n // Remove axes in descending order to maintain correct indices\n for (const [axisIdx] of sortedFilters) newKey.splice(axisIdx, 1);\n\n return newKey;\n };\n\n switch (dataInfoEntries.type) {\n case \"Json\":\n return {\n type: \"Json\",\n keyLength: dataInfoEntries.keyLength - axisFilters.length,\n data: dataInfoEntries.data\n .filter((entry) => keyMatchesFilters(entry.key))\n .map(\n (entry) =>\n ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n }) satisfies PColumnDataEntry<PColumnValue>,\n ),\n };\n case \"JsonPartitioned\":\n return {\n type: \"JsonPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,\n parts: dataInfoEntries.parts\n .filter((entry) => keyMatchesFilters(entry.key))\n .map(\n (entry) =>\n ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n }) satisfies PColumnDataEntry<Blob>,\n ),\n };\n case \"BinaryPartitioned\":\n return {\n type: \"BinaryPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,\n parts: dataInfoEntries.parts\n .filter((entry) => keyMatchesFilters(entry.key))\n .map(\n (entry) =>\n ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n }) satisfies PColumnDataEntry<BinaryChunk<Blob>>,\n ),\n };\n case \"ParquetPartitioned\":\n return {\n type: \"ParquetPartitioned\",\n partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,\n parts: dataInfoEntries.parts\n .filter((entry) => keyMatchesFilters(entry.key))\n .map(\n (entry) =>\n ({\n key: removeFilteredAxes(entry.key),\n value: entry.value,\n }) satisfies PColumnDataEntry<Blob>,\n ),\n };\n }\n}\n"],"names":[],"mappings":"AA0CM,SAAU,qBAAqB,CACnC,eAAsC,EACtC,WAA8B,EAAA;;IAG9B,MAAM,aAAa,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,C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EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC;oBAClC,KAAK,EAAE,KAAK,CAAC,KAAK;AACnB,iBAAA,CAA+C,CACnD;aACJ;AACH,QAAA,KAAK,oBAAoB;YACvB,OAAO;AACL,gBAAA,IAAI,EAAE,oBAAoB;AAC1B,gBAAA,kBAAkB,EAAE,eAAe,CAAC,kBAAkB,GAAG,WAAW,CAAC,MAAM;gBAC3E,KAAK,EAAE,eAAe,CAAC;AACpB,qBAAA,MAAM,CAAC,CAAC,KAAK,KAAK,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC;AAC9C,qBAAA,GAAG,CACF,CAAC,KAAK,MACH;AACC,oBAAA,GAAG,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC;oBAClC,KAAK,EAAE,KAAK,CAAC,KAAK;AACnB,iBAAA,CAAkC,CACtC;aACJ;;AAEP;;;;"}
|
|
@@ -12,7 +12,7 @@ function isPColumnValues(value) {
|
|
|
12
12
|
if (value.length === 0)
|
|
13
13
|
return true;
|
|
14
14
|
const first = value[0];
|
|
15
|
-
return typeof first ===
|
|
15
|
+
return typeof first === "object" && first !== null && "key" in first && "val" in first;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* A simple implementation of {@link ColumnProvider} backed by a pre-defined array of columns.
|
|
@@ -23,7 +23,7 @@ class ArrayColumnProvider {
|
|
|
23
23
|
this.columns = columns;
|
|
24
24
|
}
|
|
25
25
|
selectColumns(selectors) {
|
|
26
|
-
const predicate = typeof selectors ===
|
|
26
|
+
const predicate = typeof selectors === "function" ? selectors : plModelCommon.selectorsToPredicate(selectors);
|
|
27
27
|
// Filter based on spec, ignoring data type for now
|
|
28
28
|
return this.columns.filter((column) => predicate(column.spec));
|
|
29
29
|
}
|
|
@@ -50,33 +50,39 @@ function fallbackIdDeriver(originalId, axisFilters) {
|
|
|
50
50
|
}
|
|
51
51
|
/** Checks if a selector object uses any anchor properties */
|
|
52
52
|
function hasAnchors(selector) {
|
|
53
|
-
if (!selector || typeof selector !==
|
|
53
|
+
if (!selector || typeof selector !== "object")
|
|
54
54
|
return false;
|
|
55
55
|
const potentialAnchored = selector;
|
|
56
|
-
const domainHasAnchors = potentialAnchored[
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
const domainHasAnchors = potentialAnchored["domain"] &&
|
|
57
|
+
typeof potentialAnchored["domain"] === "object" &&
|
|
58
|
+
Object.values(potentialAnchored["domain"]).some((v) => typeof v === "object" && v !== null && "anchor" in v);
|
|
59
|
+
const axesHaveAnchors = potentialAnchored["axes"] &&
|
|
60
|
+
Array.isArray(potentialAnchored["axes"]) &&
|
|
61
|
+
potentialAnchored["axes"].some((a) => typeof a === "object" && a !== null && "anchor" in a);
|
|
62
|
+
return !!potentialAnchored["domainAnchor"] || domainHasAnchors || axesHaveAnchors;
|
|
59
63
|
}
|
|
60
64
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
* Derives the indices of axes marked for splitting based on the selector.
|
|
66
|
+
* Throws an error if splitting is requested alongside `partialAxesMatch`.
|
|
67
|
+
*/
|
|
64
68
|
function getSplitAxisIndices(selector) {
|
|
65
|
-
if (typeof selector !==
|
|
69
|
+
if (typeof selector !== "object" || !("axes" in selector) || selector.axes === undefined) {
|
|
66
70
|
return []; // No axes specified or not an object selector, no splitting
|
|
67
71
|
}
|
|
68
72
|
const splitIndices = selector.axes
|
|
69
|
-
.map((axis, index) =>
|
|
73
|
+
.map((axis, index) => typeof axis === "object" && "split" in axis && axis.split === true ? index : -1)
|
|
70
74
|
.filter((index) => index !== -1);
|
|
71
75
|
if (splitIndices.length > 0 && selector.partialAxesMatch !== undefined) {
|
|
72
|
-
throw new Error(
|
|
76
|
+
throw new Error("Axis splitting is not supported when `partialAxesMatch` is defined.");
|
|
73
77
|
}
|
|
74
78
|
splitIndices.sort((a, b) => a - b);
|
|
75
79
|
return splitIndices;
|
|
76
80
|
}
|
|
77
81
|
class PColumnCollection {
|
|
78
82
|
defaultProviderStore = [];
|
|
79
|
-
providers = [
|
|
83
|
+
providers = [
|
|
84
|
+
new ArrayColumnProvider(this.defaultProviderStore),
|
|
85
|
+
];
|
|
80
86
|
axisLabelProviders = [];
|
|
81
87
|
constructor() { }
|
|
82
88
|
addColumnProvider(provider) {
|
|
@@ -105,18 +111,19 @@ class PColumnCollection {
|
|
|
105
111
|
return undefined;
|
|
106
112
|
}
|
|
107
113
|
getUniversalEntries(predicateOrSelectors, opts) {
|
|
108
|
-
const { anchorCtx, labelOps: rawLabelOps, dontWaitAllData = false, overrideLabelAnnotation = false, exclude, enrichByLinkers = false } = opts ?? {};
|
|
114
|
+
const { anchorCtx, labelOps: rawLabelOps, dontWaitAllData = false, overrideLabelAnnotation = false, exclude, enrichByLinkers = false, } = opts ?? {};
|
|
109
115
|
const labelOps = {
|
|
110
|
-
...(overrideLabelAnnotation && rawLabelOps?.includeNativeLabel !== false
|
|
111
|
-
|
|
116
|
+
...(overrideLabelAnnotation && rawLabelOps?.includeNativeLabel !== false
|
|
117
|
+
? { includeNativeLabel: true }
|
|
118
|
+
: {}),
|
|
119
|
+
...rawLabelOps,
|
|
112
120
|
};
|
|
113
121
|
let excludePredicate = () => false;
|
|
114
122
|
if (exclude) {
|
|
115
|
-
const excludePredicartes = (Array.isArray(exclude) ? exclude : [exclude])
|
|
116
|
-
.map((selector) => {
|
|
123
|
+
const excludePredicartes = (Array.isArray(exclude) ? exclude : [exclude]).map((selector) => {
|
|
117
124
|
if (hasAnchors(selector)) {
|
|
118
125
|
if (!anchorCtx)
|
|
119
|
-
throw new Error(
|
|
126
|
+
throw new Error("Anchored selectors in exclude require an AnchoredIdDeriver to be provided in options.");
|
|
120
127
|
return plModelCommon.selectorsToPredicate(plModelCommon.resolveAnchors(anchorCtx.anchors, selector, opts));
|
|
121
128
|
}
|
|
122
129
|
else
|
|
@@ -124,7 +131,7 @@ class PColumnCollection {
|
|
|
124
131
|
});
|
|
125
132
|
excludePredicate = (spec) => excludePredicartes.some((predicate) => predicate(spec));
|
|
126
133
|
}
|
|
127
|
-
const selectorsArray = typeof predicateOrSelectors ===
|
|
134
|
+
const selectorsArray = typeof predicateOrSelectors === "function"
|
|
128
135
|
? [predicateOrSelectors]
|
|
129
136
|
: Array.isArray(predicateOrSelectors)
|
|
130
137
|
? predicateOrSelectors
|
|
@@ -136,7 +143,7 @@ class PColumnCollection {
|
|
|
136
143
|
let currentSelector;
|
|
137
144
|
if (usesAnchors) {
|
|
138
145
|
if (!anchorCtx)
|
|
139
|
-
throw new Error(
|
|
146
|
+
throw new Error("Anchored selectors require an AnchoredIdDeriver to be provided in options.");
|
|
140
147
|
currentSelector = plModelCommon.resolveAnchors(anchorCtx.anchors, rawSelector, opts);
|
|
141
148
|
}
|
|
142
149
|
else
|
|
@@ -181,14 +188,13 @@ class PColumnCollection {
|
|
|
181
188
|
const maxSplitIdx = splitAxisIdxs[splitAxisIdxs.length - 1];
|
|
182
189
|
if (maxSplitIdx >= dataEntries.partitionKeyLength)
|
|
183
190
|
throw new Error(`Not enough partition keys (${dataEntries.partitionKeyLength}) for requested split axes (max index ${maxSplitIdx}) in column ${originalSpec.name}`);
|
|
184
|
-
const axesLabels = splitAxisIdxs
|
|
185
|
-
.map((idx) => this.findLabels(plModelCommon.getAxisId(originalSpec.axesSpec[idx])));
|
|
191
|
+
const axesLabels = splitAxisIdxs.map((idx) => this.findLabels(plModelCommon.getAxisId(originalSpec.axesSpec[idx])));
|
|
186
192
|
const keyCombinations = [];
|
|
187
193
|
const generateCombinations = (currentCombo, sAxisIdx) => {
|
|
188
194
|
if (sAxisIdx >= splitAxisIdxs.length) {
|
|
189
195
|
keyCombinations.push([...currentCombo]);
|
|
190
196
|
if (keyCombinations.length > 10000)
|
|
191
|
-
throw new Error(
|
|
197
|
+
throw new Error("Too many key combinations, aborting.");
|
|
192
198
|
return;
|
|
193
199
|
}
|
|
194
200
|
const axisIdx = splitAxisIdxs[sAxisIdx];
|
|
@@ -224,7 +230,7 @@ class PColumnCollection {
|
|
|
224
230
|
return { axisIdx, axisId, value: value, label };
|
|
225
231
|
});
|
|
226
232
|
intermediateResults.push({
|
|
227
|
-
type:
|
|
233
|
+
type: "split",
|
|
228
234
|
originalColumn: column,
|
|
229
235
|
spec: originalSpec,
|
|
230
236
|
adjustedSpec,
|
|
@@ -235,7 +241,7 @@ class PColumnCollection {
|
|
|
235
241
|
}
|
|
236
242
|
else {
|
|
237
243
|
intermediateResults.push({
|
|
238
|
-
type:
|
|
244
|
+
type: "direct",
|
|
239
245
|
originalColumn: column,
|
|
240
246
|
spec: originalSpec,
|
|
241
247
|
adjustedSpec: originalSpec,
|
|
@@ -247,12 +253,12 @@ class PColumnCollection {
|
|
|
247
253
|
return [];
|
|
248
254
|
const labeledResults = label.deriveLabels(intermediateResults, (entry) => ({
|
|
249
255
|
spec: entry.spec,
|
|
250
|
-
suffixTrace: entry.type ===
|
|
256
|
+
suffixTrace: entry.type === "split" ? splitFiltersToTrace(entry.axisFilters) : undefined,
|
|
251
257
|
}), labelOps);
|
|
252
258
|
const result = [];
|
|
253
259
|
for (const { value: entry, label } of labeledResults) {
|
|
254
260
|
const { originalColumn, spec: originalSpec } = entry;
|
|
255
|
-
const axisFilters = entry.type ===
|
|
261
|
+
const axisFilters = entry.type === "split" ? entry.axisFilters : undefined;
|
|
256
262
|
const axisFiltersTuple = splitFiltersToAxisFilter(axisFilters);
|
|
257
263
|
let finalId;
|
|
258
264
|
if (anchorCtx)
|
|
@@ -264,7 +270,7 @@ class PColumnCollection {
|
|
|
264
270
|
finalSpec = {
|
|
265
271
|
...finalSpec,
|
|
266
272
|
annotations: {
|
|
267
|
-
...
|
|
273
|
+
...finalSpec.annotations,
|
|
268
274
|
[plModelCommon.Annotation.Label]: label,
|
|
269
275
|
},
|
|
270
276
|
};
|
|
@@ -272,7 +278,7 @@ class PColumnCollection {
|
|
|
272
278
|
result.push({
|
|
273
279
|
id: finalId,
|
|
274
280
|
spec: finalSpec,
|
|
275
|
-
data: () => entry.type ===
|
|
281
|
+
data: () => entry.type === "split"
|
|
276
282
|
? plModelCommon.entriesToDataInfo(axis_filtering.filterDataInfoEntries(entry.dataEntries, axisFiltersTuple))
|
|
277
283
|
: entry.originalColumn.data,
|
|
278
284
|
label: label,
|
|
@@ -293,10 +299,11 @@ class PColumnCollection {
|
|
|
293
299
|
// search all axes that can be reached by linkers from anchor axes; anchor axes are not in this list;
|
|
294
300
|
const availableByLinkersAxes = linkerMap.getReachableByLinkersAxesFromAxes(anchorAxes, matchAxisIdFn);
|
|
295
301
|
// search all columns that includes at least one of additional axes;
|
|
296
|
-
const availableByLinkersColumns = this.getUniversalEntries((spec) => !plModelCommon.isLinkerColumn(spec) &&
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
302
|
+
const availableByLinkersColumns = this.getUniversalEntries((spec) => !plModelCommon.isLinkerColumn(spec) &&
|
|
303
|
+
spec.axesSpec.some((columnAxisSpec) => {
|
|
304
|
+
const columnAxisId = plModelCommon.getAxisId(columnAxisSpec);
|
|
305
|
+
return availableByLinkersAxes.some((axis) => matchAxisIdFn(plModelCommon.getAxisId(axis), columnAxisId));
|
|
306
|
+
}), { anchorCtx, labelOps, dontWaitAllData, overrideLabelAnnotation, exclude });
|
|
300
307
|
if (availableByLinkersColumns) {
|
|
301
308
|
result.push(...availableByLinkersColumns.filter((entry) => !ids.has(entry.id)));
|
|
302
309
|
}
|
|
@@ -306,7 +313,7 @@ class PColumnCollection {
|
|
|
306
313
|
getColumns(predicateOrSelectors, opts) {
|
|
307
314
|
const entries = this.getUniversalEntries(predicateOrSelectors, {
|
|
308
315
|
overrideLabelAnnotation: true, // default for getColumns
|
|
309
|
-
...
|
|
316
|
+
...opts,
|
|
310
317
|
});
|
|
311
318
|
if (!entries)
|
|
312
319
|
return undefined;
|