You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "berkaysynnada (via GitHub)" <gi...@apache.org> on 2023/06/07 08:19:12 UTC

[GitHub] [arrow-datafusion] berkaysynnada commented on pull request #6566: Mismatch in MemTable of Select Into when projecting on aggregate window functions

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org