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

Function unnormalize_col

datafusion/expr/src/expr_rewriter/mod.rs:161–174  ·  view source on GitHub ↗

Recursively 'unnormalize' (remove all qualifiers) from an expression tree. For example, if there were expressions like `foo.bar` this would rewrite it to just `bar`.

(expr: Expr)

Source from the content-addressed store, hash-verified

159/// For example, if there were expressions like `foo.bar` this would
160/// rewrite it to just `bar`.
161pub fn unnormalize_col(expr: Expr) -> Expr {
162 expr.transform(|expr| {
163 Ok({
164 if let Expr::Column(c) = expr {
165 let col = Column::new_unqualified(c.name);
166 Transformed::yes(Expr::Column(col))
167 } else {
168 Transformed::no(expr)
169 }
170 })
171 })
172 .data()
173 .expect("Unnormalize is infallible")
174}
175
176/// Create a Column from the Scalar Expr
177pub fn create_col_from_scalar_expr(

Callers 1

unnormalize_colsFunction · 0.85

Calls 3

ColumnClass · 0.50
dataMethod · 0.45
transformMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…