Skip to main content

Module row_index

Module row_index 

Source
Expand description

Lazy frames decoded over a row index, for readers whose rows sit at places worked out from the row number: audio frames, fixed records, and the like.

The plan has no scan in it. It is a row index over a frame with no columns, only a height, and one elementwise expression per column that decodes that column’s values for the rows the index names, from an Arc of the source. So a slice anywhere decodes only its own rows, a query that names one column decodes only that column, and the streaming engine decodes a morsel at a time: filters, sorts and group-bys stream. The in-memory engine still builds the index whole up to a slice’s end, 4 bytes a row, which is why an untouched view reads its window straight from the source through crate::pushdown::Windowed.

A Polars AnonymousScan gives none of this: Polars hands it no row offset, and the streaming engine of Polars 0.55 cannot run one.

Constants§

INDEX
The row index the plan decodes from; the select over it leaves it out.
MAX_ROWS
The most rows a source can show: Polars counts rows in 32 bits.

Traits§

RowSource
A table whose values are decoded from their row numbers.

Functions§

checked
The rows index names as row numbers, or an error for a null or for a row at or past rows.
lazy
source as a lazy frame that Polars can stream, slice and prune. See the module.
lazy_numbered
lazy_with_height, each row carrying its place in the source in INDEX: the number # shows, kept through a sort or a filter. Hidden from the view as the dataset’s row index always is.
lazy_numbered_over
lazy_numbered over height, a frame of no columns whose height is the rows: for a source whose height is known only when the frame runs.
lazy_with_height
lazy with height rows, for a source that grows: the frame of no columns at its root is replaced with a taller one as rows arrive (crate::lines::bound).