/** * Render a document straight into a Parquet file. * * Reuses the very same preparation as the text renderer — one `prepareRender`, * one registry — so a config exported to Parquet holds exactly the data it * would have printed as text for that seed. Only the SERIALISATION differs: * instead of formatting a card, each named `` becomes a typed column. * * Rows are emitted in ROW GROUPS: a batch is built, written and released before * the next one starts, so memory stays bounded no matter how large `count` is. * Spec: docs/specs/2026-07-19-typed-output-and-parquet-writer.md §1, §5, §8. */ import type { DocumentContext } from '../generated/TDCParser.js'; import { type RenderOptions } from '../processor/render.js'; import { type ParquetSchemaColumn, type RowGroupBlock } from './parquet/writer.js'; /** * Rows per row group. Bounds peak memory, lets readers skip whole groups — and * is the unit parallel generation is split on, because a group's bytes do not * depend on where it sits in the file. */ export declare const ROW_GROUP_ROWS = 50000; /** Rows `[from, to)`, or the whole file when no range is given. */ export interface RowRange { readonly from: number; readonly to: number; } /** Stream the file as chunks — peak memory is one row group. */ export declare function renderParquetChunks(document: DocumentContext, options?: RenderOptions): Generator; /** * The same stream for a config that had to be prepared asynchronously. * * `type="http"` is the only such config today: the values come from a service, * so there is nothing to lay out until the call has answered. */ export declare function renderParquetChunksAsync(document: DocumentContext, options?: RenderOptions): AsyncGenerator; /** The whole file in memory. Convenient for small outputs and tests. */ export declare function renderParquet(document: DocumentContext, options?: RenderOptions): Uint8Array; /** The resolved schema, for showing the user what types were chosen. */ export declare function parquetSchemaOf(document: DocumentContext, options?: RenderOptions): readonly ParquetSchemaColumn[]; /** * The row groups for a slice of the file, each ready to be placed anywhere. * * `range` MUST start and end on a row-group boundary, or the groups would be * cut differently than a single-threaded run cuts them and the outputs would * stop matching. `parquetRowGroupCount` gives the boundaries. */ export declare function renderParquetBlocks(document: DocumentContext, options?: RenderOptions, range?: RowRange): Generator; /** How many row groups the file will hold — the unit of parallel work. */ export declare function parquetRowGroupCount(document: DocumentContext, options?: RenderOptions): number; //# sourceMappingURL=render-parquet.d.ts.map