pub struct MiniBlockLayout {
pub rep_compression: Option<ArrayEncoding>,
pub def_compression: Option<ArrayEncoding>,
pub value_compression: Option<ArrayEncoding>,
pub dictionary: Option<ArrayEncoding>,
pub layers: Vec<i32>,
pub repetition_index_depth: u32,
pub num_items: u64,
}
Expand description
/ A layout used for pages where the data is small / / In this case we can fit many values into a single disk sector and transposing buffers is / expensive. As a result, we do not transpose the buffers but compress the data into small / chunks (called mini blocks) which are roughly the size of a disk sector.
Fields§
§rep_compression: Option<ArrayEncoding>
Description of the compression of repetition levels (e.g. how many bits per rep)
def_compression: Option<ArrayEncoding>
Description of the compression of definition levels (e.g. how many bits per def)
value_compression: Option<ArrayEncoding>
Description of the compression of values
dictionary: Option<ArrayEncoding>
Dictionary data
layers: Vec<i32>
The meaning of each repdef layer, used to interpret repdef buffers correctly
repetition_index_depth: u32
The depth of the repetition index.
If there is repetition then the depth must be at least 1. If there are many layers of repetition then deeper repetition indices will support deeper nested random access. For example, given 5 layers of repetition then the repetition index depth must be at least 3 to support access like rows[50][17][3].
We require repetition_index_depth + 1
u64 values per mini-block to store the repetition
index if the repetition_index_depth
is greater than 0. The +1 is because we need to store
the number of “leftover items” at the end of the chunk. Otherwise, we wouldn’t have any way
to know if the final item in a chunk is valid or not.
num_items: u64
The page already records how many rows are in the page. For mini-block we also need to know how many “items” are in the page. A row and an item are the same thing unless the page has lists.
Implementations§
Source§impl MiniBlockLayout
impl MiniBlockLayout
Sourcepub fn layers(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<RepDefLayer>>
pub fn layers( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<RepDefLayer>>
Returns an iterator which yields the valid enum values contained in layers
.
Sourcepub fn push_layers(&mut self, value: RepDefLayer)
pub fn push_layers(&mut self, value: RepDefLayer)
Appends the provided enum value to layers
.
Trait Implementations§
Source§impl Clone for MiniBlockLayout
impl Clone for MiniBlockLayout
Source§fn clone(&self) -> MiniBlockLayout
fn clone(&self) -> MiniBlockLayout
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MiniBlockLayout
impl Debug for MiniBlockLayout
Source§impl Default for MiniBlockLayout
impl Default for MiniBlockLayout
Source§impl Message for MiniBlockLayout
impl Message for MiniBlockLayout
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl Name for MiniBlockLayout
impl Name for MiniBlockLayout
Source§const NAME: &'static str = "MiniBlockLayout"
const NAME: &'static str = "MiniBlockLayout"
Message
.
This name is the same as it appears in the source .proto file, e.g. FooBar
.Source§const PACKAGE: &'static str = "lance.encodings"
const PACKAGE: &'static str = "lance.encodings"
.
, e.g. google.protobuf
.Source§fn full_name() -> String
fn full_name() -> String
Message
.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation
.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.Source§impl PartialEq for MiniBlockLayout
impl PartialEq for MiniBlockLayout
impl StructuralPartialEq for MiniBlockLayout
Auto Trait Implementations§
impl Freeze for MiniBlockLayout
impl RefUnwindSafe for MiniBlockLayout
impl Send for MiniBlockLayout
impl Sync for MiniBlockLayout
impl Unpin for MiniBlockLayout
impl UnwindSafe for MiniBlockLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more