fix(benchmarks): validate predicate_eval results - #25037
Merged
adriangb merged 1 commit intoSep 8, 2026
Merged
Conversation
The predicate_eval benchmark template had no `result` directive, so
`benchmark_runner predicate_eval --result-mode validate` silently
verified nothing: it reported success without comparing any query
output. Add a `result` directive pointing at a per-query CSV keyed by
`${NAME}`, mirroring the convention used by clickbench and h2o.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #25037 +/- ##
==========================================
+ Coverage 81.67% 81.72% +0.04%
==========================================
Files 1126 1127 +1
Lines 414842 416273 +1431
Branches 414842 416273 +1431
==========================================
+ Hits 338841 340196 +1355
- Misses 56070 56087 +17
- Partials 19931 19990 +59 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
comphead
approved these changes
Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
N/A - no issue; this is a standalone fix to the benchmark harness.
Rationale for this change
The
predicate_evalSQL benchmark template(
benchmarks/sql_benchmarks/predicate_eval/predicate_eval.benchmark.template)had no
resultdirective. Every other suite that supports--result-mode validatehas one (e.g.benchmarks/sql_benchmarks/clickbench/benchmarks/q00.benchmark,benchmarks/sql_benchmarks/h2o/window_sorted.benchmark.template), butpredicate_evalwas missing it entirely. As a result,benchmark_runner predicate_eval --result-mode validatesilently verifiednothing:
SqlBenchmark::verify_resultsreturns early when there are noresult_queries, so the run reports success without ever comparing queryoutput against a persisted baseline.
What changes are included in this PR?
Add a
resultdirective to thepredicate_evaltemplate, after therunline, pointing at a per-query CSV keyed by the benchmark's
${NAME}parameter (each
qNN.benchmarkin the suite sets a uniqueNAME), mirroringthe convention used by the
clickbenchandh2osuites:No expected-result CSVs are committed — like the other suites, these are
generated locally with
--result-mode persist(sql_benchmarks/*/results/is excluded from
.gitignore's generalresultsrule but no CSVs under itare tracked in the repo today).
What is the testing strategy for this PR?
Built
benchmark_runnerin release mode and ran thepredicate_evalcostselsubgroup withPRED_ROWS=100000to keep it fast:--result-mode persist— writes one CSV per query undersql_benchmarks/predicate_eval/results/, e.g.costsel_q01_regexp_selective_last.csvcontainingcount(*)/51.--result-mode validate— passes cleanly against the persisted CSVs.51to999999and re-ran--result-mode validate. It now fails loudly:git stash) with no result CSVs present on disk, and reran--result-mode validate. It exited 0 and printed normal benchmark timingoutput with no validation performed at all — confirming the bug this PR
fixes.
Are there any user-facing changes?
No public API changes. This only affects the benchmark harness
(
benchmarks/), enablingpredicate_evalto actually validate queryresults when run with
--result-mode validate, matching every other SQLbenchmark suite.
🤖 Generated with Claude Code