Skip to content

Commit

Permalink
Merge pull request #6986 from hawkfish/sorted-agg
Browse files Browse the repository at this point in the history
Issue #5920: Ordered Aggregate Sorting
  • Loading branch information
Mytherin committed Apr 15, 2023
2 parents b80d0cf + 0e65068 commit eaf5070
Show file tree
Hide file tree
Showing 7 changed files with 221 additions and 60 deletions.
19 changes: 19 additions & 0 deletions benchmark/micro/aggregate/ordered_first.benchmark
@@ -0,0 +1,19 @@
# name: benchmark/micro/aggregate/ordered_first.benchmark
# description: FIRST(i ORDER BY i) over a bunch of integers
# group: [aggregate]

name Ordered First (Grouped)
group aggregate

#load
#PRAGMA ordered_aggregate_threshold=262144

run
SELECT SUM(agg) FROM (
SELECT i / 2048 AS grp, FIRST(i ORDER BY i DESC) AS agg
FROM range(10000000) tbl(i)
GROUP BY ALL
)

result I
24420932461

0 comments on commit eaf5070

Please sign in to comment.