Repository navigation
Commit 9b81ff8
bench: make wide_schema honor DATA_DIR like the other sql_benchmarks (#22836)
## Which issue does this PR close?
- Relates to #21968 (wide-schema benchmark work).
## Rationale for this change
Every `sql_benchmarks` suite declares its external-table `LOCATION` as
`${DATA_DIR:-data}/...`, and the matching `bench.sh run_*` forwards
`DATA_DIR="${DATA_DIR}"` to the benchmark process — e.g. `clickbench`,
`imdb`, `tpch`, `push_down_topk`, `h2o` all do this.
`wide_schema` (added in #21970) diverged on **both** counts:
- `wide_schema/init/load.sql` hardcoded `LOCATION
'data/wide_schema/...'` (no `${DATA_DIR}`)
- `run_wide_schema` did not forward `DATA_DIR`
Run from inside the repo this happens to work, because the process CWD
is the repo's `benchmarks/` and the relative `data/` path resolves. But
it breaks whenever the data directory is not under the current directory
— for example the CI benchmark runner builds/runs the benchmark from a
separate source checkout while staging the dataset elsewhere and
pointing at it via `DATA_DIR`. There, wide_schema fails at load:
```
initialization failed: No files found at file:///.../benchmarks/data/wide_schema/wide/.
Cannot infer schema from an empty location; either add data files or declare an explicit schema for the table.
```
(The `bench.sh` variable `DATA_DIR` is set but not exported, so it only
reaches the benchmark when a `run_*` function passes it explicitly —
which `run_tpch` etc. do and `run_wide_schema` did not.)
## What changes are included in this PR?
Two one-line fixes bringing `wide_schema` in line with the convention
used by every other suite:
- `load.sql`: `data/wide_schema/...` →
`${DATA_DIR:-data}/wide_schema/...`
- `run_wide_schema`: forward `DATA_DIR="${DATA_DIR}"` for both the
`wide` and `narrow` subgroups
## Are these changes tested?
Benchmark tooling only. The substitution path is the same one every
other suite already relies on: the SQL harness's `process_replacements`
resolves `${DATA_DIR:-data}` from the env (falling back to `data`), and
`run_wide_schema` now forwards `DATA_DIR` exactly as `run_tpch` does.
Verified `bench.sh` still parses (`bash -n`). Default in-repo behavior
is unchanged (CWD-relative `data/`).
## Are there any user-facing changes?
No. Benchmark harness only.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>1 parent bdfdd09 commit 9b81ff8
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
| 789 | + | |
789 | 790 | | |
790 | 791 | | |
791 | 792 | | |
792 | 793 | | |
793 | 794 | | |
794 | 795 | | |
| 796 | + | |
795 | 797 | | |
796 | 798 | | |
797 | 799 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
0 commit comments