Skip to main content

Apache Arrow

At a glance
  • Problem solved: exchange in-memory data between systems and languages without serialization cost, thanks to a universal columnar format.
  • Era: idea in September 2015, first commit on February 5, 2016, Apache top-level project on February 17, 2016 (no incubation), version 1.0.0 in July 2020.
  • Category: in-memory columnar format + multi-language toolbox.
  • Created by: Jacques Nadeau (Apache Drill, Dremio co-founder) and Wes McKinney (creator of pandas, then at Cloudera), with developers from 13 open source projects.

Historical context​

In the mid-2010s, every system had its own in-memory representation of data: the JVM for Spark or Drill, NumPy arrays for pandas, C++ structures for Impala. As soon as two tools had to talk, data had to be serialized and then deserialized. The 2016 ASF press release puts a number on the pain: "In many workloads, 70-80% of CPU cycles are spent serializing and deserializing data".

Wes McKinney, who started pandas in April 2008, ran into the problem at Cloudera while trying to connect Python to Impala, Kudu, Spark and Parquet: "The single biggest problem was data interchange [...] there was no standard solution for doing it". In parallel, Jacques Nadeau, from Apache Drill and co-founder of Dremio, emailed his co-founder on September 12, 2015 to suggest a new Apache project, code-named RootZero.

The two efforts met in the fall of 2015. To create a neutral "safe space" free from vendor affiliation, they set the project up at the Apache Software Foundation. Drill contributed its Java library (the ValueVectors), Wes McKinney the first C/C++ library. Given the pedigree of the contributors (Calcite, Cassandra, Drill, Hadoop, HBase, Impala, Kudu, Parquet, Phoenix, Spark, Storm, pandas, Ibis), the ASF made Arrow a top-level project right away, skipping the incubator.

At the time, there was almost nothing yet: "in late 2015, all I had (as far as Python is concerned) were some Markdown specification documents", Wes McKinney wrote. Version 0.1.0 shipped on October 7, 2016, with two implementations (C++ and Java) and Python bindings. Arrow then expanded to the network (Flight, 2019), stabilized (1.0.0, 2020), and gained database access (ADBC, 2023). It is the foundation of many engines, including DataFusion, which started as an Arrow subproject.

Key idea​

A standardized in-memory columnar format, designed for vectorized computation (CPU, SIMD) and zero-copy exchange between processes and languages. If two systems "speak" Arrow, one can read the bytes produced by the other directly, with no conversion. Arrow complements Parquet: Parquet optimizes durable storage on disk, Arrow optimizes data in RAM and in transit.

How it works​

  • Columnar format: each column is stored in contiguous buffers. An integer column is a typed array; a string column is a buffer of concatenated bytes plus an array of offsets. Missing values are a separate bitmap ("a packed bit array"). A telling comparison from Wes McKinney: in Python, the simple string 'wes' takes 52 bytes.
  • RecordBatch: a batch of equal-length columns with its schema; an Arrow stream is a sequence of RecordBatches.
  • IPC: stream and file formats that serialize RecordBatches and rebuild them "without need for memory copying". The file format supports random access: read through a memory map, it is read back with no copy and no new allocation. Feather v2 is simply this IPC file format under another name.
  • Flight: a client-server framework over gRPC to move RecordBatches with no copy or deserialization. GetFlightInfo returns several endpoints that the client reads in parallel. Flight SQL adds a database protocol on top.
  • ADBC: a "JDBC-like" but columnar client API that returns Arrow data directly, whether or not the database is Arrow-native.
  • Libraries: official implementations in C, C++, C#, Go, Java, JavaScript, Julia, MATLAB, Python, R, Ruby and Rust, plus compute kernels and Parquet reading.

Example in Python: read Parquet into Arrow, then hand it to pandas.

import pyarrow.parquet as pq

table = pq.read_table("sales.parquet", columns=["country", "amount"])
print(table.schema) # Arrow schema
df = table.to_pandas() # conversion to pandas

By the numbers​

FigureContextSource
70 to 80%Share of CPU cycles spent serializing and deserializing in many workloads (2016)ASF press release
13Open source projects the first developers came from (2016)ASF press release
20.7 s vs 0.737 stoPandas() on 4.2 million rows, without then with Arrow (Spark 2.3, 2017)Arrow blog, PySpark
2 to 3 GB/sFlight TCP throughput on localhost, about 12 GB in 4 s (2019)Arrow blog, Flight
20 to 50xSpeedup of Dremio's Flight connector over ODBC (2019)Arrow blog, Flight
810 issues, 100 contributorsContent of version 1.0.0, the 18th major release (July 2020)Arrow blog, 1.0.0
Over 10 millionDownloads per month (October 2020)Jacques Nadeau, Dremio
12Languages with official implementations (2026)Arrow blog, 10 years

Milestones​

  • September 12, 2015: Jacques Nadeau suggests the RootZero project to his co-founder at Dremio.
  • February 5, 2016: first commit of the Apache Arrow project.
  • February 17, 2016: the ASF announces Arrow as a top-level project, with no incubation.
  • March 29, 2016: Wes McKinney and Hadley Wickham announce Feather, a Python and R file format built on Arrow.
  • October 7, 2016: version 0.1.0 (C++, Java, Python bindings).
  • July 26, 2017: the Arrow blog announces that starting with Spark 2.3, Arrow will speed up toPandas() in PySpark.
  • February 4, 2019: DataFusion is donated to the Arrow project.
  • October 13, 2019: Arrow Flight is announced, shipped in release 0.15.0.
  • July 24, 2020: version 1.0.0, the columnar format is declared stable.
  • January 5, 2023: ADBC 1.0.0; on April 3, 2023, pandas 2.0 offers Arrow-backed DataFrames (dtype_backend="pyarrow").

Did you know?​

  • A voted name: according to a Dremio blog post [S], the name "Arrow" was picked by a vote that also included "Honeycomb" and "Keystone".
  • A project with no incubation: Arrow entered the ASF directly as a top-level project, which makes it "unique because it didn't go through an incubation period", Dremio points out.
  • A single break in ten years: since 2016, the columnar format has had only one incompatible change (the validity bitmap of Union types); everything else has been additions.
  • Feather, Arrow on disk: the first version of Feather wrote "unmodified Arrow memory to disk" and was not meant for long-term storage. Ray also used the Plasma object store that came from Arrow (see Ray).

Strengths and limitations​

StrengthsLimitations
Interop without serialization across languages and processesMemory format, not optimized durable storage (Parquet's role)
Fast vectorized computation (contiguous buffers, SIMD)Requires adoption on both sides of the exchange
Format stable since 1.0.0 (2020)New types added over releases, to track on the library side
Complete ecosystem: IPC, Flight, ADBCMemory management and library versions must be mastered

What came next​

  • In-memory complement to Parquet on disk; most official Parquet implementations (C++, Rust, Go) now live in the Arrow repositories.
  • Speeds up Spark's exchanges with Python, and serves as an exchange format for engines such as Trino.
  • Serves as the memory model of DataFusion and Polars; DuckDB does not use it internally but can read and write Arrow.

Sources​

To do
  • Recent adoption figures (monthly downloads) from an official Arrow page.
  • Release date of Gandiva (LLVM expression compiler) and what became of Plasma.
  • The name vote ("Honeycomb", "Keystone") relies only on a Dremio post [S]: find the vote thread on the Apache mailing lists.
  • Specify which Trino connectors use Arrow (general claim, not sourced).