pub struct StructFieldMapping {
pub field_accessor: Arc<ScalarUDF>,
pub fields: Vec<(Vec<ScalarValue>, usize)>,
}Expand description
Describes how a struct-producing UDF’s output fields correspond to its input arguments. This enables the optimizer to propagate orderings through struct projections (e.g., so that sorting by a struct field can be recognized as equivalent to sorting by the source column).
See ScalarUDFImpl::struct_field_mapping for details.
Fields§
§field_accessor: Arc<ScalarUDF>The UDF used to construct field access expressions on the output.
For example, the get_field UDF for accessing struct fields.
fields: Vec<(Vec<ScalarValue>, usize)>For each output field: the literal arguments to pass to the
field_accessor UDF (after the base expression), and the index
of the corresponding input argument that produces the field’s value.
For named_struct('a', col1, 'b', col2), this would be:
[(["a"], 1), (["b"], 3)] — field "a" comes from arg index 1.
Auto Trait Implementations§
impl !RefUnwindSafe for StructFieldMapping
impl !UnwindSafe for StructFieldMapping
impl Freeze for StructFieldMapping
impl Send for StructFieldMapping
impl Sync for StructFieldMapping
impl Unpin for StructFieldMapping
impl UnsafeUnpin for StructFieldMapping
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
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>
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>
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