pub enum GetFieldAccessSchema {
NamedStructField {
name: ScalarValue,
},
ListIndex {
key_dt: DataType,
},
ListRange {
start_dt: DataType,
stop_dt: DataType,
stride_dt: DataType,
},
}
Expand description
Types of the field access expression of a nested type, such as Field
or List
Variants§
NamedStructField
Named field, For example struct["name"]
Fields
§
name: ScalarValue
ListIndex
Single list index, for example: list[i]
ListRange
List stride, for example list[i:j:k]
Implementations§
source§impl GetFieldAccessSchema
impl GetFieldAccessSchema
sourcepub fn get_accessed_field(
&self,
data_type: &DataType
) -> Result<Field, DataFusionError>
pub fn get_accessed_field( &self, data_type: &DataType ) -> Result<Field, DataFusionError>
Returns the schema Field
from a DataType::List
or
DataType::Struct
indexed by this structure
§Error
Errors if
- the
data_type
is not a Struct or a List, - the
data_type
of the name/index/start-stop do not match a supported index type
Auto Trait Implementations§
impl Freeze for GetFieldAccessSchema
impl !RefUnwindSafe for GetFieldAccessSchema
impl Send for GetFieldAccessSchema
impl Sync for GetFieldAccessSchema
impl Unpin for GetFieldAccessSchema
impl !UnwindSafe for GetFieldAccessSchema
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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