Getting Started

This section describes how you can get started at developing DataFusion.

Windows setup

wget https://az792536.vo.msecnd.net/vms/VMBuild_20190311/VirtualBox/MSEdge/MSEdge.Win10.VirtualBox.zip
choco install -y git rustup.install visualcpp-build-tools
git-bash.exe
cargo build

Protoc Installation

Compiling DataFusion from sources requires an installed version of the protobuf compiler, protoc.

On most platforms this can be installed from your system’s package manager

# Ubuntu
$ sudo apt install -y protobuf-compiler

# Fedora
$ dnf install -y protobuf-devel

# Arch Linux
$ pacman -S protobuf

# macOS
$ brew install protobuf

You will want to verify the version installed is 3.12 or greater, which introduced support for explicit field presence. Older versions may fail to compile.

$ protoc --version
libprotoc 3.12.4

Alternatively a binary release can be downloaded from the Release Page or built from source.

Bootstrap environment

DataFusion is written in Rust and it uses a standard rust toolkit:

  • cargo build

  • cargo fmt to format the code

  • cargo test to test

  • etc.

Note that running cargo test requires significant memory resources, due to cargo running many tests in parallel by default. If you run into issues with slow tests or system lock ups, you can significantly reduce the memory required by instead running cargo test -- --test-threads=1. For more information see this issue.

Testing setup:

  • rustup update stable DataFusion uses the latest stable release of rust

  • git submodule init

  • git submodule update

Formatting instructions:

or run them all at once: