Skip to main content

exemplars_to_sparse_record_batch

Function exemplars_to_sparse_record_batch 

Source
pub fn exemplars_to_sparse_record_batch(
    exemplars: &ExemplarBatch,
    resolved_table_ids: &HashMap<String, TableId>,
    table_info: &TableInfo,
) -> Result<RecordBatch>
Expand description

Encodes a validated ExemplarBatch with __primary_key first and non-tag columns in schema order.

Uses destination ColumnIds in primary-key order so inherited tag encoding matches Mito compaction and region splits even after ALTER ... FIRST/AFTER. Exemplar schema evolution only appends nullable tags with no non-NULL default (enforced by validate_exemplar_table), and omitted NULL tags are absent from sparse keys, so batches encoded before an ALTER remain valid.

ยงPanics

Panics if exemplars is empty. Callers must skip empty writes before conversion.