From 6f4a147e7962752bb61b3af2d9296a5be1a83f98 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Wed, 13 Mar 2024 06:28:51 -0400 Subject: [PATCH] ci: actually fix benchmarking --- ibis/tests/benchmarks/test_benchmarks.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ibis/tests/benchmarks/test_benchmarks.py b/ibis/tests/benchmarks/test_benchmarks.py index 46c161a0e90f..d1c8aea93d46 100644 --- a/ibis/tests/benchmarks/test_benchmarks.py +++ b/ibis/tests/benchmarks/test_benchmarks.py @@ -801,16 +801,23 @@ def test_big_join_expr(benchmark, src, diff): def test_big_join_compile(benchmark, nrels): - # cache to avoid a request-per-union operand + pytest.importorskip("duckdb") + src = make_big_union( ibis.table(schema={"validation_name": "string", "id": "int64"}, name="sources"), nrels, ) diff = make_big_union( - ibis.table(schema={"validation_name": "string"}, name="diffs"), nrels + ibis.table(schema={"validation_name": "string", "id": "int64"}, name="diffs"), + nrels, ) expr = src.join(diff, ["validation_name"], how="outer") - t = benchmark.pedantic(expr.compile, rounds=1, iterations=1, warmup_rounds=1) + t = benchmark.pedantic( + lambda expr=expr: ibis.duckdb.compile(expr), + rounds=1, + iterations=1, + warmup_rounds=1, + ) assert len(t)