Skip to main content

schedule_and_decode

Function schedule_and_decode 

Source
pub async fn schedule_and_decode(
    column_infos: Vec<Arc<ColumnInfo>>,
    requested_rows: RequestedRows,
    filter: FilterExpression,
    column_indices: Vec<u32>,
    target_schema: Arc<Schema>,
    config: SchedulerDecoderConfig,
) -> Result<BoxStream<'static, ReadBatchTask>>
Expand description

Initializes the scheduler, schedules the requested rows, and returns a stream of decode tasks for the resulting batches.

This is a convenience function that creates both the scheduler and the decoder, which can be a little tricky to get right.

ยงWhy is this async?

Constructing the scheduler runs initialize which will perform I/O unless the data required is already in the file metadata cache.

When DecoderConfig::inline_scheduling resolves to true, the subsequent (synchronous) scheduling work also runs before this function returns, leaving a fully primed decode stream.