berkaysynnada commented on PR #6566:
URL: 
https://github.com/apache/arrow-datafusion/pull/6566#issuecomment-1580178810

   > We touched this window problem here [#5695 
(comment)](https://github.com/apache/arrow-datafusion/issues/5695#issuecomment-1480248977)
   > 
   > so to fix the issue completely we need to realias correctly instead of 
shorten the name in physical plan
   > 
   > 
https://github.com/apache/arrow-datafusion/blob/26e1b20ea3362ea62cb713004a0636b8af6a16d7/datafusion/core/src/physical_plan/planner.rs#L1630
   
   In planner, modifying the lines
   ```
       let (name, e) = match e {
           Expr::Alias(sub_expr, alias) => (alias.clone(), sub_expr.as_ref()),
           _ => (physical_name(e)?, e),
       };
   ```
   to that
   ```
       let (name, e) = match e {
           Expr::Alias(sub_expr, alias) => (alias.clone(), sub_expr.as_ref()),
           _ => (e.canonical_name(), e), 
       };
   ```
   solves my issue. Is this what you mean by realiasing?


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

Reply via email to