Skip to content

Commit

Permalink
ci: improve db-benchmark q8 (~2x faster) (#4614)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Aug 29, 2022
1 parent 65e2f85 commit 164936a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions py-polars/tests/db-benchmark/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,8 @@
print("q8")
out = (
x.drop_nulls("v3")
.sort("v3", reverse=True)
.groupby("id6")
.agg(pl.col("v3").head(2).alias("largest2_v3"))
.agg(pl.col("v3").top_k(2).alias("largest2_v3"))
.explode("largest2_v3")
.collect()
)
Expand Down

0 comments on commit 164936a

Please sign in to comment.