Skip to main content

slice_batch_by_targets

Function slice_batch_by_targets 

Source
pub fn slice_batch_by_targets(
    batch: &RecordBatch,
    row_vnodes: &[u32],
    registry: &VnodeRegistry,
    self_id: NodeId,
) -> (FxHashMap<u32, RecordBatch>, FxHashMap<NodeId, RecordBatch>)
Expand description

Slices a RecordBatch by targets. Remote rows are grouped by NodeId, and the metadata column __laminar_vnode is appended to the batch. Local rows are grouped by vnode.

Returns (local_slices, remote_slices).

§Panics

Panics if take or rebuild fails — only on internal-invariant violations.