import { PColumnDataUniversal } from "../internal.js"; import { TreeNodeAccessor } from "../accessor.js"; import { DataInfo, DataInfoEntries, PColumn, PColumnKey, PartitionedDataInfoEntries } from "@milaboratories/pl-model-common"; export declare const RT_RESOURCE_MAP: string; export declare const RT_RESOURCE_MAP_PARTITIONED: string; export declare const RT_JSON_PARTITIONED: string; export declare const RT_BINARY_PARTITIONED: string; export declare const RT_PARQUET_PARTITIONED: string; export declare const RT_JSON_SUPER_PARTITIONED: string; export declare const RT_BINARY_SUPER_PARTITIONED: string; export declare const RT_PARQUET_SUPER_PARTITIONED: string; export type PColumnResourceMapEntry = { key: PColumnKey; value: T; }; export type PColumnResourceMapData = { isComplete: boolean; data: PColumnResourceMapEntry[]; }; export declare function parseResourceMap(acc: TreeNodeAccessor | undefined, resourceParser: (acc: TreeNodeAccessor) => T | undefined, addEntriesWithNoData: false): PColumnResourceMapData>; export declare function parseResourceMap(acc: TreeNodeAccessor | undefined, resourceParser: (acc: TreeNodeAccessor) => T | undefined, addEntriesWithNoData: true): PColumnResourceMapData; export type PColumnKeyList = { /** array of keys */ data: PColumnKey[]; /** length of partition key */ keyLength: number; }; /** Returns a list of all partition keys appeared in the p-column */ export declare function getPartitionKeysList(acc: TreeNodeAccessor | undefined): PColumnKeyList | undefined; /** Returns an array of unique partition keys for each column: the i-th element in the resulting 2d array contains all unique values of i-th partition axis. */ export declare function getUniquePartitionKeys(acc: DataInfoEntries): (string | number)[][]; export declare function getUniquePartitionKeys(acc: DataInfoEntries | TreeNodeAccessor | undefined): (string | number)[][] | undefined; /** * Parses the PColumn data from a TreeNodeAccessor into a DataInfoEntries structure. * Returns undefined if any required data is missing. * Throws error on validation failures. * * @param acc - The TreeNodeAccessor containing PColumn data * @param keyPrefix - Optional key prefix for recursive calls * @returns DataInfoEntries representation of the PColumn data, or undefined if incomplete */ export declare function parsePColumnData(acc: TreeNodeAccessor | undefined, keyPrefix?: PColumnKey): PartitionedDataInfoEntries | undefined; /** * Converts or parses the input into DataInfoEntries format. * @param acc - The input data, which can be TreeNodeAccessor, DataInfoEntries, DataInfo, or undefined. * @returns The data in DataInfoEntries format, or undefined if the input was undefined or data is not ready. */ export declare function convertOrParsePColumnData(acc: TreeNodeAccessor | DataInfoEntries | DataInfo | undefined): DataInfoEntries | undefined; /** * Returns the total number of rows in a PColumn, or `undefined` when the count * cannot be determined without downloading data blobs. * * Derivable cases: * - Inline values ({@link PColumnValues}): one entry per row. * - Inline `Json` {@link DataInfo}: one entry per row. * - Parquet (`ParquetPartitioned` / `ParquetSuperPartitioned`): summed from * each chunk's precomputed {@link ParquetChunkMetadata.stats} `numberOfRows`, * read from the chunk resource metadata without downloading the parquet files. * * Returns `undefined` when: * - the data is `undefined` or still computing / not ready, * - the data is `JsonPartitioned` or `BinaryPartitioned` (per-part row counts * live inside opaque blobs and are not readable here), * - any parquet chunk is missing `stats.numberOfRows`. * * Note: do not confuse row count with `keyLength` / `partitionKeyLength`, which * are axis-tuple lengths, not row counts. */ export declare function getNumberOfRows(data: PColumnDataUniversal | undefined): number | undefined; export declare function isPColumnReady(c: PColumn): c is PColumn; export declare function allPColumnsReady(columns: PColumn[]): columns is PColumn[]; //# sourceMappingURL=pcolumn_data.d.ts.map