Skip to main content

StoredPart

Struct StoredPart 

Source
pub struct StoredPart {
    pub stripe: usize,
    pub part: usize,
    pub row: usize,
    pub rows: usize,
    pub encoding: String,
    pub bytes: u64,
    pub page: u64,
    pub offset: u64,
    pub low: Option<Value>,
    pub high: Option<Value>,
    pub nulls: Option<usize>,
}
Expand description

How one part of one column is stored, which is one row of pragma_storage_info.

Everything here is read off the file rather than worked out from the schema, because the whole question this answers is what the encoder chose, and the encoder chooses per part. Two files holding the same rows in a different order give different answers and that difference is the reason to ask.

The encoding costs a read of the column’s page, so this is not free the way Layout is. It is one read per column per stripe rather than one per part, because a part is a few kilobytes out of a page that is a quarter of a megabyte.

Fields§

§stripe: usize

Which stripe the part belongs to.

§part: usize

Which part of that stripe it is, counting from zero inside the stripe.

§row: usize

The table wide row number the part starts at.

§rows: usize

How many rows it holds.

§encoding: String

What the encoder made of it, as a line of text like DICT(PACKED, PACKED).

§bytes: u64

The stored bytes of the part, which is what it costs in the file.

§page: u64

Where in the file the column page holding this part starts.

§offset: u64

Where in that page the part starts.

§low: Option<Value>

The smallest value the part holds, when the stored ranges say.

§high: Option<Value>

The largest, same.

§nulls: Option<usize>

How many of its rows are null, when the stored ranges say.

Trait Implementations§

Source§

impl Clone for StoredPart

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StoredPart

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.