Skip to main content

Module data

Module data 

Source
Expand description

Synthetic data generation and direct persist writes. This supports the direct-write use case; the mechanism does not depend on it.

Enums§

Cell
An owned scalar value, packable into a Row.

Functions§

pack_cells
Pack one row from owned cells, in column order.
rows_for_bytes
Number of rows needed to roughly hit target_bytes given pad-wide payloads. Overhead per row is approximate; coarse sizing, not exact.
sample_desc
A two-column (bigint, text) schema used as the default for the generators and the script reader.
sample_rows
Builds n rows of the sample_desc schema; payload is pad bytes wide so callers can target a byte budget (≈ n * (pad + overhead)).
sample_rows_from
Like sample_rows, but ids run start..start + n. Successive batches with disjoint id ranges produce distinct rows that never consolidate with each other, so a downstream count equals the total rows written.
synth_cell
A deterministic synthetic value for a column of scalar_type at row index i.
synth_rows
Generate n synthetic rows for desc, with row indices running start..start + n.
write_rows_single_ts
Writes rows to shard at ts, advancing upper to ts+1. All rows are inserted with diff +1. Returns once the append succeeds.
write_rows_spread
Writes rows spread across timestamps 0..n_ts (row i at time i % n_ts) in a single append that seals [0, n_ts). All rows are inserted with diff +1. This is one compare_and_append regardless of n_ts — persist accepts updates at any timestamp within the sealed range — so it stays fast even for very large n_ts (a per-timestamp append would be n_ts consensus round-trips).