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

Function physical_name

datafusion/expr/src/expr.rs:3746–3752  ·  view source on GitHub ↗

The name of the column (field) that this `Expr` will produce in the physical plan. The difference from [Expr::schema_name] is that top-level columns are unqualified.

(expr: &Expr)

Source from the content-addressed store, hash-verified

3744/// The name of the column (field) that this `Expr` will produce in the physical plan.
3745/// The difference from [Expr::schema_name] is that top-level columns are unqualified.
3746pub fn physical_name(expr: &Expr) -> Result<String> {
3747 match expr {
3748 Expr::Column(col) => Ok(col.name.clone()),
3749 Expr::Alias(alias) => Ok(alias.name.clone()),
3750 _ => Ok(expr.schema_name().to_string()),
3751 }
3752}
3753
3754#[cfg(test)]
3755mod test {

Callers 5

buildMethod · 0.85
get_physical_expr_pairFunction · 0.85

Calls 3

cloneMethod · 0.45
to_stringMethod · 0.45
schema_nameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…