tree: 6a6dc93dcd5172c7d951837913e99275965c90d4
  1. benches/
  2. src/
  3. Cargo.toml
  4. README.md
native/shuffle/README.md

datafusion-comet-shuffle: Shuffle Writer and Reader

This crate provides the shuffle writer and reader implementation for Apache DataFusion Comet and is maintained as part of the Apache DataFusion Comet subproject.

Shuffle Benchmark Tool

A standalone benchmark binary (shuffle_bench) is included for profiling shuffle write performance outside of Spark. It streams input data directly from Parquet files.

Basic usage

cargo run --release --features shuffle-bench --bin shuffle_bench -- \
  --input /data/tpch-sf100/lineitem/ \
  --partitions 200 \
  --codec lz4 \
  --hash-columns 0,3

Options

OptionDefaultDescription
--input(required)Path to a Parquet file or directory of Parquet files
--partitions200Number of output shuffle partitions
--partitioninghashPartitioning scheme: hash, single, round-robin
--hash-columns0Comma-separated column indices to hash on (e.g. 0,3)
--codeclz4Compression codec: none, lz4, zstd, snappy
--zstd-level1Zstd compression level (1–22)
--batch-size8192Batch size for reading Parquet data
--memory-limit(none)Memory limit in bytes; triggers spilling when exceeded
--write-buffer-size1048576Write buffer size in bytes
--limit0Limit rows processed per iteration (0 = no limit)
--iterations1Number of timed iterations
--warmup0Number of warmup iterations before timing
--output-dir/tmp/comet_shuffle_benchDirectory for temporary shuffle output files

Profiling with flamegraph

cargo flamegraph --release --features shuffle-bench --bin shuffle_bench -- \
  --input /data/tpch-sf100/lineitem/ \
  --partitions 200 --codec lz4