Trait ExprSchema

Source
pub trait ExprSchema: Debug {
    // Required method
    fn field_from_column(&self, col: &Column) -> Result<&Field>;

    // Provided methods
    fn nullable(&self, col: &Column) -> Result<bool> { ... }
    fn data_type(&self, col: &Column) -> Result<&DataType> { ... }
    fn metadata(&self, col: &Column) -> Result<&HashMap<String, String>> { ... }
    fn data_type_and_nullable(&self, col: &Column) -> Result<(&DataType, bool)> { ... }
}
Expand description

Provides schema information needed by certain methods of Expr (defined in the datafusion-common crate).

Note that this trait is implemented for &DFSchema which is widely used in the DataFusion codebase.

Required Methods§

Provided Methods§

Source

fn nullable(&self, col: &Column) -> Result<bool>

Is this column reference nullable?

Source

fn data_type(&self, col: &Column) -> Result<&DataType>

What is the datatype of this column?

Source

fn metadata(&self, col: &Column) -> Result<&HashMap<String, String>>

Returns the column’s optional metadata.

Source

fn data_type_and_nullable(&self, col: &Column) -> Result<(&DataType, bool)>

Return the column’s datatype and nullability

Implementors§