Jimexist commented on a change in pull request #571:
URL: https://github.com/apache/arrow-datafusion/pull/571#discussion_r657106785
##########
File path: datafusion/src/sql/planner.rs
##########
@@ -2884,11 +2881,9 @@ mod tests {
let sql = "SELECT order_id, MAX(qty) OVER (ORDER BY order_id),
MIN(qty) OVER (ORDER BY order_id DESC) from orders";
let expected = "\
Projection: #orders.order_id, #MAX(orders.qty), #MIN(orders.qty)\
- \n WindowAggr: windowExpr=[[MAX(#orders.qty)]]\
- \n Sort: #orders.order_id ASC NULLS FIRST\
- \n WindowAggr: windowExpr=[[MIN(#orders.qty)]]\
- \n Sort: #orders.order_id DESC NULLS FIRST\
- \n TableScan: orders projection=None";
+ \n WindowAggr: windowExpr=[[MAX(#orders.qty) ORDER BY
[#orders.order_id ASC NULLS FIRST]]]\
Review comment:
rust uses timsort, and it shall be quick (to reverse an already sorted
vec).
ref: https://en.wikipedia.org/wiki/Timsort#Descending_runs
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]