DataFusion Python Examples

Some examples rely on data which can be downloaded from the following site:

Here is a direct link to the file used in the examples:

Creating a SessionContext

Executing Queries with DataFusion

Running User-Defined Python Code

Distributing DataFusion expressions

Rust FFI Extensions

Start with the worked example; the other two are focused test beds that exercise one part of the protocol hard rather than reading as a tutorial.

Each is a separate shared library, so the tests exercise real FFI type and codec boundaries rather than same-library Rust downcasts.

Substrait Support

TPC-H Examples

Within the subdirectory tpch there are 22 examples that reproduce queries in the TPC-H specification. These include realistic data that can be generated at arbitrary scale and allow the user to see use cases for a variety of data frame operations.

In the list below we describe which new operations can be found in the examples. The queries are designed to be of increasing complexity, so it is recommended to review them in order. For brevity, the following list does not include operations found in previous examples.