datafusion_row::accessor

Struct RowAccessor

Source
pub struct RowAccessor<'a> { /* private fields */ }
Expand description

Provides read/write/modify access to a tuple stored in Row format at data[base_offset..]

Set / Update data
    in [u8]
     ─ ─ ─ ─ ─ ─ ─ ┐         Read data out as native
    │                         types or ScalarValues
                   │
    │  ┌───────────────────────┐
       │                       │
    └ ▶│         [u8]          │─ ─ ─ ─ ─ ─ ─ ─▶
       │                       │
       └───────────────────────┘

Implementations§

Source§

impl<'a> RowAccessor<'a>

Source

pub fn new(schema: &Schema) -> Self

new

Source

pub fn new_from_layout(layout: Arc<RowLayout>) -> Self

Source

pub fn point_to(&mut self, offset: usize, data: &'a mut [u8])

Update this row to point to position offset in base

Source

pub fn get_bool_opt(&self, idx: usize) -> Option<bool>

Source

pub fn get_u8_opt(&self, idx: usize) -> Option<u8>

Source

pub fn get_u16_opt(&self, idx: usize) -> Option<u16>

Source

pub fn get_u32_opt(&self, idx: usize) -> Option<u32>

Source

pub fn get_u64_opt(&self, idx: usize) -> Option<u64>

Source

pub fn get_i8_opt(&self, idx: usize) -> Option<i8>

Source

pub fn get_i16_opt(&self, idx: usize) -> Option<i16>

Source

pub fn get_i32_opt(&self, idx: usize) -> Option<i32>

Source

pub fn get_i64_opt(&self, idx: usize) -> Option<i64>

Source

pub fn get_f32_opt(&self, idx: usize) -> Option<f32>

Source

pub fn get_f64_opt(&self, idx: usize) -> Option<f64>

Source

pub fn get_i128_opt(&self, idx: usize) -> Option<i128>

Source

pub fn get_bool_scalar(&self, idx: usize) -> ScalarValue

Source

pub fn get_u8_scalar(&self, idx: usize) -> ScalarValue

Source

pub fn get_u16_scalar(&self, idx: usize) -> ScalarValue

Source

pub fn get_u32_scalar(&self, idx: usize) -> ScalarValue

Source

pub fn get_u64_scalar(&self, idx: usize) -> ScalarValue

Source

pub fn get_i8_scalar(&self, idx: usize) -> ScalarValue

Source

pub fn get_i16_scalar(&self, idx: usize) -> ScalarValue

Source

pub fn get_i32_scalar(&self, idx: usize) -> ScalarValue

Source

pub fn get_i64_scalar(&self, idx: usize) -> ScalarValue

Source

pub fn get_f32_scalar(&self, idx: usize) -> ScalarValue

Source

pub fn get_f64_scalar(&self, idx: usize) -> ScalarValue

Source

pub fn get_as_scalar(&self, dt: &DataType, index: usize) -> ScalarValue

Source

pub fn add_u8(&mut self, idx: usize, value: u8)

add field at idx with value

Source

pub fn add_u16(&mut self, idx: usize, value: u16)

add field at idx with value

Source

pub fn add_u32(&mut self, idx: usize, value: u32)

add field at idx with value

Source

pub fn add_u64(&mut self, idx: usize, value: u64)

add field at idx with value

Source

pub fn add_i8(&mut self, idx: usize, value: i8)

add field at idx with value

Source

pub fn add_i16(&mut self, idx: usize, value: i16)

add field at idx with value

Source

pub fn add_i32(&mut self, idx: usize, value: i32)

add field at idx with value

Source

pub fn add_i64(&mut self, idx: usize, value: i64)

add field at idx with value

Source

pub fn add_f32(&mut self, idx: usize, value: f32)

add field at idx with value

Source

pub fn add_f64(&mut self, idx: usize, value: f64)

add field at idx with value

Source

pub fn add_i128(&mut self, idx: usize, value: i128)

add field at idx with value

Source

pub fn max_bool(&mut self, idx: usize, value: bool)

check max then update

Source

pub fn max_u8(&mut self, idx: usize, value: u8)

check max then update

Source

pub fn max_u16(&mut self, idx: usize, value: u16)

check max then update

Source

pub fn max_u32(&mut self, idx: usize, value: u32)

check max then update

Source

pub fn max_u64(&mut self, idx: usize, value: u64)

check max then update

Source

pub fn max_i8(&mut self, idx: usize, value: i8)

check max then update

Source

pub fn max_i16(&mut self, idx: usize, value: i16)

check max then update

Source

pub fn max_i32(&mut self, idx: usize, value: i32)

check max then update

Source

pub fn max_i64(&mut self, idx: usize, value: i64)

check max then update

Source

pub fn max_f32(&mut self, idx: usize, value: f32)

check max then update

Source

pub fn max_f64(&mut self, idx: usize, value: f64)

check max then update

Source

pub fn max_i128(&mut self, idx: usize, value: i128)

check max then update

Source

pub fn min_bool(&mut self, idx: usize, value: bool)

check max then update

Source

pub fn min_u8(&mut self, idx: usize, value: u8)

check max then update

Source

pub fn min_u16(&mut self, idx: usize, value: u16)

check max then update

Source

pub fn min_u32(&mut self, idx: usize, value: u32)

check max then update

Source

pub fn min_u64(&mut self, idx: usize, value: u64)

check max then update

Source

pub fn min_i8(&mut self, idx: usize, value: i8)

check max then update

Source

pub fn min_i16(&mut self, idx: usize, value: i16)

check max then update

Source

pub fn min_i32(&mut self, idx: usize, value: i32)

check max then update

Source

pub fn min_i64(&mut self, idx: usize, value: i64)

check max then update

Source

pub fn min_f32(&mut self, idx: usize, value: f32)

check max then update

Source

pub fn min_f64(&mut self, idx: usize, value: f64)

check max then update

Source

pub fn min_i128(&mut self, idx: usize, value: i128)

check max then update

Source

pub fn bitand_bool(&mut self, idx: usize, value: bool)

check bit_and then update

Source

pub fn bitand_u8(&mut self, idx: usize, value: u8)

check bit_and then update

Source

pub fn bitand_u16(&mut self, idx: usize, value: u16)

check bit_and then update

Source

pub fn bitand_u32(&mut self, idx: usize, value: u32)

check bit_and then update

Source

pub fn bitand_u64(&mut self, idx: usize, value: u64)

check bit_and then update

Source

pub fn bitand_i8(&mut self, idx: usize, value: i8)

check bit_and then update

Source

pub fn bitand_i16(&mut self, idx: usize, value: i16)

check bit_and then update

Source

pub fn bitand_i32(&mut self, idx: usize, value: i32)

check bit_and then update

Source

pub fn bitand_i64(&mut self, idx: usize, value: i64)

check bit_and then update

Source

pub fn bitor_bool(&mut self, idx: usize, value: bool)

check bit_and then update

Source

pub fn bitor_u8(&mut self, idx: usize, value: u8)

check bit_and then update

Source

pub fn bitor_u16(&mut self, idx: usize, value: u16)

check bit_and then update

Source

pub fn bitor_u32(&mut self, idx: usize, value: u32)

check bit_and then update

Source

pub fn bitor_u64(&mut self, idx: usize, value: u64)

check bit_and then update

Source

pub fn bitor_i8(&mut self, idx: usize, value: i8)

check bit_and then update

Source

pub fn bitor_i16(&mut self, idx: usize, value: i16)

check bit_and then update

Source

pub fn bitor_i32(&mut self, idx: usize, value: i32)

check bit_and then update

Source

pub fn bitor_i64(&mut self, idx: usize, value: i64)

check bit_and then update

Source

pub fn bitxor_u8(&mut self, idx: usize, value: u8)

check bit_and then update

Source

pub fn bitxor_u16(&mut self, idx: usize, value: u16)

check bit_and then update

Source

pub fn bitxor_u32(&mut self, idx: usize, value: u32)

check bit_and then update

Source

pub fn bitxor_u64(&mut self, idx: usize, value: u64)

check bit_and then update

Source

pub fn bitxor_i8(&mut self, idx: usize, value: i8)

check bit_and then update

Source

pub fn bitxor_i16(&mut self, idx: usize, value: i16)

check bit_and then update

Source

pub fn bitxor_i32(&mut self, idx: usize, value: i32)

check bit_and then update

Source

pub fn bitxor_i64(&mut self, idx: usize, value: i64)

check bit_and then update

Trait Implementations§

Source§

impl<'a> Debug for RowAccessor<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for RowAccessor<'a>

§

impl<'a> RefUnwindSafe for RowAccessor<'a>

§

impl<'a> Send for RowAccessor<'a>

§

impl<'a> Sync for RowAccessor<'a>

§

impl<'a> Unpin for RowAccessor<'a>

§

impl<'a> !UnwindSafe for RowAccessor<'a>

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,