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


##########
datafusion/substrait/src/logical_plan/consumer.rs:
##########
@@ -411,11 +411,11 @@ pub async fn from_substrait_rel(
                         from_substrait_rex(ctx, e, input.clone().schema(), 
extensions)
                             .await?;
                     // if the expression is WindowFunction, wrap in a Window 
relation
-                    if let Expr::WindowFunction(_) = x.as_ref() {
+                    if let Expr::WindowFunction(_) = &x {

Review Comment:
   For some reason, to convert an `Arc<T>` to ` &T` you can't just do 
   
   ```rust
   let my_ref = &my_arc;
   ```
   
   Rust seems to require you to do 
   
   ```rust
   let my_ref = my_arc.as_ref();
   ```
   
   I don't really know the nuances as to why.
   
   After this change, `x` is no longer an `Arc<Expr>` it is only an `Expr` 
which Rust is happier to auto-reference



-- 
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