bench: yard_export — memo alternatives priced and timed - #1
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a885ffc401
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (const auto& alt : report.alternatives) { | ||
| if (!(alt.bag_signature == report.alternatives[report.chosen].bag_signature)) { |
There was a problem hiding this comment.
Preserve order when validating ordered alternatives
For the hump-and-bowl and three-trains workloads, which contain ORDER BY ... LIMIT, this comparison validates only the sorted bag checksum. A non-chosen alternative that returns the correct rows in the wrong order therefore passes and is reported as equivalent, even though its SQL result is incorrect. Use the ordered signature when the bound plan's order_permission is deterministic, reserving the bag comparison for genuinely unordered workloads.
Useful? React with 👍 / 👎.
| std::ofstream out(path); | ||
| if (!out) throw std::runtime_error("cannot write " + path); |
There was a problem hiding this comment.
Avoid truncating the benchmark history on export
When --markdown is set to the repository's advertised docs/benchmarks.md destination to refresh the Yard Routes section, this default-mode ofstream truncates the entire existing benchmark document before writing only the new section. Since there is no append or section-replacement logic elsewhere, a normal refresh destroys all preceding benchmark results; write a fragment explicitly or replace only the existing Yard Routes section.
Useful? React with 👍 / 👎.
Adds a standalone
yard_exportbenchmark target that, for four SQL workings, enumerates every memo alternative, prices each with the cost model, and times each through vectorized execution, writingdocs/yard/yard-routes.jsonand a "Yard Routes" section indocs/benchmarks.md.benchmarks/bench_common.hppshares the table generators, checksum signature, and timing loop betweensql_benchandyard_export; every existingsql_benchchecksum is unchanged.e2e_classtable andthree_way_routeworkload.