import { type BackfillEvalResultsDenormResult } from './backfillJobStore';
export type { BackfillTargets, BackfillReadSource, BackfillResumeCursor, BackfillCheckpoint, BackfillEvalResultsDenormOptions, } from './evalDenormBackfillTypes';
export type { BackfillEvalResultsDenormResult } from './backfillJobStore';
import type { BackfillCheckpoint, BackfillEvalResultsDenormOptions, BackfillReadSource, BackfillResumeCursor } from './evalDenormBackfillTypes';
/** Stable total order for cursor pagination. */
export declare function buildBackfillOrderByClause(readSource: BackfillReadSource): string;
export declare function buildBackfillLimitClause(batchSize: number): string;
/** Legacy: OFFSET bootstrap when an old checkpoint has nextOffset but no resumeCursor. */
export declare function buildBackfillLimitOffsetClause(batchSize: number, offset: number): string;
export declare function rowToResumeCursor(row: Record<string, unknown>): BackfillResumeCursor;
/** Rows strictly after `cursor` in the backfill sort order. */
export declare function buildBackfillCursorPredicate(readSource: BackfillReadSource, cursor: BackfillResumeCursor): string;
export declare function resolveResumeCursor(checkpoint: BackfillCheckpoint): BackfillResumeCursor | null;
/** Progress row count from checkpoint (not used for fetch when resumeCursor exists). */
export declare function resolveResumeOffset(checkpoint: BackfillCheckpoint): number;
export type BackfillOffsetShardRange = {
    /** Inclusive start offset in the stable ORDER BY over the scoped eval_results set. */
    startOffset: number;
    /** Exclusive end offset (shard stops when nextOffset >= endOffset). */
    endOffset: number;
};
export declare function computeOffsetShardRanges(totalRows: number, shardCount: number): BackfillOffsetShardRange[];
export declare function backfillEvalResultsDenorm(options?: BackfillEvalResultsDenormOptions): Promise<BackfillEvalResultsDenormResult>;
//# sourceMappingURL=backfillEvalResultsDenorm.d.ts.map