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