Generate `n` synthetic rows for `desc`, with row indices running `start..start + n`. Successive batches over disjoint index ranges produce distinct rows that never consolidate, so a downstream count equals the total rows written (provided the schema carries a wide-enough column; see [`synth_cell`]).
(desc: &RelationDesc, start: u64, n: u64, pad: usize)
| 120 | /// consolidate, so a downstream count equals the total rows written (provided the |
| 121 | /// schema carries a wide-enough column; see [`synth_cell`]). |
| 122 | pub fn synth_rows(desc: &RelationDesc, start: u64, n: u64, pad: usize) -> Vec<Row> { |
| 123 | let types: Vec<SqlScalarType> = desc.iter_types().map(|c| c.scalar_type.clone()).collect(); |
| 124 | (start..start + n) |
| 125 | .map(|i| { |
| 126 | let cells: Vec<Cell> = types.iter().map(|t| synth_cell(t, i, pad)).collect(); |
| 127 | pack_cells(&cells) |
| 128 | }) |
| 129 | .collect() |
| 130 | } |
| 131 | |
| 132 | /// Builds `n` rows of the [`sample_desc`] schema; `payload` is `pad` bytes wide so |
| 133 | /// callers can target a byte budget (≈ `n * (pad + overhead)`). |
no test coverage detected