Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

benchbox-datagen

Latest version: v0.1.0

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
PyPI package Publisher: joeharris76
0 Stars
0 Forks
1 Versions
Rust Repo language

Scan summary

benchbox-datagen was last scanned on 30 Nov 2026 at version 0.1.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 30 Nov 2026.
  • Findings: No rules fired in version 0.1.0.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.0 LATEST 30 Nov 2026 No rules fired

No rules fired in 0.1.0

Findings

Findings for v0.1.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

benchbox-datagen

Deterministic, high-throughput benchmark data generation for BenchBox, written in Rust and exposed to Python through PyO3.

The design and its validation gates are recorded in BenchBox's docs/internal/adr/adr-benchbox-datagen.md.

Scope

The library is built in stages:

  1. TPC-H
  2. TPC-DS, including fractional scales and refresh sets
  3. SSB
  4. The BenchBox synthetic generators (h2odb, tsbs_devops, clickbench, tpch_skew, vector_search, coffeeshop, joinorder_synthetic, amplab)

TPC generation depends on the upstream Apache-2.0 crates from datafusion-contrib/tpcgen-rs, pinned by exact version. This project does not fork them: fixes go upstream, and any patch carried until upstream releases it is listed under Carried upstream patches.

Today the library generates TPC-H (all eight tables, any scale factor), TPC-DS (the 24 benchmark tables at scale factors below 1 and at integer scale factors of 1 or more, in CompatMode::C, byte-identical to the bundled patched dsdgen), SSB (all five tables, any scale factor), amplab (all three tables, any scale factor), clickbench (the hits table, any scale factor), coffeeshop (all three tables, any scale factor), h2odb (the trips table, any scale factor), joinorder_synthetic (all 21 tables, any scale factor), tpch_skew (all eight tables, any scale factor), tsbs_devops (all five tables, any scale factor), and vector_search (both tables, any scale factor) as Arrow record batches or as files, and reports exact per-table row counts. Output carries BenchBox's Arrow types (int64, decimal128(15, 2), date32, utf8, NOT NULL columns non-nullable). Delimited output is byte-identical to the bundled dbgen / dsdgen -TERMINATE n output (no trailing |), for every table (TPC-H partsupp and lineitem differ from dbgen only at the fractional scale factors listed under Carried upstream patches). Below TPC-DS scale factor 1 the patched dsdgen scale model (max(1, floor(SF 1 rows x SF)), six static tables) supplies every table's row counts to tpcdsgen through a caller-supplied Scaling, so all 24 tables come from tpcdsgen at every scale factor. TPC-H refresh sets (dbgen -U) and TPC-DS refresh sets (dsdgen -update <n>: the 21 s_* source files, delete_<n>.dat and inventory_delete_<n>.dat) are available through write_refresh, byte-identical to the bundled generators. tpcdsgen 4.0.0 has no refresh generators, so the TPC-DS source tables are generated by this library's module tpcds_update, ported from dsdgen (see TPC-DS refresh sets for the TPC-derived files) and built on tpcdsgen's public random streams, distributions and row types, seeded by the optional rng_seed (dsdgen -rngseed). TPC-H rejects rng_seed. TPC-DS refresh sets are available at scale factors below 1 and on the dsdgen scale grid (see below). Refresh-set generators are proposed upstream in datafusion-contrib/tpcgen-rs#678. SSB has no refresh sets and write_refresh("ssb", ...) raises an error. Parquet output is written in Rust with 122,880-row row groups and the benchbox.parquet_writer=benchbox-datagen-<major> key-value entry; neither format's bytes depend on the thread count. SSB output is described under Deterministic synthetic generators.

Python

import pyarrow as pa
import benchbox_datagen

reader = pa.RecordBatchReader.from_stream(
    benchbox_datagen.generate_table("tpch", "lineitem", scale_factor=1.0, part=1, parts=4)
)
for batch in reader:
    ...

generate_table returns an object that implements the Arrow PyCapsule stream interface (__arrow_c_stream__), so any Arrow-compatible library can consume it without copying.

import benchbox_datagen

counts = benchbox_datagen.row_counts("tpch", 10.0)
assert counts["lineitem"] == 59_986_052

ranges = benchbox_datagen.key_ranges("tpcds", 10.0)
assert ranges["item"]["i_item_sk"] == (1, 102_000)

ranges = benchbox_datagen.key_ranges("ssb", 10.0)
assert ranges["lineorder"]["lo_custkey"] == (1, 300_000)

files = benchbox_datagen.write_tables(
    "tpch",
    10.0,
    "out/tpch_sf10",
    format="parquet",
    compression="zstd",
    threads=8,
)
for file in files:
    print(file.table, file.path, file.rows, file.bytes)

write_tables(benchmark, scale_factor, output_dir, format="parquet", compression=None, threads=None, parts=1, seed=None) writes one <table>.<format> file per table (format is "parquet" or "tbl"; Parquet compression is "none", "snappy" (default), "gzip" or "zstd"; .tbl is uncompressed). With parts > 1 each table except nation and region is split into <table>.<format>.<part> files (for example lineitem.tbl.3, the same shard naming BenchBox uses). threads=None uses every available CPU. generate_table takes the same seed. Seeded synthetic benchmarks (such as ssb, clickbench, and the other seeded generators) default to 42; passing a seed to an unseeded benchmark (tpch) raises ValueError.

Deterministic synthetic generators

Every generator that is not a TPC tool follows one contract, implemented in benchbox-datagen-core's synthetic module. Changing any part of it changes the output and is a generator version bump that refreezes the golden hashes.

  • Fixed blocks. A table is produced in blocks of 65,536 rows; block b holds rows [b * 65,536, (b + 1) * 65,536). A block is a pure function of (benchmark, table, scale factor, seed, b), so any number of threads produces the same bytes. The existing ordered pipeline consumes blocks in index order, .tbl writes them as they arrive, and the Parquet writer regroups them into 122,880-row groups.

  • Independent streams. Each block draws from its own ChaCha8 stream (rand_chacha, pinned to an exact version) keyed by (benchmark, table, stream name, seed, block). The 256-bit key is derived with FNV-1a 64 over the domain string benchbox-datagen/synthetic/v1 and the names, then over the seed as its own 8-byte field (so no seed can alias another stream's names), then a SplitMix64 finalizer over the block index. A table may use several named streams (SSB lineorder uses fields and orders).

  • Owned sampling. Bounded integers use an unbiased widening multiply with Lemire rejection (32-bit draw for bounds up to 65,536, 64-bit otherwise), floats use the top 53 bits of a draw, choices and word lists index a slice, weighted choices search a cumulative integer table, and dates use integer civil-calendar arithmetic. Nothing depends on the platform's floating-point library; any transcendental function must come from the pure-Rust libm crate.

  • Cross-block state (for example SSB order numbering) comes from a separate cheap stream that is summed over whole orders (a prefix pass built only up to the block being generated and checked for cancellation between blocks), never from sequential generation, so blocks stay independent.

  • Rows and parts. A table implements schema(), rows() and block(index) -> RecordBatch. parts splits a table into contiguous row ranges (blocks are sliced at the range edges), so concatenating the part files reproduces the single file byte for byte. Small dimension tables (ssb.date) are never split.

  • Text output. One text form per Arrow type, shared by every synthetic generator (the SSB bytes are unchanged). Lines end in \n; a null is an empty field. A table declares its delimited-text properties once (Generator::text_format): the delimiter (default |), a header row (default none) and the file extension (default tbl; the CSV preset is csv, with RFC 4180 quoting of fields that contain the delimiter, a quote or a newline, and "" for an empty string so it differs from a null). A header is written on part 1 only (also for a table with no rows), so concatenating the parts still reproduces the single file. Nothing else is per-generator code.

    Arrow type Text Legacy evidence
    int32, int64 plain decimal all eight generators
    date32 YYYY-MM-DD strftime("%Y-%m-%d"), date.isoformat() in amplab, clickbench, coffeeshop, tpch_skew
    timestamp[us] YYYY-MM-DD HH:MM:SS, plus .ffffff only when the microseconds are not zero (Python str(datetime)) strftime("%Y-%m-%d %H:%M:%S") in h2odb, tsbs_devops, clickbench
    float, double shortest round-trip digits in Python repr layout (0.1, 1.0, 1e-05, 1e+16, nan, inf) h2odb and amplab write Python floats through csv/str
    fixed-scale double (Kind::Fixed(n); the scale travels as the field metadata benchbox.fixed_scale, so a table cannot forget it) n decimals (1.50), ties to even (0.125 is 0.12) tsbs_devops metrics and coffeeshop prices use f"{x:.2f}"
    trimmed decimal128(p, s) (Kind::DecimalTrimmed(p, s); field metadata benchbox.trimmed_decimal) Python repr(float(x)): trailing zeros dropped, at least one decimal (2.5, 1.0, -0.05), exponent form below 1e-4 (1e-05) and from 1e16 legacy h2odb lon/lat and amplab adRevenue decimals written as Python floats
    decimal128(p, s) exactly s decimals, -0.05, no exponent TPC-H style dbgen decimals; h2odb, coffeeshop, amplab declare DECIMAL columns
    bool true / false no legacy generator among the eight writes one; the form every target engine accepts
    fixed_size_list<float>[n] [v1,v2,...], each element %.6g vector_search._array_to_csv (f"{v:.6g}" joined by ,)
    utf8 raw bytes all

    Any other Arrow type (unsigned or 8/16-bit integers, other timestamp units or time zones, negative decimal scales, lists of other types) is reported as an error before the first byte is written. Parquet needs no text form and carries every type natively; it is round-trip tested for all of them.

  • Seeds. A u64 (0 to 2**64 - 1; Python raises ValueError outside that range), default 42. Row counts never depend on the seed.

SSB

Tables, columns, types and value domains follow BenchBox's legacy random.Random(42) generator; only the random stream changed. Row counts follow the Star Schema Benchmark specification (O'Neil, O'Neil, Chen, "The Star Schema Benchmark", Revision 3, 2009, Figure 1.1 and sections 2.2-2.6, https://www.cs.umb.edu/~poneil/StarSchemaB.PDF) as implemented by the reference ssb-dbgen (driver.c, dss.h, build.c; checked against eyalroz/ssb-dbgen at ae1e254 and vadimtk/ssb-dbgen):

Table Rows at scale factor SF Source
date 2,556 (1992-01-01 to 1998-12-30), all scale factors paper section 2.6 ("7 years of days", no count); vadimtk/ssb-dbgen driver.c and shared.h (NUM_DAYS 2556); eyalroz/ssb-dbgen has 2,557
customer 30,000 * SF paper section 2.5; driver.c base 30000
supplier 2,000 * SF paper section 2.4; driver.c base 2000
part 200,000 * floor(1 + log2(SF)) for SF >= 1 paper section 2.3; driver.c rowcnt = base * floor(1 + log(scale)/log(2))
lineorder 6,000,000 * SF paper section 2.2 and Figure 1.1 (ORDERS SF*1,500,000, LO_LINENUMBER 1-7); driver.c order base 150,000 x 10, O_LCNT_MIN/MAX 1-7

For SF < 1 the reference scales every base count by SF (truncated, at least 1), so part is 200,000 * SF; the library keeps date at 2,556 because the reference's own scaling of the date base would leave foreign keys without a parent. For non-integer SF >= 1 the reference truncates SF to an integer first; the library scales customer, supplier and lineorder linearly and takes floor(log2(SF)) of the exact SF (computed from the float exponent, no libm). lineorder is exactly 6,000,000 * SF rows (row counts never depend on the seed): orders are runs of consecutive rows, each order draws 1-7 lines uniformly, and the final order is cut at the row count, so the order count is 1,500,000 * SF within sampling noise. Order n (from 1) has key ((n >> 3) << 5) + (n & 7), the reference mk_sparse mapping for the paper's "first 8 of each 32 keys populated", and line numbers restart at 1. date is byte-identical to legacy date.tbl for its 2,556 rows, apart from line endings (the legacy writer emits CRLF) and the legacy 2,557th row.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases benchbox-datagen

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229