How apache/arrow works
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: array Columnar Types · server.cc Flight SQL Server · flight Flight Server · dataset Dataset Scanner
Components 20
Columnar Core
C++ in-memory data model, memory, compute, and IO foundations
- Columnar Types · Arrays, schemas, tables, scalars, and record batches
cpp/src/arrow/array - Buffer Memory · Reference-counted and aligned off-heap storage
cpp/src/arrow/buffer.cc - Compute Kernels · Scalar, vector, aggregate, cast, and expression functions
cpp/src/arrow/compute - IO And IPC · Streams, filesystems, IPC readers, writers, and metadata messaging
cpp/src/arrow/io
Analytics Execution
Acero scheduling and Gandiva expression compilation
- Acero Exec Plan · Execution-plan nodes for filtering, projection, joins, aggregation, and sinks
cpp/src/arrow/acero/exec_plan.h - Query Context · CPU, memory, IO executors, task scheduling, and concurrency state
cpp/src/arrow/acero/query_context.cc - Gandiva Expressions · LLVM-backed expression, filter, and projector APIs
cpp/src/gandiva/engine.h - LLVM JIT Engine · 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 · Fragments, partitioning, file formats, factories, and scanners
cpp/src/arrow/dataset - Parquet Adapter · Parquet metadata, statistics, and Arrow readers/writers
cpp/src/parquet - ORC Adapter · ORC conversion and reader integration
cpp/src/arrow/adapters/orc
Flight RPC
Arrow Flight transport, authentication, and SQL protocol
- Flight Server · Server-side Flight streams, calls, and application-defined metadata
cpp/src/arrow/flight - Flight Client · Client-side Flight calls and Arrow data exchange
cpp/src/arrow/flight - Flight Auth · Handshake reader/sender and per-call token handler interfaces
cpp/src/arrow/flight/client_auth.h - Flight SQL Server · 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 · C/GObject wrappers for Arrow, datasets, Flight, Flight SQL, CUDA, and Gandiva
c_glib/arrow-glib - Python Bindings · Python API and native extension surface
python/pyarrow - Ruby Bindings · Ruby Arrow, Flight, SQL, CUDA, Gandiva, and Parquet APIs
ruby/red-arrow - CUDA Integration · GPU support exposed through C++ and language bindings
cpp/src/arrow/gpu
Other components
- Data Application · Consumer or producer using Arrow libraries
Connections 30
- 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