chore(tpch): Restrict scale_factor to a set of choices#3429
Merged
dangotbanned merged 35 commits intotpch/refactor-clifrom Feb 1, 2026
Merged
chore(tpch): Restrict scale_factor to a set of choices#3429dangotbanned merged 35 commits intotpch/refactor-clifrom
scale_factor to a set of choices#3429dangotbanned merged 35 commits intotpch/refactor-clifrom
Conversation
…data need to be generated
…data need to be generated
Removes the parameter from 6 functions
- No need to pass around `scale_factor` - Clear constructors for each entry point - Also who doesn't like method-chaining?
dangotbanned
commented
Jan 31, 2026
Comment on lines
+38
to
+40
| ScaleFactor: TypeAlias = Literal[ | ||
| "0.014", "0.052", "0.1", "0.25", "0.51", "1.0", "10.0", "30.0" | ||
| ] |
Member
Author
There was a problem hiding this comment.
I'm using string literals, since float literals aren't allowed
The annoying part is I would actually want to have "1", "10", "30" work as well.
But including them would mean most of the Literal[...] contains values that are less likely to be used
dangotbanned
commented
Jan 31, 2026
dangotbanned
commented
Jan 31, 2026
Addresses most of #3429 (comment)
It takes a while, but barely uses any RAM Can tweak things from here if needed
8GB file, no thank you
for more information, see https://pre-commit.ci
…efactor-cli-choices
dangotbanned
commented
Feb 1, 2026
dangotbanned
commented
Feb 1, 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.
Description
This makes the testing setup simpler, by only allowing a subset of what is known to work.
(see (#3421 (comment)) for benchmarking that informed these choices).
Previously, any
floatwas permitted but required lots of special-casing to prevent test failures.While narrowing down these options, an issue (#3429 (comment)) with the larger (official) scales came up.
These are now fixed, with the data generation utilizing
polars' streaming engine and following a strategy dependent on the resulting database size:scale_factorRelated issues
tpch/generate_data.py#3421scale_factor#3427tpchbenchmarks at smaller scales #3423duckdb==1.4.4in--group typing#3433Footnotes
Everything prior to this PR worked this way, but it doesn't scale-up ↩
See Resource Usage of the Data Generator ↩