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

[GitHub] [arrow-datafusion] mustafasrepo opened a new issue, #5915: Treat PARTITION BY expressions as set

mustafasrepo opened a new issue, #5915:
URL: https://github.com/apache/arrow-datafusion/issues/5915

   ### Is your feature request related to a problem or challenge?
   
   Currently when window frame is `PARTITION BY a,b ORDER BY c` and input is ordered by `b, a, c`. `WindowAggExec` expects its input to be ordered by `a, b`. Hence we need to add another `SortExec` before `WindowAggExec` to change ordering from `b, a, c` to `a, b, c`. However, if we were to use equivalent window expression:`PARTITION BY b, a ORDER BY c` existing ordering would work. The algorithm for removing sort should treat partition by columns as set. Algorithm shouldn't depend on the order of the columns. With this functionality we can produce better plans.
   
   ### Describe the solution you'd like
   
   PARTITION BY columns should be treated as set. As longs any permutation of the PARTITION by expressions matches existing ordering. Existing ordering shouldn't be changed.
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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.apache.org

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


[GitHub] [arrow-datafusion] alamb closed issue #5915: Treat PARTITION BY expressions as set in window expressions

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #5915: Treat PARTITION BY expressions as set in window expressions
URL: https://github.com/apache/arrow-datafusion/issues/5915


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