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
from_plan in datafusion::optimizer::utils - Rust
[go: Go Back, main page]

pub fn from_plan(
    plan: &LogicalPlan,
    expr: &[Expr],
    inputs: &[LogicalPlan]
) -> Result<LogicalPlan>
Expand description

Returns a new logical plan based on the original one with inputs and expressions replaced.

The exprs correspond to the same order of expressions returned by LogicalPlan::expressions. This function is used in optimizers in the following way:

let new_inputs = optimize_children(..., plan, props);

// get the plans expressions to optimize
let exprs = plan.expressions();

// potentially rewrite plan expressions
let rewritten_exprs = rewrite_exprs(exprs);

// create new plan using rewritten_exprs in same position
let new_plan = from_plan(&plan, rewritten_exprs, new_inputs);