pub struct LambdaVariable {
pub name: String,
pub field: Option<FieldRef>,
pub spans: Spans,
}Expand description
A named reference to a lambda parameter which includes it’s own FieldRef,
which is used to implement ExprSchemable, for example. It is an option only to make
easier for expr_api users to construct lambda variables, but any expression
tree or LogicalPlan containing unresolved variables must be resolved before
usage with either Expr::resolve_lambda_variables or
LogicalPlan::resolve_lambda_variables. The default SQL planner produces
already resolved variables and no further resolving is required.
After resolving, if any argument from the lambda function which this variables originates from have it’s field changed (type, nullability, metadata, etc), the resolved variable may became outdated and must be resolved again.
Fields§
§name: String§field: Option<FieldRef>§spans: SpansImplementations§
Source§impl LambdaVariable
impl LambdaVariable
Sourcepub fn new(name: String, field: Option<FieldRef>) -> Self
pub fn new(name: String, field: Option<FieldRef>) -> Self
Create a lambda variable from a name and an optional field.
If the field is none, the expression tree or LogicalPlan which
owns this variable must be resolved before usage with either
Expr::resolve_lambda_variables or LogicalPlan::resolve_lambda_variables.
pub fn spans_mut(&mut self) -> &mut Spans
Trait Implementations§
Source§impl Clone for LambdaVariable
impl Clone for LambdaVariable
Source§fn clone(&self) -> LambdaVariable
fn clone(&self) -> LambdaVariable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LambdaVariable
impl Debug for LambdaVariable
impl Eq for LambdaVariable
Source§impl Hash for LambdaVariable
impl Hash for LambdaVariable
Source§impl PartialEq for LambdaVariable
impl PartialEq for LambdaVariable
Source§fn eq(&self, other: &LambdaVariable) -> bool
fn eq(&self, other: &LambdaVariable) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for LambdaVariable
impl PartialOrd for LambdaVariable
impl StructuralPartialEq for LambdaVariable
Auto Trait Implementations§
impl Freeze for LambdaVariable
impl RefUnwindSafe for LambdaVariable
impl Send for LambdaVariable
impl Sync for LambdaVariable
impl Unpin for LambdaVariable
impl UnsafeUnpin for LambdaVariable
impl UnwindSafe for LambdaVariable
Blanket Implementations§
impl<T> Allocation for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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