Skip to content

Add column sort ordering option to data generation #410

Open

Description

@misiugodfrey

Description

There have been some experiments to have our data reflect different features of data generation including sorting and partitioning some of the columns (ex: #408).

However, performing re-ordering pass post-generation is often time consuming and hinders scalability. The purpose of this item is to investigate how we can integrate options like these into the data generation more efficiently - ideally into upstream tpchgen directly so that we can have a single generation pass that generates data in the desired order with other required configs

Specific Config Requirements for TPCH

  • Target file size is 512 MiB per parquet (adjustable via config), snappy compressed.

  • orders: Hive-partitioned monthly by o_orderdate as o_ordermonth=YYYY-MM; sorted within each partition by (o_orderdate, o_orderkey). o_ordermonth is exposed by Hive as a virtual partition column.

  • lineitem: Hive-partitioned monthly by l_shipdate as l_shipmonth=YYYY-MM; sorted within each partition by (l_shipdate, l_orderkey, l_linenumber).

  • customer: Unpartitioned; split into files sorted by c_custkey.
    part: Unpartitioned; split into files sorted by p_partkey.

  • partsupp: Unpartitioned; split into files sorted by (ps_partkey, ps_suppkey). File cuts align to ps_partkey boundaries to preserve global ordering.

  • supplier: Unpartitioned; split into files sorted by s_suppkey.
    nation, region: Small tables copied unchanged.

Activity

  1. self-assigned this
    on Aug 31, 2026
  2. changed the title [-]Add column sort ordering to data generation[/-] [+]Add column sort ordering option to data generation[/+] on Aug 31, 2026
  3. mroeschke commented on Sep 8, 2026

    @mroeschke

    I've opened datafusion-contrib/tpcgen-rs#438 and datafusion-contrib/tpcgen-rs#439 as feature requests to tpcgen-rs for hive partitioning and table sorting respectively

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions