pub fn ensure_begin_non_decreasing(
stream_id: &str,
batch: &RecordBatch,
) -> Result<(), Error>Expand description
Verifies that batch’s begin column is non-decreasing, naming stream_id and the offending
row/values in both the returned error and (unlike a plain anyhow::ensure!) an error! log
line emitted immediately before it: nothing on ensure_begin_non_decreasing‘s callers’ error
propagation path (MaterializedView::scan -> DataFusion planning -> the flight SQL service)
logs a planning-time error at error level, so the check logs itself instead of relying on that
propagation.
pub, not inlined into write_partition, so rust/analytics/tests/ (an external integration
crate that can only reach pub items) can call it directly with a hand-built batch.