This is an automated email from the ASF dual-hosted git repository.

viirya pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new b456cf78db Minor: avoid a copy in Expr::unalias (#8588)
b456cf78db is described below

commit b456cf78db87bd1369b79a7eec4e3764f551982d
Author: Andrew Lamb <[email protected]>
AuthorDate: Tue Dec 19 14:56:34 2023 -0500

    Minor: avoid a copy in Expr::unalias (#8588)
---
 datafusion/expr/src/expr.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/datafusion/expr/src/expr.rs b/datafusion/expr/src/expr.rs
index f0aab95b8f..b46e9ec8f6 100644
--- a/datafusion/expr/src/expr.rs
+++ b/datafusion/expr/src/expr.rs
@@ -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,
         }
     }

Reply via email to