Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
ExprPlanner in datafusion::logical_expr::planner - Rust
[go: Go Back, main page]

Trait datafusion::logical_expr::planner::ExprPlanner

source ·
pub trait ExprPlanner: Send + Sync {
    // Provided methods
    fn plan_binary_op(
        &self,
        expr: RawBinaryExpr,
        _schema: &DFSchema,
    ) -> Result<PlannerResult<RawBinaryExpr>, DataFusionError> { ... }
    fn plan_field_access(
        &self,
        expr: RawFieldAccessExpr,
        _schema: &DFSchema,
    ) -> Result<PlannerResult<RawFieldAccessExpr>, DataFusionError> { ... }
    fn plan_array_literal(
        &self,
        exprs: Vec<Expr>,
        _schema: &DFSchema,
    ) -> Result<PlannerResult<Vec<Expr>>, DataFusionError> { ... }
    fn plan_position(
        &self,
        args: Vec<Expr>,
    ) -> Result<PlannerResult<Vec<Expr>>, DataFusionError> { ... }
    fn plan_dictionary_literal(
        &self,
        expr: RawDictionaryExpr,
        _schema: &DFSchema,
    ) -> Result<PlannerResult<RawDictionaryExpr>, DataFusionError> { ... }
    fn plan_extract(
        &self,
        args: Vec<Expr>,
    ) -> Result<PlannerResult<Vec<Expr>>, DataFusionError> { ... }
    fn plan_substring(
        &self,
        args: Vec<Expr>,
    ) -> Result<PlannerResult<Vec<Expr>>, DataFusionError> { ... }
    fn plan_struct_literal(
        &self,
        args: Vec<Expr>,
        _is_named_struct: bool,
    ) -> Result<PlannerResult<Vec<Expr>>, DataFusionError> { ... }
}
Expand description

This trait allows users to customize the behavior of the SQL planner

Provided Methods§

source

fn plan_binary_op( &self, expr: RawBinaryExpr, _schema: &DFSchema, ) -> Result<PlannerResult<RawBinaryExpr>, DataFusionError>

Plan the binary operation between two expressions, returns original BinaryExpr if not possible

source

fn plan_field_access( &self, expr: RawFieldAccessExpr, _schema: &DFSchema, ) -> Result<PlannerResult<RawFieldAccessExpr>, DataFusionError>

Plan the field access expression

returns original FieldAccessExpr if not possible

source

fn plan_array_literal( &self, exprs: Vec<Expr>, _schema: &DFSchema, ) -> Result<PlannerResult<Vec<Expr>>, DataFusionError>

Plan the array literal, returns OriginalArray if not possible

Returns origin expression arguments if not possible

source

fn plan_position( &self, args: Vec<Expr>, ) -> Result<PlannerResult<Vec<Expr>>, DataFusionError>

source

fn plan_dictionary_literal( &self, expr: RawDictionaryExpr, _schema: &DFSchema, ) -> Result<PlannerResult<RawDictionaryExpr>, DataFusionError>

Plan the dictionary literal { key: value, ...}

Returns origin expression arguments if not possible

source

fn plan_extract( &self, args: Vec<Expr>, ) -> Result<PlannerResult<Vec<Expr>>, DataFusionError>

Plan an extract expression, e.g., EXTRACT(month FROM foo)

Returns origin expression arguments if not possible

source

fn plan_substring( &self, args: Vec<Expr>, ) -> Result<PlannerResult<Vec<Expr>>, DataFusionError>

Plan an substring expression, e.g., SUBSTRING(<expr> [FROM <expr>] [FOR <expr>])

Returns origin expression arguments if not possible

source

fn plan_struct_literal( &self, args: Vec<Expr>, _is_named_struct: bool, ) -> Result<PlannerResult<Vec<Expr>>, DataFusionError>

Plans a struct struct(expression1[, ..., expression_n]) literal based on the given input expressions. This function takes a vector of expressions and a boolean flag indicating whether the struct uses the optional name

Returns a PlannerResult containing either the planned struct expressions or the original input expressions if planning is not possible.

Implementors§