build_unmatched_batch

Function build_unmatched_batch 

Source
fn build_unmatched_batch(
    output_schema: SchemaRef,
    batch: &RecordBatch,
    batch_bitmap: BooleanArray,
    another_side_schema: SchemaRef,
    col_indices: &[ColumnIndex],
    join_type: JoinType,
    batch_side: JoinSide,
) -> Result<Option<RecordBatch>>
Expand description

§Example:

§batch: a

1 2 3

§batch_bitmap:

false true false

another_side_schema: [(b, bool), (c, int32)]

join_type: JoinType::Left

col_indices: …(please refer to the comment in `NLJStream::column_indices``)

batch_side: right

§Walkthrough:

This executor is performing a right join, and the currently processed right batch is as above. After joining it with all buffered left rows, the joined entries are marked by the batch_bitmap. This method will keep the unmatched indices on the batch side (right), and pad the left side with nulls. The result would be:

§b c a

Null(bool) Null(Int32) 1 Null(bool) Null(Int32) 3