MCPcopy Create free account
hub / github.com/apache/datafusion / logical2physical

Function logical2physical

datafusion/physical-expr/src/planner.rs:590–595  ·  view source on GitHub ↗

Convert a logical expression to a physical expression (without any simplification, etc)

(expr: &Expr, schema: &Schema)

Source from the content-addressed store, hash-verified

588
589/// Convert a logical expression to a physical expression (without any simplification, etc)
590pub fn logical2physical(expr: &Expr, schema: &Schema) -> Arc<dyn PhysicalExpr> {
591 // TODO this makes a deep copy of the Schema. Should take SchemaRef instead and avoid deep copy
592 let df_schema = schema.clone().to_dfschema().unwrap();
593 let execution_props = ExecutionProps::new();
594 create_physical_expr(expr, &df_schema, &execution_props).unwrap()
595}
596
597#[cfg(test)]
598mod tests {

Calls 4

newFunction · 0.85
create_physical_exprFunction · 0.85
to_dfschemaMethod · 0.80
cloneMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…