pub trait SimplifyInfo {
// Required methods
fn is_boolean_type(&self, expr: &Expr) -> Result<bool, DataFusionError>;
fn nullable(&self, expr: &Expr) -> Result<bool, DataFusionError>;
fn execution_props(&self) -> &ExecutionProps;
fn get_data_type(&self, expr: &Expr) -> Result<DataType, DataFusionError>;
}
Expand description
Provides the information necessary to apply algebraic simplification to an Expr. See SimplifyContext for one concrete implementation.
This trait exists so that other systems can plug schema
information in without having to create DFSchema
objects. If you
have a DFSchemaRef
you can use SimplifyContext
Required Methods§
Sourcefn is_boolean_type(&self, expr: &Expr) -> Result<bool, DataFusionError>
fn is_boolean_type(&self, expr: &Expr) -> Result<bool, DataFusionError>
Returns true if this Expr has boolean type
Sourcefn nullable(&self, expr: &Expr) -> Result<bool, DataFusionError>
fn nullable(&self, expr: &Expr) -> Result<bool, DataFusionError>
Returns true of this expr is nullable (could possibly be NULL)
Sourcefn execution_props(&self) -> &ExecutionProps
fn execution_props(&self) -> &ExecutionProps
Returns details needed for partial expression evaluation
Sourcefn get_data_type(&self, expr: &Expr) -> Result<DataType, DataFusionError>
fn get_data_type(&self, expr: &Expr) -> Result<DataType, DataFusionError>
Returns data type of this expr needed for determining optimized int type of a value