1 of 29

(illustration hand generated in 1958)

Julien Le Dem (julien@apache.org)

Column Storage

for the AI era

M.C. Escher, Belvedere, lithograph, May 1958

licensed under CC BY-NC-SA 4.0

2 of 29

2

Julien Le Dem�julien.ledem.net

sympathetic.ink

Principal Engineer at

  • Officer of the ASF
  • Member of the LFAI&Data

Technical Advisory Council

  • Co-creator of Parquet, Arrow, OpenLineage
  • Contributed to Calcite, Drill, Iceberg, …
  • Co-Founded a data observability company
  • First Used Hadoop at Yahoo! In 2007

About the Speaker

3 of 29

3

Agenda

  1. The Design of Parquet: Praise and Gripes.
  2. What has changed? Technology, Use cases.
  3. What can we do?
  4. Concrete Next Steps.

Session

4 of 29

The Design of Parquet:

Praise and Gripes

1

5 of 29

Inception

5

Started in 2012

De-facto standard for columnar storage

Widely supported

Enabled interoperability

For the new generation of vectorized query engines inspired by the C-Store and MonetDB/X100 papers.

Based on Google Dremel paper

Store nested structures in a columnar representation.

6 of 29

Main trade offs at the time

Cost of

storage

Time to decode with a CPU

Time to transfer on the wire

7 of 29

Access only the data you need

Columnar

Statistics

Read only the data you need!

8 of 29

Parquet file layout

9 of 29

Page

9

“abc”

“def”

“ghi”

Values

Bytes: 1, 2, 3

Encoded

bytes

encoding

compression*

* optional

10 of 29

Praise

Scalable

De-facto standard with engaged community of implementers

Self-documenting

Saves on storage. Columnar layout helps.

Familiar

No more CSV type inference.

What people like

Flexible

Multi-level statistics.

10

Good compression

Data skipping

Wide adoption/interoperability

Self describing schema

11 of 29

Gripes

Too reliant on generic compression

ZSTD is great, but we can be faster for specific types.

Metadata large with many columns

More wide schema use cases (Feature stores)

What people don’t like

Not optimized for Random access

Need to decode too many values

Not parallelizable enough

Existing encodings do not take full advantage of SIMD and GPUs.

11

12 of 29

What has changed?

2

13 of 29

More parallelism

From 2010 to 2025

13

More Cores:

16x ��(8 -> 128)

Wider SIMD:

4x

�(128 bits -> 512 bits)

GPUs:

40x more threads

From dozens of threads to thousands

14 of 29

AI Access patterns

14

  • Vector store,
    • Vector embeddings and similarity search

  • Fetching specific training samples
    • Random access through secondary indices
    • fetching specific training samples

  • Access to data at the speed of AI: GPUs

Metadata

Index

15 of 29

What can we do?

3

16 of 29

Healthy pressure created by the newcomers

16

  • Great research papers for new encodings:
    • BtrBlocks
    • ALP
    • FastLanes
    • FSST

  • New file/table formats:
    • Initiated by Vector store startups:
      • Lance: Started by LanceDB.
      • Vortex: Donated by Spiral, Incubating at the LFAI&Data foundation.
    • Big co: Nimble (Meta)
    • Research: FastLanes, F3
    • Demonstrate the effectiveness of the new techniques

17 of 29

Have things fundamentally changed?

17

  • The ecosystem has evolved but the underlying design is not fundamentally different
    • Same multi-level PAX structure as Parquet that allows data skipping at file/row group/page level.
    • Combination of what goes in the file format (Parquet) and the table format (Iceberg)

Metadata

Metadata

Metadata

Metadata

V1

V2

V3

18 of 29

What is Parquet?

Parquet, first and foremost, is an Open Source project. It’s a consensus building machine which pulls a huge community of open source projects and vendors in its wake.

It is easier to popularize new techniques through the existing machine rather than getting 4 new formats adopted.

Building the community around the project is the hard part.

We stand on the shoulders of giants.

19 of 29

Variant: Recent Example of Parquet evolving and pulling the ecosystem along

19

Vendor and Project collab

Cross compatibility tests

BigQuery, Snowflake, Databricks, DataFusion, …

Proposal:

from Databricks

Should it go in Parquet?

Or Spark?

Or Arrow?

Or Iceberg?

Finalize consensus:

Semistructured data in columns

Flexibility to shred some in separate columns

Took 1 year from 1st suggestion to release

20 of 29

Why new encodings?

21 of 29

Problems of existing encodings

21

  • Delta encoding => data dependencies
  • Block compression (zstd) => data dependencies

Limits the throughput of decoding.

Analytics use cases are also looking at GPUs to speed up things.

Those needs are not at odds.

22 of 29

What are those new encodings?

Lightweight encodings:

  • specialized for a type
  • No branching, no data dependencies
  • takes full advantage of SIMD and Branch prediction

  • Floating Point -> ALP (Adaptive Lossless Floating-Point)
    • Turns Floating Point values into (good) Integers

  • Integers -> Faslanes

  • Strings -> FSST (Fast Static Symbol Table)

  • BTRBlocks: layering lightweight encodings

23 of 29

Concrete next steps

4

24 of 29

Tuning the existing Parquet settings

Scalable

Pick encodings with certain characteristics at write time

Self-documenting

You can have only one if you wish.

Familiar

Pages can be smaller.�Pages can be of varying size

Do we need larger row groups and smaller pages?

Flexible

It is optional

24

Parquet has row groups

General purpose block compression (zstd) is too slow

Some encodings don’t allow random access

Parquet pages force to decompress too many values

25 of 29

Do we really need millions of columns?

How many rows can we fit in a GB?

      • If all dense columns: very few rows

=> degraded performance of columnar representation.

      • If a subset of dense columns: the long tail of sparse columns don’t add much value stored separately.

=> Variant

Variant:

  • Binary storage of JSON in columns
  • Unknown field cardinality or too many very sparse
  • Separates field names and values in two columns
  • Optionally shreds a subset of fields in their own columns.

26 of 29

Better use of metadata

26

  • The file format vs the database:

You don’t need to read the metadata from the file.

  • In-place updates and versioning

=> Iceberg

  • Metadata that scales better with the number of columns.
    • POC ongoing to rewrite the metadata in a backwards compatible way.

27 of 29

Adding those new encodings

27

Parquet is based on research and will keep integrating new ideas.

  • Random access

=> new encodings + improved metadata layout.

  • Parallelism (SIMD, GPUs)

=> encodings

  • ALP: proposal being finalized
  • Fastlanes: TODO (add your name here)
  • FSST: proposal in progress
  • Improved metadata: proposal in progress

28 of 29

Extending Parquet

28

  • It is *not* either “Create your own format” or “Contribute to Parquet”.

  • Layering on top of Parquet, embedding custom indices.

See: Datafusion blog: User defined Parquet Indexes

  • The main required standardization is the encodings.

Everything else can be built on top.

29 of 29

Thanks :)