Skip to main content

prepare_trace_column_rewrites

Function prepare_trace_column_rewrites 

Source
pub(super) fn prepare_trace_column_rewrites(
    rows: &[Row],
    pending_rewrites: Vec<PendingTraceColumnRewrite>,
    table_name: &str,
) -> Result<PreparedTraceColumnRewrites, TraceColumnRewriteError>
Expand description

Prepares an atomic rewrite plan without mutating the input rows.

For each pending column rewrite, this precomputes every required value coercion. Missing, null, and already-correct values are skipped. If any coercion fails, it returns the failing column and leaves all rows unchanged.

Target types must already have been selected by TraceRequestSchema. Call PreparedTraceColumnRewrites::apply to update the schema and values.