alamb commented on code in PR #11337:
URL: https://github.com/apache/datafusion/pull/11337#discussion_r1669101991


##########
datafusion/substrait/src/logical_plan/consumer.rs:
##########
@@ -426,12 +426,12 @@ pub async fn from_substrait_rel(
                         new_name = format!("{}__temp__{}", name, i);
                         i += 1;
                     }
-                    names.insert(new_name.clone());
                     if new_name != name {
-                        exprs.push(x.as_ref().clone().alias(new_name.clone()));
+                        exprs.push(x.alias(new_name.clone()));

Review Comment:
   because the code returned `Arc<Expr>` previously, but most places in `Expr` 
need either `Expr` or `Box<Expr>` the code ended up copying the expressions 
unnecessarily



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to