# apache/arrow architecture

> Architecture diagram of the GitHub repository apache/arrow, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/apache/arrow
- Repository: https://github.com/apache/arrow

## Overview

Apache Arrow is a multi-language data platform centered on a universal in-memory columnar format. The C++ implementation provides typed arrays, buffers, schemas, tables, compute kernels, filesystem and IPC abstractions, dataset scanning, and format adapters. Acero supplies asynchronous execution primitives for query plans, while Gandiva compiles expressions through LLVM and caches or links generated modules. Flight exposes Arrow IPC data through RPC, with authentication and a SQL-specific protocol. Parquet and ORC provide durable columnar format interoperability. C GLib, Python, R, Ruby, and MATLAB directories expose language-specific bindings; the sampled GLib and Ruby files confirm wrappers around Flight, Flight SQL, and CUDA concepts. The graph emphasizes the C++ runtime and its principal data movement and analytics paths, plus representative binding surfaces. Many subsystems are only established by the tree or README, and the provided excerpts are partial, so detailed wiring for language bindings, dataset discovery, filesystem implementations, and transport internals is intentionally omitted.

Main entry points: [`cpp/src/arrow/array`](https://github.com/apache/arrow/tree/main/cpp/src/arrow/array) (Columnar Types), [`cpp/src/arrow/flight/sql/server.cc`](https://github.com/apache/arrow/blob/main/cpp/src/arrow/flight/sql/server.cc) (Flight SQL Server), [`cpp/src/arrow/flight`](https://github.com/apache/arrow/tree/main/cpp/src/arrow/flight) (Flight Server), [`cpp/src/arrow/dataset`](https://github.com/apache/arrow/tree/main/cpp/src/arrow/dataset) (Dataset Scanner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Columnar Core"]
  node_columnar["Columnar Types<br/>data model"]
  node_buffers["Buffer Memory<br/>memory subsystem"]
  node_compute["Compute Kernels<br/>analytics API"]
  node_io["IO And IPC<br/>serialization subsystem"]
end

subgraph group_execution["Analytics Execution"]
  node_acero_plan["Acero Exec Plan<br/>query engine"]
  node_query_context["Query Context<br/>execution context"]
  node_gandiva["Gandiva Expressions<br/>expression compiler"]
  node_llvm_jit["LLVM JIT Engine<br/>runtime compiler"]
end

subgraph group_formats["Storage Formats"]
  node_dataset["Dataset Scanner<br/>dataset subsystem"]
  node_parquet["Parquet Adapter<br/>file format"]
  node_orc["ORC Adapter<br/>file format"]
end

subgraph group_flight["Flight RPC"]
  node_flight_server{{"Flight Server<br/>RPC server"}}
  node_flight_client{{"Flight Client<br/>RPC client"}}
  node_flight_auth["Flight Auth<br/>authentication API"]
  node_flight_sql{{"Flight SQL Server<br/>SQL RPC protocol"}}
end

subgraph group_bindings["Language Bindings"]
  node_glib_bindings["GLib Bindings<br/>language binding"]
  node_python_bindings["Python Bindings<br/>language binding"]
  node_ruby_bindings["Ruby Bindings<br/>language binding"]
  node_cuda["CUDA Integration<br/>device subsystem"]
end

node_application(("Data Application<br/>external actor"))

node_application -->|"builds data"| node_columnar
node_columnar -->|"stores values"| node_buffers
node_columnar -->|"processed by"| node_compute
node_compute -->|"plan operators"| node_acero_plan
node_acero_plan -->|"schedules tasks"| node_query_context
node_query_context -->|"runs IO"| node_io
node_gandiva -->|"compiles expressions"| node_llvm_jit
node_llvm_jit -.->|"executes kernels"| node_compute
node_dataset -->|"reads fragments"| node_io
node_dataset -->|"opens files"| node_parquet
node_dataset -.->|"opens files"| node_orc
node_parquet -->|"produces batches"| node_columnar
node_orc -->|"produces batches"| node_columnar
node_io -->|"serializes batches"| node_columnar
node_application -->|"requests data"| node_flight_client
node_flight_client -->|"authenticates"| node_flight_auth
node_flight_client -->|"RPC calls"| node_flight_server
node_flight_server -->|"streams IPC"| node_io
node_flight_server -->|"serves batches"| node_columnar
node_flight_sql -->|"uses Flight"| node_flight_server
node_flight_sql -.->|"reads query data"| node_dataset
node_flight_sql -.->|"runs queries"| node_acero_plan
node_glib_bindings -->|"wraps types"| node_columnar
node_glib_bindings -->|"wraps server"| node_flight_server
node_glib_bindings -->|"wraps SQL"| node_flight_sql
node_python_bindings -->|"exposes API"| node_columnar
node_python_bindings -->|"exposes format"| node_parquet
node_ruby_bindings -->|"exposes SQL"| node_flight_sql
node_ruby_bindings -->|"exposes devices"| node_cuda
node_cuda -.->|"manages device data"| node_buffers

click node_columnar "https://github.com/apache/arrow/tree/main/cpp/src/arrow/array"
click node_buffers "https://github.com/apache/arrow/blob/main/cpp/src/arrow/buffer.cc"
click node_compute "https://github.com/apache/arrow/tree/main/cpp/src/arrow/compute"
click node_io "https://github.com/apache/arrow/tree/main/cpp/src/arrow/io"
click node_acero_plan "https://github.com/apache/arrow/blob/main/cpp/src/arrow/acero/exec_plan.h"
click node_query_context "https://github.com/apache/arrow/blob/main/cpp/src/arrow/acero/query_context.cc"
click node_gandiva "https://github.com/apache/arrow/blob/main/cpp/src/gandiva/engine.h"
click node_llvm_jit "https://github.com/apache/arrow/blob/main/cpp/src/gandiva/engine.cc"
click node_dataset "https://github.com/apache/arrow/tree/main/cpp/src/arrow/dataset"
click node_parquet "https://github.com/apache/arrow/tree/main/cpp/src/parquet"
click node_orc "https://github.com/apache/arrow/tree/main/cpp/src/arrow/adapters/orc"
click node_flight_server "https://github.com/apache/arrow/tree/main/cpp/src/arrow/flight"
click node_flight_client "https://github.com/apache/arrow/tree/main/cpp/src/arrow/flight"
click node_flight_auth "https://github.com/apache/arrow/blob/main/cpp/src/arrow/flight/client_auth.h"
click node_flight_sql "https://github.com/apache/arrow/blob/main/cpp/src/arrow/flight/sql/server.cc"
click node_glib_bindings "https://github.com/apache/arrow/tree/main/c_glib/arrow-glib"
click node_python_bindings "https://github.com/apache/arrow/tree/main/python/pyarrow"
click node_ruby_bindings "https://github.com/apache/arrow/tree/main/ruby/red-arrow"
click node_cuda "https://github.com/apache/arrow/tree/main/cpp/src/arrow/gpu"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_columnar,node_buffers,node_compute,node_io toneBlue
class node_acero_plan,node_query_context,node_gandiva,node_llvm_jit toneAmber
class node_dataset,node_parquet,node_orc toneMint
class node_flight_server,node_flight_client,node_flight_auth,node_flight_sql toneRose
class node_glib_bindings,node_python_bindings,node_ruby_bindings,node_cuda,node_application toneIndigo
```

## Components

### Columnar Core

C++ in-memory data model, memory, compute, and IO foundations

- [Columnar Types](https://github.com/apache/arrow/tree/main/cpp/src/arrow/array): data model · Arrays, schemas, tables, scalars, and record batches · `cpp/src/arrow/array`
- [Buffer Memory](https://github.com/apache/arrow/blob/main/cpp/src/arrow/buffer.cc): memory subsystem · Reference-counted and aligned off-heap storage · `cpp/src/arrow/buffer.cc`
- [Compute Kernels](https://github.com/apache/arrow/tree/main/cpp/src/arrow/compute): analytics API · Scalar, vector, aggregate, cast, and expression functions · `cpp/src/arrow/compute`
- [IO And IPC](https://github.com/apache/arrow/tree/main/cpp/src/arrow/io): serialization subsystem · Streams, filesystems, IPC readers, writers, and metadata messaging · `cpp/src/arrow/io`

### Analytics Execution

Acero scheduling and Gandiva expression compilation

- [Acero Exec Plan](https://github.com/apache/arrow/blob/main/cpp/src/arrow/acero/exec_plan.h): query engine · Execution-plan nodes for filtering, projection, joins, aggregation, and sinks · `cpp/src/arrow/acero/exec_plan.h`
- [Query Context](https://github.com/apache/arrow/blob/main/cpp/src/arrow/acero/query_context.cc): execution context · CPU, memory, IO executors, task scheduling, and concurrency state · `cpp/src/arrow/acero/query_context.cc`
- [Gandiva Expressions](https://github.com/apache/arrow/blob/main/cpp/src/gandiva/engine.h): expression compiler · LLVM-backed expression, filter, and projector APIs · `cpp/src/gandiva/engine.h`
- [LLVM JIT Engine](https://github.com/apache/arrow/blob/main/cpp/src/gandiva/engine.cc): runtime compiler · Builds LLJIT modules, verifies and links IR, and maps external functions · `cpp/src/gandiva/engine.cc`

### Storage Formats

Dataset and file-format adapters

- [Dataset Scanner](https://github.com/apache/arrow/tree/main/cpp/src/arrow/dataset): dataset subsystem · Fragments, partitioning, file formats, factories, and scanners · `cpp/src/arrow/dataset`
- [Parquet Adapter](https://github.com/apache/arrow/tree/main/cpp/src/parquet): file format · Parquet metadata, statistics, and Arrow readers/writers · `cpp/src/parquet`
- [ORC Adapter](https://github.com/apache/arrow/tree/main/cpp/src/arrow/adapters/orc): file format · ORC conversion and reader integration · `cpp/src/arrow/adapters/orc`

### Flight RPC

Arrow Flight transport, authentication, and SQL protocol

- [Flight Server](https://github.com/apache/arrow/tree/main/cpp/src/arrow/flight): RPC server · Server-side Flight streams, calls, and application-defined metadata · `cpp/src/arrow/flight`
- [Flight Client](https://github.com/apache/arrow/tree/main/cpp/src/arrow/flight): RPC client · Client-side Flight calls and Arrow data exchange · `cpp/src/arrow/flight`
- [Flight Auth](https://github.com/apache/arrow/blob/main/cpp/src/arrow/flight/client_auth.h): authentication API · Handshake reader/sender and per-call token handler interfaces · `cpp/src/arrow/flight/client_auth.h`
- [Flight SQL Server](https://github.com/apache/arrow/blob/main/cpp/src/arrow/flight/sql/server.cc): SQL RPC protocol · Parses SQL commands and dispatches query, update, ingest, transaction, and prepared-statement operations · `cpp/src/arrow/flight/sql/server.cc`

### Language Bindings

C/GLib and dynamic-language integration surfaces

- [GLib Bindings](https://github.com/apache/arrow/tree/main/c_glib/arrow-glib): language binding · C/GObject wrappers for Arrow, datasets, Flight, Flight SQL, CUDA, and Gandiva · `c_glib/arrow-glib`
- [Python Bindings](https://github.com/apache/arrow/tree/main/python/pyarrow): language binding · Python API and native extension surface · `python/pyarrow`
- [Ruby Bindings](https://github.com/apache/arrow/tree/main/ruby/red-arrow): language binding · Ruby Arrow, Flight, SQL, CUDA, Gandiva, and Parquet APIs · `ruby/red-arrow`
- [CUDA Integration](https://github.com/apache/arrow/tree/main/cpp/src/arrow/gpu): device subsystem · GPU support exposed through C++ and language bindings · `cpp/src/arrow/gpu`

### Other components

- **Data Application**: external actor · Consumer or producer using Arrow libraries

## Connections

- Data Application → Columnar Types: builds data
- Columnar Types → Buffer Memory: stores values
- Columnar Types → Compute Kernels: processed by
- Compute Kernels → Acero Exec Plan: plan operators
- Acero Exec Plan → Query Context: schedules tasks · Acero query context schedules executor and IO work through async task facilities.
- Query Context → IO And IPC: runs IO · QueryContext constructs IOContext and submits IO tasks.
- Gandiva Expressions → LLVM JIT Engine: compiles expressions · Engine finalizes selected functions into LLVM JIT modules.
- LLVM JIT Engine → Compute Kernels: executes kernels · Generated code links external function mappings and operates on Arrow values.
- Dataset Scanner → IO And IPC: reads fragments
- Dataset Scanner → Parquet Adapter: opens files
- Dataset Scanner → ORC Adapter: opens files
- Parquet Adapter → Columnar Types: produces batches
- ORC Adapter → Columnar Types: produces batches
- IO And IPC → Columnar Types: serializes batches
- Data Application → Flight Client: requests data
- Flight Client → Flight Auth: authenticates · ClientAuthHandler defines initial negotiation and per-call token retrieval.
- Flight Client → Flight Server: RPC calls
- Flight Server → IO And IPC: streams IPC · Flight data streams carry IPC payloads and record batches.
- Flight Server → Columnar Types: serves batches
- Flight SQL Server → Flight Server: uses Flight · Flight SQL is implemented as a SQL protocol over Flight server operations.
- Flight SQL Server → Dataset Scanner: reads query data
- Flight SQL Server → Acero Exec Plan: runs queries
- GLib Bindings → Columnar Types: wraps types · GLib wrappers include Arrow arrays, tables, record batches, schemas, and builders.
- GLib Bindings → Flight Server: wraps server · The sampled GLib server wrapper owns Flight streams and record-batch readers.
- GLib Bindings → Flight SQL Server: wraps SQL · GLib exposes Flight SQL command and server objects.
- Python Bindings → Columnar Types: exposes API
- Python Bindings → Parquet Adapter: exposes format
- Ruby Bindings → Flight SQL Server: exposes SQL · Ruby Flight SQL Server generates statement-query handles.
- Ruby Bindings → CUDA Integration: exposes devices · Ruby CUDA adds DeviceManager context access.
- CUDA Integration → Buffer Memory: manages device data
