pub trait GetData<'a> {
Show 15 methods
// Provided methods
fn get_bool(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<bool>> { ... }
fn get_byte(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i8>> { ... }
fn get_short(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i16>> { ... }
fn get_int(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i32>> { ... }
fn get_long(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i64>> { ... }
fn get_float(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<f32>> { ... }
fn get_double(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<f64>> { ... }
fn get_date(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i32>> { ... }
fn get_timestamp(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i64>> { ... }
fn get_decimal(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<i128>> { ... }
fn get_str(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<&'a str>> { ... }
fn get_binary(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<&'a [u8]>> { ... }
fn get_list(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<ListItem<'a>>> { ... }
fn get_map(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<MapItem<'a>>> { ... }
fn get_struct_list(
&'a self,
_row_index: usize,
field_name: &str,
) -> DeltaResult<Option<StructList<'a>>> { ... }
}Expand description
When calling back into a RowVisitor, the engine needs to provide a slice of items that
implement this trait. This allows type_safe extraction from the raw data by the kernel. By
default all these methods will return an Error that an incorrect type has been asked
for. Therefore, for each “data container” an Engine has, it is only necessary to implement the
get_x method for the type it holds.
All methods return Ok(None) when the row’s value is null.
Provided Methods§
fn get_bool( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<bool>>
fn get_byte( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i8>>
fn get_short( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i16>>
fn get_int( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i32>>
fn get_long( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i64>>
fn get_float( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<f32>>
fn get_double( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<f64>>
fn get_date( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i32>>
fn get_timestamp( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i64>>
fn get_decimal( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<i128>>
fn get_str( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<&'a str>>
fn get_binary( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<&'a [u8]>>
fn get_list( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<ListItem<'a>>>
fn get_map( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<MapItem<'a>>>
fn get_struct_list( &'a self, _row_index: usize, field_name: &str, ) -> DeltaResult<Option<StructList<'a>>>
Trait Implementations§
Source§impl<'a> TypedGetData<'a, &'a [u8]> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, &'a [u8]> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, &'a str> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, &'a str> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, HashMap<String, String>> for dyn GetData<'a> + '_
Provide an impl to get a map field as a HashMap<String, String>. Note that this will
allocate the map and allocate for each entry
impl<'a> TypedGetData<'a, HashMap<String, String>> for dyn GetData<'a> + '_
Provide an impl to get a map field as a HashMap<String, String>. Note that this will
allocate the map and allocate for each entry
Source§impl<'a> TypedGetData<'a, ListItem<'a>> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, ListItem<'a>> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, MapItem<'a>> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, MapItem<'a>> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, String> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, String> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, Vec<String>> for dyn GetData<'a> + '_
Provide an impl to get a list field as a Vec<String>. Note that this will allocate the vector
and allocate for each string entry.
impl<'a> TypedGetData<'a, Vec<String>> for dyn GetData<'a> + '_
Provide an impl to get a list field as a Vec<String>. Note that this will allocate the vector
and allocate for each string entry.
Source§impl<'a> TypedGetData<'a, bool> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, bool> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, f32> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, f32> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, f64> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, f64> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, i8> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, i8> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, i16> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, i16> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, i32> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, i32> for dyn GetData<'a> + '_
Source§impl<'a> TypedGetData<'a, i64> for dyn GetData<'a> + '_
impl<'a> TypedGetData<'a, i64> for dyn GetData<'a> + '_
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl GetData<'_> for BooleanArray
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl GetData<'_> for BooleanArray
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.Source§impl GetData<'_> for PrimitiveArray<Date32Type>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl GetData<'_> for PrimitiveArray<Date32Type>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.Source§impl GetData<'_> for PrimitiveArray<Decimal128Type>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl GetData<'_> for PrimitiveArray<Decimal128Type>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.fn get_decimal( &self, row_index: usize, _field_name: &str, ) -> DeltaResult<Option<i128>>
Source§impl GetData<'_> for PrimitiveArray<Float32Type>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl GetData<'_> for PrimitiveArray<Float32Type>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.Source§impl GetData<'_> for PrimitiveArray<Float64Type>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl GetData<'_> for PrimitiveArray<Float64Type>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.fn get_double( &self, row_index: usize, _field_name: &str, ) -> DeltaResult<Option<f64>>
Source§impl GetData<'_> for PrimitiveArray<Int8Type>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl GetData<'_> for PrimitiveArray<Int8Type>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.Source§impl GetData<'_> for PrimitiveArray<Int16Type>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl GetData<'_> for PrimitiveArray<Int16Type>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.Source§impl GetData<'_> for PrimitiveArray<Int32Type>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl GetData<'_> for PrimitiveArray<Int32Type>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.Source§impl GetData<'_> for PrimitiveArray<Int64Type>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl GetData<'_> for PrimitiveArray<Int64Type>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.Source§impl GetData<'_> for PrimitiveArray<TimestampMicrosecondType>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl GetData<'_> for PrimitiveArray<TimestampMicrosecondType>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.fn get_timestamp( &self, row_index: usize, _field_name: &str, ) -> DeltaResult<Option<i64>>
Source§impl<'a, OffsetSize: OffsetSizeTrait> GetData<'a> for GenericListArray<OffsetSize>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl<'a, OffsetSize: OffsetSizeTrait> GetData<'a> for GenericListArray<OffsetSize>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.fn get_list( &'a self, row_index: usize, field_name: &str, ) -> DeltaResult<Option<ListItem<'a>>>
fn get_struct_list( &'a self, row_index: usize, field_name: &str, ) -> DeltaResult<Option<StructList<'a>>>
Source§impl<'a, OffsetSize: OffsetSizeTrait> GetData<'a> for GenericListViewArray<OffsetSize>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl<'a, OffsetSize: OffsetSizeTrait> GetData<'a> for GenericListViewArray<OffsetSize>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.fn get_list( &'a self, row_index: usize, field_name: &str, ) -> DeltaResult<Option<ListItem<'a>>>
fn get_struct_list( &'a self, row_index: usize, field_name: &str, ) -> DeltaResult<Option<StructList<'a>>>
Source§impl<'a> GetData<'a> for ()
impl<'a> GetData<'a> for ()
fn get_bool( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<bool>>
fn get_byte( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<i8>>
fn get_short( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<i16>>
fn get_int( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<i32>>
fn get_long( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<i64>>
fn get_float( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<f32>>
fn get_double( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<f64>>
fn get_date( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<i32>>
fn get_timestamp( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<i64>>
fn get_decimal( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<i128>>
fn get_str( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<&'a str>>
fn get_binary( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<&'a [u8]>>
fn get_list( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<ListItem<'a>>>
fn get_map( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<MapItem<'a>>>
fn get_struct_list( &'a self, _row_index: usize, _field_name: &str, ) -> DeltaResult<Option<StructList<'a>>>
Source§impl<'a> GetData<'a> for BinaryViewArray
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl<'a> GetData<'a> for BinaryViewArray
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.fn get_binary( &'a self, row_index: usize, _field_name: &str, ) -> DeltaResult<Option<&'a [u8]>>
Source§impl<'a> GetData<'a> for GenericByteArray<GenericBinaryType<i32>>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl<'a> GetData<'a> for GenericByteArray<GenericBinaryType<i32>>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.fn get_binary( &'a self, row_index: usize, _field_name: &str, ) -> DeltaResult<Option<&'a [u8]>>
Source§impl<'a> GetData<'a> for GenericByteArray<GenericBinaryType<i64>>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl<'a> GetData<'a> for GenericByteArray<GenericBinaryType<i64>>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.fn get_binary( &'a self, row_index: usize, _field_name: &str, ) -> DeltaResult<Option<&'a [u8]>>
Source§impl<'a> GetData<'a> for GenericByteArray<GenericStringType<i32>>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl<'a> GetData<'a> for GenericByteArray<GenericStringType<i32>>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.Source§impl<'a> GetData<'a> for GenericByteArray<GenericStringType<i64>>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl<'a> GetData<'a> for GenericByteArray<GenericStringType<i64>>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.Source§impl<'a> GetData<'a> for MapArray
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl<'a> GetData<'a> for MapArray
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.Source§impl<'a> GetData<'a> for RunArray<Int64Type>
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.Implement GetData for RunArray directly, so we can return it as a trait object
without needing a wrapper struct or Box::leak.
impl<'a> GetData<'a> for RunArray<Int64Type>
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.Implement GetData for RunArray directly, so we can return it as a trait object without needing a wrapper struct or Box::leak.
This implementation supports multiple value types (strings, integers, booleans, etc.) by runtime downcasting of the values array.
fn get_str( &'a self, row_index: usize, field_name: &str, ) -> DeltaResult<Option<&'a str>>
fn get_int( &'a self, row_index: usize, field_name: &str, ) -> DeltaResult<Option<i32>>
fn get_long( &'a self, row_index: usize, field_name: &str, ) -> DeltaResult<Option<i64>>
fn get_bool( &'a self, row_index: usize, field_name: &str, ) -> DeltaResult<Option<bool>>
fn get_binary( &'a self, row_index: usize, field_name: &str, ) -> DeltaResult<Option<&'a [u8]>>
Source§impl<'a> GetData<'a> for StringViewArray
Available on crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.
impl<'a> GetData<'a> for StringViewArray
default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.