/** * @file Give every row of a written parquet its own `source_id`, keeping the shared id as the group key. * * A renderer that wrote several texts for one record under one `source_id` leaves a file that * `splitOverlaySlice` cannot route: the hashed place holdout keys a venue row by its venue, so two texts * of one record can fall in different splits, and an attribute keyed by `source_id` states only one * split per id (#2765). * * Each id that appears in more than one row becomes `#`. The part before * `#` is the record's id, so a reader grouping the rendered variants of one record splits at the last * `#`. An id that appears in one row is left unchanged, so the overlap audit still joins that row by its * original identity. */ import type { PathBuilderLike } from "path-ts"; import { type DuckDBLimits } from "#parquet/duckdb"; export interface DistinctRowIDsOptions { input: PathBuilderLike; /** * The parquet written. * * It must differ from `input`, because a corpus file is replaced rather than rewritten. */ output: PathBuilderLike; limits?: DuckDBLimits; } export interface DistinctRowIDsResult { rows: number; /** * The ids that appeared in more than one row of `input`. */ sharedIDs: number; /** * The rows whose id was rewritten. */ rewrittenRows: number; } /** * Write `input` to `output` with every shared `source_id` made distinct per row, * row order and every other column unchanged. * * @throws When two rows share both `source_id` and `raw`, since a suffix drawn from the * text cannot tell them apart and such rows are duplicates for the caller to remove. */ export declare function distinctRowIDs(options: DistinctRowIDsOptions): Promise; //# sourceMappingURL=distinct-row-ids.d.ts.map