Trait datafusion_expr::expr_schema::ExprSchemable
source · pub trait ExprSchemable {
// Required methods
fn get_type<S: ExprSchema>(&self, schema: &S) -> Result<DataType>;
fn nullable<S: ExprSchema>(&self, input_schema: &S) -> Result<bool>;
fn metadata<S: ExprSchema>(
&self,
schema: &S
) -> Result<HashMap<String, String>>;
fn to_field(&self, input_schema: &DFSchema) -> Result<DFField>;
fn cast_to<S: ExprSchema>(
self,
cast_to_type: &DataType,
schema: &S
) -> Result<Expr>;
}
Expand description
trait to allow expr to typable with respect to a schema
Required Methods§
sourcefn get_type<S: ExprSchema>(&self, schema: &S) -> Result<DataType>
fn get_type<S: ExprSchema>(&self, schema: &S) -> Result<DataType>
given a schema, return the type of the expr
sourcefn nullable<S: ExprSchema>(&self, input_schema: &S) -> Result<bool>
fn nullable<S: ExprSchema>(&self, input_schema: &S) -> Result<bool>
given a schema, return the nullability of the expr
sourcefn metadata<S: ExprSchema>(&self, schema: &S) -> Result<HashMap<String, String>>
fn metadata<S: ExprSchema>(&self, schema: &S) -> Result<HashMap<String, String>>
given a schema, return the expr’s optional metadata