Repository navigation
fix(tpcds-obt): load the OBT table on Snowflake and BigQuery - #2505
Conversation
On platforms with a cloud default output location (Snowflake, BigQuery), tpcds_obt read its local data from the TPC-DS source folder. The cloud staging path chose the local cache from get_data_source_benchmark() and ignored GENERATES_OWN_OUTPUT; #2420 fixed the same redirect only on the construction path. When the TPC-DS manifest in that folder was valid, the runner reused it, loaded the 25 TPC-DS source tables and never built or loaded the OBT table. The schema creates the OBT table empty, so every query ran against an empty table and the run still finished cleanly. - Both orchestrator paths now pick the local datagen folder through one helper that honours GENERATES_OWN_OUTPUT. - A benchmark can list the tables its queries read in REQUIRED_LOADED_TABLES; the run stops after load, before measuring, when any of them is missing or empty. tpcds_obt lists its OBT table. - The bundle validator reports an error when a tpcds_obt bundle's tables section lacks the OBT table or shows it empty.
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. |
Review of the OBT fix found three gaps: - The public TPCDSOBT wrapper did not expose GENERATES_OWN_OUTPUT or REQUIRED_LOADED_TABLES, so API runs skipped both. The wrapper now mirrors them from the implementation. - Manifest reuse still accepted the TPC-DS source manifest for a benchmark that builds its own tables, and the load-only path never ran the required-table check. Reuse now accepts only the benchmark's own manifest when GENERATES_OWN_OUTPUT is set, and the load-only path runs the check after loading. - A tpcds_obt bundle with measured queries but no tables block passed the validator. It is now an error, because the bundle cannot show the OBT table was loaded.
|
External review (codex, model gpt-6.1-sol, low effort, read-only static review of
No Critical findings. Review was static; tests were not run. Author dispositions (all accepted, fixed in aebfff5):
All Critical/High findings resolved. |
The runner lives in benchbox.core, which may not import benchbox.platforms, so the required-table check moves to benchbox.core.loaded_tables and both the runner and the platform adapter import it from there. The validator test moves beside the other bundle-validator tests.
Summary
On Snowflake and BigQuery,
tpcds_obtcould run its 89 queries against an empty OBT table and finish cleanly. A Snowflake SF1 bundle loaded the 25 normalized TPC-DS tables, never loadedtpcds_sales_returns_obt, and returned 0 rows for query 2 in every iteration. BigQuery and Databricks return 52.Root cause, in order:
_resolve_custom_output_root. It picked the local cache fromget_data_source_benchmark()("tpcds") and ignoredGENERATES_OWN_OUTPUT. Fix transaction_primitives on Snowflake and BigQuery #2420 fixed the same redirect only on the construction path, which Databricks takes.benchmark.tableswith the 25 source tables and never called OBT'sgenerate_data(), the only code that registers the OBT table. Whether a run was correct depended on whether that manifest happened to be stale.Changes:
benchbox/cli/orchestrator.py: both output-root paths choose the local datagen folder through one helper,_local_datagen_name, which honoursGENERATES_OWN_OUTPUT.benchbox/platforms/base/adapter.py: a benchmark can list the tables its queries read inREQUIRED_LOADED_TABLES. After load and before measuring, the run fails if any of them is missing or empty.tpcds_obtlists its OBT table.benchbox/validation/bundle.py: atpcds_obtbundle whosetablessection lacks the OBT table, or shows it with 0 rows, is an error.Verification
tpcds_obt_sf1_snowflake_sql_20261001_112551_a3b5cd41) now fails with "queries table 'tpcds_sales_returns_obt', which is not in 'tables'". The correct BigQuery and Databricks bundles still pass.Review follow-ups (second commit): the public
TPCDSOBTwrapper mirrors both class attributes; manifest reuse no longer accepts the TPC-DS manifest for a benchmark that generates its own output; the load-only path runs the same check; and atpcds_obtbundle with measured queries but notablesblock is an error. The three committed OBT bundles still pass.Soundness review: