Skip to content

Store the raw corpus types in the ClickBench fixture - #102

Merged
tamnd merged 1 commit into
mainfrom
fixture-stores-what-the-corpus-stores
Sep 6, 2026
Merged

tamnd merged 1 commit into
mainfrom
fixture-stores-what-the-corpus-stores

Conversation

@tamnd

@tamnd tamnd commented Sep 6, 2026

Copy link
Copy Markdown
Owner

The fixture in crates/bench-run/tests/clickbench.rs built its Arrow schema out of the DuckDB create statement. That statement is what the table looks like after a load, not what the Parquet file holds, so the fixture wrote EventDate as a date and EventTime, ClientEventTime and LocalEventTime as microsecond timestamps, all four already converted, and then handed that table to every driver with no projection at all.

That is why all forty three queries passed here on every push while seven of them failed the first time the workload was pointed at the real fourteen gigabyte corpus, which is #97. The fixture was a miniature of what the corpus becomes rather than a miniature of the corpus. The queries that did not fail were not a comfort either, because they were answering a different question from the one that would run for real.

The corpus footer says EventDate is a UInt16 count of days and the three time columns are plain Unix seconds in an Int64 with no logical type on them. The fixture now stores exactly that, and each driver is handed the projection its own published setup applies, which is the thing #99 made available.

The new test is the reason to believe any of it. without_the_published_setup_the_seven_date_queries_fail loads DataFusion against the fixture with projection: None and asserts that the failures are exactly q36 through q42, which are exactly the seven that failed on the corpus. It is the counterpart of the mutation test already in the file, and it is there for the same reason: a fixture that always passes and a fixture that cannot fail read the same way from the outside.

No numbers are in this PR. It is test code only, and no crate outside bench-run's test target changed.

Local gate green: fmt, clippy, discipline, discipline tests, workspace tests, doc tests, rustdoc, and a locked check.

The fixture built its Arrow schema out of the DuckDB create statement, which is
what the table looks like after a load rather than what the file holds. So it
wrote EventDate as a date and three columns as microsecond timestamps, all four
of them already converted, and then handed that to every driver with no
projection.

That is why all forty three queries passed here on every push while seven of
them failed the first time the workload was pointed at the real fourteen
gigabyte corpus. The fixture was a miniature of what the corpus becomes, not of
the corpus, and the queries that did not fail were quietly answering a different
question from the ones that would run for real.

The fixture now stores EventDate as an unsigned sixteen bit count of days and
the three time columns as plain Unix seconds in a signed sixty four bit integer
with no logical type, which is what the published Parquet file actually holds,
and each driver is given the projection its own published setup applies.

The new test is the reason to believe any of that. It loads DataFusion against
the fixture with no projection and asserts that exactly q36 through q42 fail,
which are exactly the seven that failed on the corpus. A fixture that drifts
back to storing the converted types stops finding them and says so here rather
than in a run somebody paid two minutes of a workstation for.
@tamnd tamnd added type: bug Something behaves incorrectly area: runner Process isolation, ordering, tiers and cache control benchmark: clickbench ClickBench labels Sep 6, 2026
@tamnd
tamnd merged commit 8d0ffd4 into main Sep 6, 2026
14 of 17 checks passed
@tamnd
tamnd deleted the fixture-stores-what-the-corpus-stores branch September 6, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runner Process isolation, ordering, tiers and cache control benchmark: clickbench ClickBench type: bug Something behaves incorrectly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant