Skip to main content

decode_flat_at

Function decode_flat_at 

Source
pub fn decode_flat_at(bytes: &[u8], positions: &[u32]) -> Result<Flat>
Expand description

Decodes only the values at positions of a chunk written by encode, in that order.

A compressed chunk keeps every run’s length, so the runs that are not wanted are stepped over by adding their lengths and never decompressed. That is what a scan wants when a join has already said which rows it keeps: in TPC-H q10 the customer scan keeps a quarter of its rows, and decompressing the other three quarters of four string columns was most of what it did. The other shapes are decoded whole and picked from, which costs what reading them always did.

§Errors

As decode, and if the positions do not rise or one is past the end of the chunk.