Skip to main content

Block

Struct Block 

Source
pub struct Block { /* private fields */ }
Expand description

Decoded Native block.

Value releases its memory with allocator used during decoding.

Implementations§

Source§

impl Block

Source

pub fn n_rows(&self) -> usize

Source

pub fn n_columns(&self) -> usize

Source

pub fn column_name(&self, i: usize) -> Option<&[u8]>

Returns column name bytes without UTF-8 validation.

Source

pub fn column_type(&self, i: usize) -> Option<TypeRef<'_>>

Source

pub fn column(&self, i: usize) -> Option<Column<'_>>

Source

pub fn validate(&self) -> Result<()>

Validates structural relationships within every column.

Validation checks array offset order and LowCardinality dictionary indexes. Call this method before using offsets or keys from untrusted data as indexes.

Runtime cost is proportional to row count.

Source

pub fn is_overflows(&self) -> bool

Returns server flag marking a block truncated by max_rows_to_group_by with group_by_overflow_mode = 'any'.

Source

pub fn bucket_num(&self) -> i32

Returns two-level aggregation bucket, or -1 when not applicable.

Trait Implementations§

Source§

impl Drop for Block

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Send for Block

Auto Trait Implementations§

§

impl !Sync for Block

§

impl Freeze for Block

§

impl RefUnwindSafe for Block

§

impl Unpin for Block

§

impl UnsafeUnpin for Block

§

impl UnwindSafe for Block

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> 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, 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.