pub struct SimplifyContext<'a> { /* private fields */ }
Expand description
Provides simplification information based on DFSchema and
ExecutionProps
. This is the default implementation used by DataFusion
§Example
See the simplify_demo
in the expr_api
example
Implementations§
Source§impl<'a> SimplifyContext<'a>
impl<'a> SimplifyContext<'a>
Sourcepub fn new(props: &'a ExecutionProps) -> Self
pub fn new(props: &'a ExecutionProps) -> Self
Create a new SimplifyContext
Sourcepub fn with_schema(self, schema: DFSchemaRef) -> Self
pub fn with_schema(self, schema: DFSchemaRef) -> Self
Register a DFSchemaRef
with this context
Trait Implementations§
Source§impl<'a> Clone for SimplifyContext<'a>
impl<'a> Clone for SimplifyContext<'a>
Source§fn clone(&self) -> SimplifyContext<'a>
fn clone(&self) -> SimplifyContext<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for SimplifyContext<'a>
impl<'a> Debug for SimplifyContext<'a>
Source§impl<'a> SimplifyInfo for SimplifyContext<'a>
impl<'a> SimplifyInfo for SimplifyContext<'a>
Source§fn is_boolean_type(&self, expr: &Expr) -> Result<bool>
fn is_boolean_type(&self, expr: &Expr) -> Result<bool>
Returns true if this Expr has boolean type
Source§fn get_data_type(&self, expr: &Expr) -> Result<DataType>
fn get_data_type(&self, expr: &Expr) -> Result<DataType>
Returns data type of this expr needed for determining optimized int type of a value
Source§fn execution_props(&self) -> &ExecutionProps
fn execution_props(&self) -> &ExecutionProps
Returns details needed for partial expression evaluation
Auto Trait Implementations§
impl<'a> Freeze for SimplifyContext<'a>
impl<'a> !RefUnwindSafe for SimplifyContext<'a>
impl<'a> Send for SimplifyContext<'a>
impl<'a> Sync for SimplifyContext<'a>
impl<'a> Unpin for SimplifyContext<'a>
impl<'a> !UnwindSafe for SimplifyContext<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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