Skip to content

chore(tpch): Restrict scale_factor to a set of choices#3429

Merged
dangotbanned merged 35 commits intotpch/refactor-clifrom
tpch/refactor-cli-choices
Feb 1, 2026
Merged

chore(tpch): Restrict scale_factor to a set of choices#3429
dangotbanned merged 35 commits intotpch/refactor-clifrom
tpch/refactor-cli-choices

Conversation

@dangotbanned
Copy link
Member

@dangotbanned dangotbanned commented Jan 31, 2026

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 float was 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_factor Database Batches Disk (GB) Memory (GB)
<10 1 In-memory 1 0.003 - 0.25 0.009 - 0.67
10 2 In-memory 12 2.59 7.00
30 File-based (temporary) 4 7.76 Negligible

Related issues

Footnotes

  1. Everything prior to this PR worked this way, but it doesn't scale-up

  2. See Resource Usage of the Data Generator

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"
]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 dangotbanned marked this pull request as draft January 31, 2026 12:46
@dangotbanned dangotbanned marked this pull request as ready for review February 1, 2026 00:59
@dangotbanned dangotbanned merged commit a005bc9 into tpch/refactor-cli Feb 1, 2026
36 checks passed
@dangotbanned dangotbanned deleted the tpch/refactor-cli-choices branch February 1, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants