Skip to content

Commit

Permalink
Minor: avoid a copy in Expr::unalias
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Dec 19, 2023
1 parent 9bc61b3 commit 036b005
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datafusion/expr/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ impl Expr {
/// Remove an alias from an expression if one exists.
pub fn unalias(self) -> Expr {
match self {
Expr::Alias(alias) => alias.expr.as_ref().clone(),
Expr::Alias(alias) => *alias.expr,
_ => self,
}
}
Expand Down

0 comments on commit 036b005

Please sign in to comment.