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

Method restore

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

Ensures the qualified name of the rewritten expression is preserved

(self, expr: Expr)

Source from the content-addressed store, hash-verified

359impl SavedName {
360 /// Ensures the qualified name of the rewritten expression is preserved
361 pub fn restore(self, expr: Expr) -> Expr {
362 match self {
363 SavedName::Saved { relation, name } => {
364 let (new_relation, new_name) = expr.qualified_name();
365 if new_relation != relation || new_name != name {
366 expr.alias_qualified(relation, name)
367 } else {
368 expr
369 }
370 }
371 SavedName::None => expr,
372 }
373 }
374}
375
376#[cfg(test)]

Callers 10

test_rewriteFunction · 0.80
plan_aggregateMethod · 0.80
plan_windowMethod · 0.80
try_optimize_windowMethod · 0.80
rewrite_planMethod · 0.80
analyze_internalFunction · 0.80
optimize_internalMethod · 0.80

Calls 2

qualified_nameMethod · 0.80
alias_qualifiedMethod · 0.80

Tested by 1

test_rewriteFunction · 0.64