/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * @file Pull-based parquet reading, the same split `@mailwoman/core/fs` draws between `/readers` and `/streams`. * * A stream returns immediately and the work happens as the consumer pulls, so a caller can walk a file larger than * memory. A caller that wants the rows, or only their count, uses `./readers` instead and awaits a value. */ import type { PathBuilderLike } from "path-ts"; /** * DuckDB hands a list column back as `{ items: [...] }`. * * Unwrap it so a row reads the way the schema declares it, recursively, * because a nested list arrives nested the same way. */ export declare function normalizeDuckDBValue(value: unknown): unknown; /** * A row limit has to be a non-negative safe integer before it reaches a `limit` clause, * because it is interpolated rather than bound. */ export declare function validateRowLimit(value: number): number; export interface ParquetRowStreamOptions { /** * Columns to project. * * Every column when omitted. * * A column absent from the file raises rather than coming back absent: a projection that * silently drops a field hands the consumer a well-formed row with the field missing. * The consumer reads that as "this row has no value there" instead of "this file has no such column". */ columns?: readonly string[]; /** * Stop after this many rows. */ limit?: number; } /** * Open a row stream over a local parquet file, yielding rows in DuckDB-managed chunks. * * DuckDB opens the path itself and exposes its DataChunks through `fetchChunk()`. * Rows are converted and yielded one chunk at a time, so neither the complete Parquet file * nor the complete result set is copied into JavaScript memory. */ export declare function openParquetRowStream(path: PathBuilderLike, options?: ParquetRowStreamOptions): AsyncGenerator; //# sourceMappingURL=streams.d.ts.map