Open-source project
apache/datafusion avatar
apache/datafusion

Apache DataFusion: A Rust Query Engine for Building Custom Analytic Systems

Apache DataFusion SQL Query Engine. Out of the box," DataFusion offers SQL and DataFrame APIs, excellent [performance], built-in support for CSV, Parquet, JSON, and Avro, extensive customization, and a great community.

9,316 stars2,406 forksRustApache-2.0

At a glance

What is it?
Apache DataFusion is an extensible SQL and DataFrame query engine written in Rust, using Apache Arrow as its in-memory format. It targets developers who need a fast, customizable engine for domain-specific databases and data pipelines.
Who is it for?
Adopt DataFusion if you are building a domain-specific query engine, a new database, or a data pipeline in Rust and need a working SQL and DataFrame layer that you can customize. Avoid it if you need a turnkey database for end users, since it is a library and CLI, not a server.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What DataFusion Actually Solves

DataFusion solves the problem of building a query engine from scratch. If you are writing a database, a data pipeline, or a domain-specific analytics tool in Rust, you would otherwise need to implement SQL parsing, planning, optimization, and execution yourself. DataFusion gives you a full query planner and a columnar, streaming, multi-threaded, vectorized execution engine out of the box. It is not a database server. It is a library, plus a CLI, for developers who want to embed query capability into their own system. The README lists domain-specific query engines, new database platforms, and data pipelines as typical projects. It also points to related projects like DataFusion Python and DataFusion Java, which wrap the core for users who do not work in Rust. The target audience is engineers, not end users.

The Architecture: Arrow, Columnar Execution, and Extensibility

DataFusion uses Apache Arrow as its in-memory format. That means data is stored in columnar batches, which suits vectorized execution. The execution engine streams batches through a multi-threaded pipeline, processing columns in chunks rather than row by row. This design is what allows the engine to be fast on analytical workloads, though the README does not include specific benchmark numbers. The architecture is documented in the contributor guide and in the API docs. The key point is that DataFusion is not a monolithic engine. You can customize it at almost every point: additional data sources, query languages, functions, and custom operators. The planner and optimizer are part of the package, so you get a working query pipeline immediately and then replace or extend pieces. This is a different approach from embedding something like SQLite, which gives you a fixed engine with limited hooks.

Getting Started: Installation and Basic Usage

The README points to an installation guide for the CLI and a Rust getting-started page. As a Rust crate, you add datafusion as a dependency in your Cargo.toml. The default features include nested expressions, compression for xz2, bzip2, flate2, and zstd, plus crypto, datetime, and encoding expressions. You can disable or enable features based on your needs. The CLI is a separate binary that you can install according to the user guide. For a quick start, you can run SQL queries against CSV, Parquet, JSON, and Avro files without writing code. The README does not give exact commands, so you would need to consult the installation page. The DataFrame API is available in Rust and through the Python and Java bindings if you prefer those languages. The crate also includes examples in the datafusion-examples directory, which show how to use the API.

Built-in Data Sources and Functions

DataFusion supports CSV, Parquet, JSON, and Avro out of the box. That is a solid set for analytical workloads, especially Parquet, which is common in data lakes. The compression feature adds support for xz2, bzip2, flate2, and zstd, so compressed files are handled. The function set includes nested type operations like array_to_string, cryptographic functions like md5 and sha256, datetime functions like to_timestamp, and encoding expressions. This covers many common SQL needs. However, the list is not exhaustive. If you need a specific function that is not in the default set, you must either implement a custom function or check whether a feature flag enables it. The README does not enumerate all features, only the defaults, so you should review the full feature list in the repository before assuming something is available.

A Genuine Limitation: It Is a Library, Not a Server

The biggest limitation is that DataFusion does not give you a ready-to-deploy database server. There is a CLI, but it is for interactive querying of local files, not for serving concurrent clients over a network. If you need a multi-user database with authentication, transactions, or a network protocol, you have to build that yourself on top of DataFusion. The README does not mention any built-in server capabilities. Also, DataFusion is optimized for analytical, read-heavy workloads. It is not designed for OLTP or row-level updates. The execution engine is columnar and streaming, which is great for scans and aggregations but not for point updates. If your workload is transactional, DataFusion is the wrong tool. Another limitation is the learning curve: extending the engine requires understanding the planner, the expression system, and the execution model. The documentation helps, but it is a significant investment.

Alternatives: DuckDB and Polars

The main alternative for embedded analytical querying is DuckDB, which is also columnar and supports SQL, but it is written in C++ and offers a different extension model. DuckDB gives you a full SQL engine with a serverless embedded database, including transactions and a network client, which DataFusion does not. DuckDB is easier to use as a drop-in SQL database, but it is less customizable at the planner level. Polars is another alternative, focused on DataFrame operations in Rust and Python, but it is not a SQL engine by default. Polars has its own expression API and does not provide a full SQL parser and planner. If you need a DataFrame API with vectorized operations, Polars might be simpler. But if you need SQL parsing and a customizable query planner, DataFusion is more aligned. The choice depends on whether you want a complete database (DuckDB) or a composable query engine (DataFusion).

Maintenance, Upgrades, and Licensing

DataFusion is an Apache project, so the license is Apache-2.0. That is permissive for commercial use, and you can modify and redistribute the code with attribution. The project is under active development, as shown by the roadmap discussion for 2026 Q3-Q4. The README lists a minimum supported Rust version (MSRV) badge, so you need to track that when upgrading. Because the crate is evolving, the API can change between versions, which means maintenance cost for downstream projects. The README does not give a version history, but the feature list and roadmap indicate ongoing change. You should pin a specific version in your Cargo.toml and plan for periodic updates. The community is active on Discord and GitHub, which helps with questions. There are many known users listed on the project site, but the README does not name them, so you would need to check that page for references.

Editorial conclusion

Adopt DataFusion if you are building a domain-specific query engine, a new database, or a data pipeline in Rust and need a working SQL and DataFrame layer that you can customize. Avoid it if you need a turnkey database for end users, since it is a library and CLI, not a server. Verify first that your required data sources and functions are covered by the built-in features or that you are ready to implement custom extensions. Check the current MSRV and feature flags in Cargo.toml before committing, because the crate is under active development and the feature list changes.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
Community notes

Community notes