Trait datafusion::physical_plan::PhysicalExpr
source · [−]pub trait PhysicalExpr: Send + Sync + Display + Debug {
fn as_any(&self) -> &(dyn Any + 'static);
fn data_type(
&self,
input_schema: &Schema
) -> Result<DataType, DataFusionError>;
fn nullable(&self, input_schema: &Schema) -> Result<bool, DataFusionError>;
fn evaluate(
&self,
batch: &RecordBatch
) -> Result<ColumnarValue, DataFusionError>;
fn evaluate_selection(
&self,
batch: &RecordBatch,
selection: &BooleanArray
) -> Result<ColumnarValue, DataFusionError> { ... }
}
Expand description
Expression that can be evaluated against a RecordBatch A Physical expression knows its type, nullability and how to evaluate itself.
Required Methods
Returns the physical expression as Any
so that it can be
downcast to a specific implementation.
Get the data type of this expression, given the schema of the input
Determine whether this expression is nullable, given the schema of the input
fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue, DataFusionError>
fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue, DataFusionError>
Evaluate an expression against a RecordBatch
Provided Methods
fn evaluate_selection(
&self,
batch: &RecordBatch,
selection: &BooleanArray
) -> Result<ColumnarValue, DataFusionError>
fn evaluate_selection(
&self,
batch: &RecordBatch,
selection: &BooleanArray
) -> Result<ColumnarValue, DataFusionError>
Evaluate an expression against a RecordBatch after first applying a validity array