Apache DataFusion
A query engine library in Rust, built on Arrow, that other projects embed and extend to build their own databases and data tools.
- What it is
- Query engines
- Type
- Open source
- Made by
- Apache Software Foundation
- License
- Apache 2.0
- Facts checked
- 5 October 2026
What it is
DataFusion is a query engine you compile into your own program, not a server you connect to. You hand it SQL or build a query with its DataFrame API. It parses and plans the query, rewrites the plan with its optimiser, then runs it on a streaming, multi-threaded, vectorised engine that passes Apache Arrow record batches between operators. It keeps no storage of its own: it reads Parquet, CSV, JSON and Avro files from local disk or object storage such as S3, in-memory Arrow data, or any source you plug in, and writes results back with COPY ... TO or INSERT INTO.
Almost every layer can be replaced: table sources (the TableProvider trait), scalar, aggregate and window functions, optimiser rules, and logical and physical plan nodes. That makes it a kit for building data systems, and dozens do: InfluxDB 3, the Arroyo stream processor, delta-rs, Lance, GreptimeDB, Spice.ai, Cloudflare’s R2 query engine and the dbt Fusion engine among them. Subprojects add a command-line client (datafusion-cli), Python bindings (pip install datafusion), Ballista for running queries across several machines, and Comet, a plugin that runs Apache Spark jobs on DataFusion. A new major version ships every two to three months; the current one is 55.1.0.
Why teams pick it
- A full SQL planner, optimiser and vectorised engine you can embed instead of writing your own
- Extension points at every layer: data sources, functions, optimiser rules and execution operators
- Works on Arrow, so results pass to other Arrow tools in Python, Rust and elsewhere without conversion
- Apache 2.0 licensed and governed by the ASF, with many companies building on and contributing to it
- Reads Parquet efficiently from object storage, skipping row groups and pages that can’t match
Watch out for
- It’s a library, not a database: no server, user management or persistent catalog unless you build them or use a product built on it
- Customising it means writing Rust; the extension APIs are Rust traits
- Each major release can break the Rust API, and majors arrive every few months, so embedders must budget for upgrades
- One process by default; running across machines needs Ballista or a distributed layer of your own
The Apache DataFusion family
1 technologies built from or on Apache DataFusion
Alternatives
What all query engines have in common →
Amazon AthenaAWSAWS’s serverless SQL engine for data in S3: no cluster to run, and on-demand queries cost $5 per TB scanned.
Apache CalciteOpen sourceA Java framework with everything a database needs to understand a query (SQL parser, validator, relational algebra and a rule-based, cost-based optimizer) but no storage of its own, which Hive, Flink, Druid, Dremio, Beam and many other systems embed as their SQL front end and planner.
Apache ZeppelinOpen sourceA self-hosted web notebook where each paragraph runs through an interpreter: Spark, Flink, JDBC, Python and more. Maintained, but behind Jupyter and Databricks in reach.
GizmoSQLOpen sourceA database server that wraps DuckDB (or SQLite) and serves it to many clients over Arrow Flight SQL, with TLS and authentication.
HotdataCommercialA managed SQL engine for AI agents, built in Rust on Apache DataFusion and Arrow: each agent gets short-lived “instant databases” to load data into, then runs read-only SQL, vector, full-text and geospatial queries over an HTTP API or CLI.
IbisOpen sourceA Python dataframe API that compiles to SQL, so the same code runs on DuckDB on a laptop and on BigQuery, Snowflake, PostgreSQL or more than 20 other engines.
Spice.ai OSSOpen sourceA single-binary SQL engine in Rust, built on DataFusion and Arrow, that federates queries across databases, warehouses and lakes, keeps hot datasets in a local accelerated copy, and adds search and LLM APIs on top.
VeloxOpen sourceMeta’s open-source C++ execution engine library: it takes an already-optimized query plan and runs it with vectorized operators, and it is the engine inside Presto’s C++ workers (Prestissimo) and Apache Gluten’s native Spark.How it fits with other technologies
What Apache DataFusion uses
What uses Apache DataFusion
- Rustis the implementation language ofApache DataFusion
- Arroyoplans and runs its SQL withApache DataFusion
- Denormalizedruns streaming operators on a fork ofApache DataFusion
- Felderaanswers ad-hoc queries withApache DataFusion
- RisingWaveruns batch queries on Iceberg tables withApache DataFusion
- StreamFusionbuilds its native operators onApache DataFusion
- Streamlingruns every pipeline stage as a plan inApache DataFusion
- GreptimeDBbuilds its query engine onApache DataFusion
- InfluxDBruns 3.x SQL queries onApache DataFusion
- Vortexis a native file format forApache DataFusion
- Apache Arrowis the in-memory format ofApache DataFusion
- Apache DataFusion Cometruns Spark’s physical plans onApache DataFusion
- Cloudflare Basin SQLexecutes each query worker’s share withApache DataFusion
- Hotdatais built onApache DataFusion
- Ibiscan execute expressions withApache DataFusion
- Spice.ai OSSplans and runs SQL queries withApache DataFusion
The same query in SQL and with the DataFrame API · python
from datafusion import SessionContext, col, lit
from datafusion import functions as f
ctx = SessionContext()
ctx.register_parquet("trips", "data/trips/")
ctx.sql("""
SELECT pickup_zone, count(*) AS trips, avg(fare) AS avg_fare
FROM trips WHERE fare > 0
GROUP BY pickup_zone ORDER BY trips DESC LIMIT 10
""").show()
# a lazy plan; nothing runs until results are requested
top = (ctx.table("trips")
.filter(col("fare") > lit(0))
.aggregate([col("pickup_zone")], [f.count(col("fare")).alias("trips")])
.sort(col("trips").sort(ascending=False))
.limit(10))
table = top.to_arrow_table() # results as a PyArrow tableThe DataFusion family#
DataFusion
Rust libraryThe core: SQL and DataFrame APIs, planner, optimiser and execution engine, added to a Rust project as a dependency.
datafusion-cli
command lineAn interactive SQL shell. Queries files by path, including s3:// and gs:// locations, or as external tables.
DataFusion Python
pip install datafusionPython bindings with SQL and a lazy DataFrame API. Reads pandas, Polars and Arrow data, and returns results in any of them.
Ballista
distributedA scheduler and executors that spread DataFusion queries across many machines. Andy Grove donated it to Apache Arrow in 2021.
Comet
Spark pluginTranslates Spark physical plans into DataFusion plans and runs them natively, with no code changes. Started at Apple, donated in 2024, 1.0 in August 2026.
DataFusion or DuckDB?#
Both are fast, embeddable, columnar SQL engines that run on one machine. They are aimed at different people.
| DataFusion | DuckDB | |
|---|---|---|
| What you get | An engine to build on | A finished database to use |
| Storage | None of its own; reads files and plugged-in sources | Its own single-file database, plus files in place |
| Customise by | Replacing parts in Rust: sources, functions, optimiser rules, operators | Loading extensions |
| Runs | Inside your Rust or Python program; any server is yours to build | Inside your program, or as a server through its Quack protocol |
| Licence | Apache 2.0 | MIT |
| Typical user | Teams building a database, stream processor or data service | Analysts and engineers querying data from Python, R or the CLI |
See it in a real stack
No architecture uses Apache DataFusion yet. Drop it into the playground and wire it up yourself.Open playground →Benchmarks
How to read a benchmark →Where it came from2017–2026
Apache Spark ran on the JVM, and much of its engineering went into working around that: Java serialization between nodes, garbage collection and out-of-memory errors that took constant tuning. Andy Grove noted that Spark’s Project Tungsten was, in effect, “making a JVM product make less use of the JVM”. In 2017 he started DataFusion to test a hypothesis: a Spark-like engine written in Rust would be fast even when naive, and more predictable and reliable.
After rebuilding it on Arrow’s Rust library, Grove donated DataFusion to the Apache Arrow project in February 2019. It could then run simple SQL over CSV files. In 2021 he donated Ballista, a distributed engine built on it. Companies that needed a query engine began building on DataFusion instead of writing one: InfluxData chose it for InfluxDB 3.0 rather than spend what its engineers estimated at tens of person-years building another engine, and Apple donated Comet, its Spark accelerator, in 2024.
In April 2024 DataFusion left Arrow to become a top-level Apache project, as more contributors worked on it alone rather than alongside the Arrow Rust library.
Why it’s built this way
- Rust instead of the JVM
- Grove saw Spark’s performance and reliability problems as coming from Java serialization and garbage collection. Rust gives native speed and predictable memory use without a garbage collector.
- Arrow as the in-memory format
- The 2019 rewrite made DataFusion Arrow-native, so data passes between DataFusion, Arrow libraries and other Arrow-based engines without copying or conversion.
- A library with extension points everywhere
- A complete engine takes tens of person-years. Making sources, functions, optimiser rules and operators replaceable lets projects such as InfluxDB reuse that work and add only what is specific to them.
Timeline
- 2017
Andy Grove starts DataFusion, a query engine in Rust
- 2019
Rebuilt on Arrow and donated to the Apache Arrow project in February
- 2021
Grove donates Ballista, a distributed scheduler built on DataFusion
- 2024
Apple donates Comet in March; top-level Apache project in April
- 2026
Comet 1.0 in August; DataFusion 55.0.0 the same month
- Andy Grove: Rust is for big data (January 2018)
- Apache Arrow blog: DataFusion, a Rust-native query engine for Apache Arrow (February 2019)
- Apache Arrow blog: Ballista donated to Apache Arrow (April 2021)
- Andrew Lamb, InfluxData: Flight, DataFusion, Arrow and Parquet, the FDAP architecture of InfluxDB 3.0
- DataFusion blog: Comet donated to Apache Arrow (March 2024)
- DataFusion blog: DataFusion becomes a top-level Apache project (April 2024)
- The Apache Software Foundation announces Apache DataFusion as a top-level project (June 2024) · archived copy, original
- DataFusion blog: Comet 1.0.0 released (August 2026)
Sources24 · facts checked 5 October 2026
- Apache DataFusion homepage (extensible Rust query engine on Arrow, subprojects)
- DataFusion docs: Introduction (features, file formats, extension points, known users)
- DataFusion docs: Library user guide (UDFs, TableProvider, optimiser passes, custom plans)
- DataFusion docs: Extending operators
- DataFusion docs: SQL DML (COPY ... TO and INSERT INTO)
- DataFusion docs: datafusion-cli
- DataFusion docs: datafusion-cli data sources (S3, GCS, querying files by path)
- DataFusion Python docs
- DataFusion Python docs: Data sources (register_parquet, object stores, pandas and Arrow)
- DataFusion Python docs: DataFrame API (filter, aggregate, sort, to_arrow_table)
- DataFusion Ballista docs
- DataFusion Comet docs
- DataFusion blog: Comet 1.0.0 (plan translation, supported Spark versions)
- DataFusion blog: DataFusion 55.0.0 (August 2026, breaking changes and upgrade guide)
- DataFusion blog: DataFusion 54.0.0 (June 2026)
- DataFusion blog: Parquet pruning (row group and page skipping)
- datafusion on crates.io (55.1.0, September 2026)
- Arroyo blog: Why Arrow and DataFusion (March 2024)
- delta-rs README: DataFusion integration
- Lance docs: Apache DataFusion integration
- DuckDB: Why DuckDB (in-process operation, Quack protocol, extensions)
- DuckDB FAQ: MIT licence
- DuckDB docs: SQL on Apache Arrow
- spiceai/spiceai on GitHub: v0.7-alpha release (rebuilt in Rust on DataFusion)