MCPcopy Index your code
hub / github.com/apache/datafusion

github.com/apache/datafusion @54.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 54.0.0 ↗ · + Follow
27,814 symbols 134,652 edges 1,576 files 7,349 documented · 26% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Apache DataFusion

Crates.io Apache licensed Build Status Commit Activity [Open Issues]open-issues-url [Pending PRs]pending-pr-url [Discord chat]discord-url [Linkedin]linkedin-url Crates.io MSRV

Website | API Docs | Chat

logo

DataFusion is an extensible query engine written in Rust that uses Apache Arrow as its in-memory format.

This crate provides libraries and binaries for developers building fast and feature-rich database and analytic systems, customized for particular workloads. See use cases for examples. The following related subprojects target end users:

"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.

DataFusion features a full query planner, a columnar, streaming, multi-threaded, vectorized execution engine, and partitioned data sources. You can customize DataFusion at almost all points including additional data sources, query languages, functions, custom operators and more. See the Architecture section for more details.

Here are links to important resources:

What can you do with this crate?

DataFusion is great for building projects such as domain-specific query engines, new database platforms and data pipelines, query languages and more. It lets you start quickly from a fully working engine, and then customize those features specific to your needs. See the list of known users.

Contributing to DataFusion

Please see the contributor guide and communication pages for more information.

Crate features

This crate has several features which can be specified in your Cargo.toml.

Default features:

  • nested_expressions: functions for working with nested types such as array_to_string
  • compression: reading files compressed with xz2, bzip2, flate2, and zstd
  • crypto_expressions: cryptographic functions such as md5 and sha256
  • datetime_expressions: date and time functions such as to_timestamp
  • encoding_expressions: encode and decode functions
  • parquet: support for reading the Apache Parquet format
  • sql: support for SQL parsing and planning
  • regex_expressions: regular expression functions, such as regexp_match
  • unicode_expressions: include Unicode-aware functions such as character_length
  • unparser: enables support to reverse LogicalPlans back into SQL
  • recursive_protection: uses recursive for stack overflow protection.

Optional features:

  • avro: support for reading the Apache Avro format
  • backtrace: include backtrace information in error messages
  • parquet_encryption: support for using Parquet Modular Encryption
  • serde: enable arrow-schema's serde feature

DataFusion API Evolution and Deprecation Guidelines

Public methods in Apache DataFusion evolve over time: while we try to maintain a stable API, we also improve the API over time. As a result, we typically deprecate methods before removing them, according to the deprecation guidelines.

Dependencies and Cargo.lock

Following the guidance on committing Cargo.lock files, this project commits its Cargo.lock file.

CI uses the committed Cargo.lock file, and dependencies are updated regularly using Dependabot PRs.

Extension points exported contracts — how you extend this code

WindowUDFImpl (Interface)
Trait for implementing [`WindowUDF`]. This trait exposes the full API for implementing user defined window functions an [19 …
datafusion/expr/src/udwf.rs
GroupsAccumulator (Interface)
`GroupsAccumulator` implements a single aggregate (e.g. AVG) and stores the state for *all* groups internally. Logicall [20 …
datafusion/expr-common/src/groups_accumulator.rs
Dialect (Interface)
`Dialect` to use for Unparsing The default dialect tries to avoid quoting identifiers unless necessary (e.g. `a` instea [9 …
datafusion/sql/src/unparser/dialect.rs
PartitionStream (Interface)
A partition that can be converted into a [`SendableRecordBatchStream`] Combined with [`StreamingTableExec`], you can us [13 …
datafusion/physical-plan/src/streaming.rs
PhysicalProtoConverterExtension (Interface)
Controls the conversion of physical plans and expressions to and from their Protobuf variants. Using this trait, users c [6 …
datafusion/proto/src/physical_plan/mod.rs
PhysicalExprAdapter (Interface)
Trait for adapting [`PhysicalExpr`] expressions to match a target schema. This is used in file scans to rewrite express [7 …
datafusion/physical-expr-adapter/src/schema_rewriter.rs
FileSource (Interface)
File format specific behaviors for [`DataSource`] # Schema information There are two important schemas for a [`FileSour [9 …
datafusion/datasource/src/file.rs
ToHex (Interface)
Trait for converting integer types to hexadecimal in a buffer [8 implementers]
datafusion/functions/src/string/to_hex.rs

Core symbols most depended-on inside this repo

clone
called by 2723
datafusion/ffi/src/udtf.rs
collect
called by 2484
datafusion/core/src/dataframe/mod.rs
to_string
called by 2375
datafusion/core/src/dataframe/mod.rs
map
called by 2305
datafusion/common/src/stats.rs
col
called by 2197
datafusion/expr/src/expr_fn.rs
into
called by 1860
datafusion/sql/src/unparser/ast.rs
clone
called by 1776
datafusion/common/src/cse.rs
lit
called by 1691
datafusion/expr/src/literal.rs

Shape

Function 12,721
Method 11,963
Class 2,487
Enum 438
Interface 205

Languages

Rust100%
Python1%

Modules by API surface

datafusion/sql/tests/sql_integration.rs328 symbols
datafusion/common/src/scalar/mod.rs249 symbols
datafusion/proto/src/generated/prost.rs215 symbols
datafusion/core/tests/tpcds_planning.rs201 symbols
datafusion/substrait/tests/cases/roundtrip_logical_plan.rs189 symbols
datafusion/pruning/src/pruning_predicate.rs189 symbols
datafusion/core/tests/dataframe/mod.rs181 symbols
datafusion/sql/tests/cases/plan_to_sql.rs172 symbols
benchmarks/src/sql_benchmark.rs167 symbols
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs166 symbols
datafusion/core/src/physical_planner.rs165 symbols
datafusion/core/src/execution/session_state.rs164 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Datastores touched

postgresDatabase · 1 repos

For agents

$ claude mcp add datafusion \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact