pub trait ValuesBuffer: Default {
// Required method
fn pad_nulls(
&mut self,
read_offset: usize,
values_read: usize,
levels_read: usize,
valid_mask: &[u8],
);
}
Expand description
A buffer that supports padding with nulls
Required Methods§
Sourcefn pad_nulls(
&mut self,
read_offset: usize,
values_read: usize,
levels_read: usize,
valid_mask: &[u8],
)
fn pad_nulls( &mut self, read_offset: usize, values_read: usize, levels_read: usize, valid_mask: &[u8], )
If a column contains nulls, more level data may be read than value data, as null
values are not encoded. Therefore, first the levels data is read, the null count
determined, and then the corresponding number of values read to a ValuesBuffer
.
It is then necessary to move this values data into positions that correspond to the non-null level positions. This is what this method does.
It is provided with:
read_offset
- the offset inValuesBuffer
to start null padding fromvalues_read
- the number of values readlevels_read
- the number of levels readvalid_mask
- a packed mask of valid levels
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.