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

Function replace_qualified_name

datafusion/optimizer/src/utils.rs:56–69  ·  view source on GitHub ↗
(
    expr: Expr,
    cols: &BTreeSet<Column>,
    subquery_alias: &str,
)

Source from the content-addressed store, hash-verified

54}
55
56pub(crate) fn replace_qualified_name(
57 expr: Expr,
58 cols: &BTreeSet<Column>,
59 subquery_alias: &str,
60) -> Result<Expr> {
61 let alias_cols: Vec<Column> = cols
62 .iter()
63 .map(|col| Column::new(Some(subquery_alias), &col.name))
64 .collect();
65 let replace_map: HashMap<&Column, &Column> =
66 cols.iter().zip(alias_cols.iter()).collect();
67
68 replace_col(expr, &replace_map)
69}
70
71/// Column reference to avoid copying string around
72#[derive(PartialEq, Eq, Hash, Debug)]

Callers 2

build_joinFunction · 0.85
build_joinFunction · 0.85

Calls 5

newFunction · 0.85
replace_colFunction · 0.85
collectMethod · 0.80
mapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…