Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 5 min read Research mediumAdept

Improving Parquet Dedupe on Hugging Face Hub

Byte-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.

Assumes: Parquet file layoutcontent-defined chunkingdata deduplication

Related posts

  • Parquet Content-Defined Chunking

    Hugging Face mediumAdept

    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.

  • 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.

  • ClickHouse Release 23.8

    ClickHouse mediumAdept

    ClickHouse 23.8 makes file reads much faster by using Parquet row-group min/max statistics to skip data, answering count() from file metadata, and pruning files via the _file virtual column without reading them. On a 126GiB PyPI Parquet dataset in GCS, a count dropped from 26.5s to 11.4s, a time-range filter from 84s to 35s, and a 10% filename sample from 4.6s to 0.6s. The release also adds the S3Queue table engine for streaming ingestion from S3. It tracks processed files in ClickHouse Keeper using an unordered mode (with TTL and file-count limits) or an ordered mode keyed on filenames. Direct querying of zip, tar and 7z archives via the file function is also new.

  • DuckDB: analyze 50,000+ datasets stored on the Hugging Face Hub

    Hugging Face mediumAdept

    Every public dataset on the Hugging Face Hub is now automatically converted to Parquet by the dataset viewer and can be queried with SQL through DuckDB. Parquet file URLs come from the datasets-server `/parquet` HTTP endpoint, and DuckDB's `httpfs` extension then runs analytical queries directly against those remote files. Large datasets are sharded into 500MB Parquet chunks, which DuckDB can query together as multiple files.

  • 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().

The quest for software engineering knowledge.

Look:
Layout: