Skip to content

ADR-0002 · DataFusion engine on DuckLake tables

Status: Accepted · 2026-09-30

Datasets must be Parquet, versioned, time-travelable, and shared by the runner, preview, and dataset server. The prototype used DuckDB + DuckLake from Python.

  1. duckdb-rs everywhere — mature SQL, but one process-wide engine with its own threading; harder to control partitioning per node.
  2. Apache DataFusion + datafusion-ducklake — Arrow-native, multi-threaded streaming, explicit partitioning, and DuckLake read/write against a Postgres catalog + S3.
  3. Iceberg — heavier catalog, file-based metadata.

Option 2. DataFusion is the execution engine; DuckLake is the table format, with its catalog in Postgres schema ducklake and data in S3-compatible object storage (ADR-0006). Pin datafusion-ducklake 0.8.x. If a write feature is missing, commit through duckdb-rs (fallback, same catalog).

  • Same tables readable by DuckDB tools for ad-hoc analysis.
  • We depend on a 0.x crate: pinned, covered by integration tests, fallback documented.