Parquet Content-Defined Chunking
Parquet Content-Defined Chunking, now available in PyArrow and Pandas via the use_content_defined_chunking option, writes Parquet data pages so that small logical edits produce minimal byte-level differences. This lets content-addressable storage like Hugging Face's Xet layer deduplicate effectively. On a 100k-row OpenOrca subset, exact re-uploads, added or removed columns, type casts and appended rows already deduplicate well, transferring only the new pages and the footer. Row insertions and deletions defeat vanilla Parquet, though, because separately compressed pages shift: about 90 MB of 99 MB was re-uploaded. CDC aligns page boundaries to content to fix this and also handles different row-group sizes and file splits.
Related posts
- Improving Parquet Dedupe on Hugging Face Hub
Hugging Face mediumAdeptByte-level content-defined chunking dedupes Parquet appends almost perfectly: 10,000 appended rows give 99.1% dedupe and need about 20MB of new storage. A single-row edit drops dedupe to 89% (230MB new) because absolute file offsets in ColumnChunk/ColumnMetaData headers change in every column header. Deleting a row shifts the fixed-size row groups, and since each column is compressed, everything after the deletion becomes new data; turning off compression fixes dedupe but nearly doubles file size. Splitting row groups by a hash of a key column (content-defined row groups) keeps both compression and dedupe, and the proposed fixes are relative offsets in the format and CDC-aware row grouping in Parquet writers.
- A Deep Dive into Apache Parquet with ClickHouse - Part 2
ClickHouse mediumAdept
Parquet files are organized into row groups, column chunks and pages, with dictionary, RLE/bit-packing and delta encodings plus footer metadata and min/max statistics that let readers push down projections and predicates. In ClickHouse, writing via INSERT INTO FUNCTION file/s3 gives predictable control over row group size through min_insert_block_size_bytes, min_insert_block_size_rows and output_format_parquet_row_group_size, whereas SELECT ... FORMAT Parquet tends to produce many small row groups that compress worse. The new ParquetMetadata input format exposes per-column encodings, compression and statistics. Benchmarks on the UK house price dataset show Parquet at 174–348 MB depending on codec, versus 3.5 GB for uncompressed CSV.
- From Files to Chunks: Improving HF Storage Efficiency
Hugging Face mediumAdeptHugging Face's Xet team plans to replace file-level Git LFS storage with content-defined chunking (CDC), where a rolling hash over a sliding window sets variable-size chunk boundaries and chunks are deduplicated in a content-addressed store, so edits only upload and store changed chunks. A prior XetHub benchmark on the CORD-19 dataset showed roughly 50% gains, with storage dropping from 8.9 GB to 3.52 GB and download time from 51 to 19 minutes. On two versions of GPT-2's safetensors file, CDC cut total storage by 53%. Fine-tuned models and checkpoints show 30-85% dedup ratios, which could save about 100 TB immediately, and Xet-backed repos are targeted for early 2025.
- ClickHouse and Parquet: A foundation for fast Lakehouse analytics
ClickHouse mediumAdept
ClickHouse queries Parquet files directly, without ingestion, through a format-specific reader that currently parses via Arrow and then converts into ClickHouse's in-memory format. Performance rests on two things: parallelism and I/O reduction. Parallelism comes from prefetch threads, parsing threads, file streams and processing lanes. File streams are computed as min(max_threads, num_files), and parsing threads per file as max(max_parsing_threads / num_files, 1), with EXPLAIN Pipeline examples showing the resulting plans. A third native reader, "Yet Another Parquet Reader", is in development to drop the Arrow layer and improve parallelism and I/O efficiency, and the current reader serves as the benchmark baseline.
- ClickHouse Release 25.8
ClickHouse mediumAdept
ClickHouse 25.8 ships 45 features, 47 performance optimizations and 119 bug fixes. The headline is an experimental native Parquet reader (v3) that bypasses Apache Arrow. It reads columns within a row group concurrently, prefetches non-PREWHERE columns only after PREWHERE, and adds page-level min/max pruning, averaging 1.81× faster on ClickBench; in the demo a query drops from 1.5s to 0.7s. Also new: Hive-style partitioned writes via the S3 engine, Iceberg insert/delete/update/schema changes (experimental), Delta Lake writes and time travel, catalogs promoted to beta, and the _table virtual column available beyond merge().