跳到主要内容
On this page

ReferencesThe Storage Formats

Avro & Parquet

Two file formats that disagree about how data should be laid out — and why that matters.

Avro & Parquet at a glance

Role
The Storage Formats
Domain
Data & Streaming
Status
Apache top-level projects
What it does
  • Parquet — columnar, so a query touching three of two hundred columns reads three.
  • Parquet footer statistics — minimum, maximum and null counts per column chunk.
  • Page indexes and predicate pushdown, so whole row groups can be skipped entirely.
  • Avro — the schema travels with the data, as JSON.
  • Avro schema resolution — explicit writer/reader rules for forward and backward compatibility.

What it is

Parquet was created at Twitter and Cloudera and is now the default file format of the lakehouse ecosystem — Iceberg, Delta Lake and Hudi all assume it. It stores values column by column, which means the bytes of a column sit next to each other and can be compressed together.

Avro is the other way round. It stores records one at a time, with the schema embedded as JSON, and it was designed around a different problem: a stream of events whose producers and consumers evolve independently.

How it works

The practical consequence of the layout difference is projection pushdown. A query that needs three columns out of two hundred reads three columns of bytes, not two hundred columns of rows — and because Parquet also keeps per-column-chunk statistics in its footer, an engine can skip whole row groups that cannot match a filter.

  • Columnar writes are the weak side of Parquet: appending one record means touching every column buffer, so writers batch into row groups and small frequent appends are poor.
  • Avro handles small appends well and has explicit rules for resolving a writer's schema against a reader's schema — defaults and type promotions included.
  • Both formats store their schema with the data and both support per-column compression codecs.
  • Parquet added a typed `Variant` representation for heterogeneous values, introduced in August 2025 and documented by Apache in February 2026.

Under the hood

ParquetAvro
LayoutColumnarRow-oriented
Built forReading — analytical queriesWriting — events and records
SchemaIn the file, as ThriftIn the file, as JSON
Column pruningYes — projection and predicate pushdownNo
Schema evolutionLimited on its own; a table format manages itStrong, rule-based writer/reader resolution
Small appendsPoorGood
Typical homeThe analytical warehouseKafka payloads and the landing zone

Where to read more