Skip to content

feat: use released tpcgen-cli 4.0.0 from PyPI - #114

Open
Kevin Liu (kevinjqliu) wants to merge 1 commit into
microsoft:mainfrom
kevinjqliu:kevinjqliu-use-tpcgen-cli-4-0
Open

Kevin Liu (kevinjqliu) wants to merge 1 commit into
microsoft:mainfrom
kevinjqliu:kevinjqliu-use-tpcgen-cli-4-0

Conversation

@kevinjqliu

@kevinjqliu Kevin Liu (kevinjqliu) commented Oct 20, 2026 •

Copy link
Copy Markdown

Why this change is needed

tpcgen-cli 4.0.0 is released on PyPI. LakeBench currently vendors a pre-release binary built from a fork, plus a lot of logic to size, rename, and package its output.

How

Use the PyPI package and make the integration a thin wrapper around the CLI.

  • Dependency: tpch_datagen / tpcds_datagen install tpcgen-cli==4.0.0. Removes the vendored binaries, hatch build hook, wheel scripts, and native-wheels workflow.
  • Wrapper: datagen/_tpcgen.py builds the command and runs it. compression, target_row_group_size_mb, and num_threads are passed straight through.
  • Parts: the only thing LakeBench decides. One SF1000 size table per benchmark, targeting ~256 MiB files.
  • Output: tpcgen-cli's layout, <table>/<table>.<part>.<ext>.

Behavior changes:

  • File names: lineitem-00001.zstd.parquet → lineitem.1.parquet. Native files are no longer renamed to dbgen/dsdgen names. Loading is unaffected.
  • target_row_group_size_mb is now the uncompressed size (tpcgen-cli's --row-group-bytes).
  • compression_factor is removed.
  • TPC-DS native output now accepts num_threads.

Test

  • Unit tests pass (pytest tests/ --ignore=tests/integration), also on Python 3.8.
  • Generated TPC-H and TPC-DS with tpcgen-cli 4.0.0: Parquet at SF10 (files come out ~250 MiB) and native at SF1.
  • Loaded native SF0.1 data into DuckDB and ran queries.
  • DuckDB/Polars integration tests: 7/8 pass. The failing DuckDB TPC-DS queries (DeltaScan serialization not implemented) fail the same way with the legacy DuckDB generator.

Closes issue

N/A

@kevinjqliu
Kevin Liu (kevinjqliu) force-pushed the kevinjqliu-use-tpcgen-cli-4-0 branch 2 times, most recently from 1c48bb8 to 83ab200 Compare October 20, 2026 03:07
Replace the vendored pre-release tpcgen-cli binaries with the tpcgen-cli
4.0.0 package from PyPI (tpch_datagen / tpcds_datagen extras), and reduce
the integration to a thin wrapper around the CLI.

- One _tpcgen module builds the tpcgen-cli command and runs it. Options
  (compression, row-group size, threads) are passed straight through.
- Part counts come from one measured SF1000 size table per benchmark,
  targeting ~256 MiB files. The compression-factor, native-ratio, and
  TPC-DS row-count scaling tables are removed.
- Output keeps tpcgen-cli's layout (<table>/<table>.<part>.<ext>); the
  renaming to LakeBench and dbgen/dsdgen file names is removed.
- Remove native/tpcgen, the hatch build hook, wheel build scripts, and the
  native-wheels workflow.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@kevinjqliu
Kevin Liu (kevinjqliu) force-pushed the kevinjqliu-use-tpcgen-cli-4-0 branch from 83ab200 to 7875d4c Compare October 20, 2026 03:14

@kevinjqliu Kevin Liu (kevinjqliu) left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

removed a lot of wrapper code 😄

Comment thread uv.lock

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

note, we just released https://pypi.org/project/tpcgen-cli/ today so msft's internal pypi mirror hasn't picked it up yet. I'll regenerated the file again once its picked up

@mwc360

Copy link
Copy Markdown
Contributor

Tom Zeng (@tomz) - FYI this was anticipated work once tpcgen-cli was released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants