DataFusion-DuckLake
This is an early pre-release and very much a work in progress.
A DataFusion extension for querying DuckLake. DuckLake is an integrated data lake and catalog format that stores metadata in SQL databases and data as Parquet files on disk or object storage.
The goal of this project is to make DuckLake a first-class, Arrow-native lakehouse format inside DataFusion.
Currently Supported
- Read-only queries against DuckLake catalogs
- DuckDB, PostgreSQL, and MySQL catalog backends
- Local filesystem and S3-compatible object stores (MinIO, S3)
- Snapshot-based consistency
- Basic and decimal types
- Hierarchical path resolution (
data_path,schema,table,file) - Delete files for row-level deletion (MOR – Merge-On-Read)
- Parquet Modular Encryption (PME) for reading encrypted Parquet files
- Parquet footer size hints for optimized I/O
- Filter pushdown to Parquet for row group pruning and page-level filtering
- Dynamic metadata lookup (no upfront catalog caching)
- SQL-queryable
information_schemafor catalog metadata (snapshots, schemas, tables, columns, files) - DuckDB-style table functions:
ducklake_snapshots(),ducklake_table_info(),ducklake_list_files(),ducklake_table_changes()
Known Limitations
- Complex types (nested lists, structs, maps) have minimal support
- No write operations
- No partition-based file pruning
- No time travel support
- DuckDB-encrypted Parquet files (non-PME) are not supported
Roadmap
This project is under active development. The roadmap below reflects major areas of work currently underway or planned next. For the most up-to-date view, see the open issues and pull requests in this repository.
Metadata & Catalog Improvements
- Metadata caching to reduce repeated catalog lookups
- SQLite metadata provider
- Clear abstraction boundaries between catalog, metadata provider, and execution
Query Planning & Performance
- Partition-aware file pruning
- Improved predicate pushdown
- Smarter Parquet I/O planning
- Reduced metadata round-trips during planning
- Better alignment with DataFusion optimizer rules
Write Support
- Initial write support for DuckLake tables
Time Travel & Versioning
- Querying historical snapshots
- Explicit snapshot selection
Type System Expansion
- Improved support for complex and nested types
- Better alignment with DuckDB and DataFusion type semantics
Stability & Ergonomics
- Expanded test coverage
- Improved error messages and diagnostics
- Cleaner APIs for embedding in other DataFusion-based systems
- Additional documentation and examples
Usage
Feature Flags
| Feature | Description | Default |
|---|---|---|
metadata-duckdb |
DuckDB catalog backend | ✅ |
metadata-postgres |
PostgreSQL catalog backend | |
metadata-mysql |
MySQL catalog backend | |
encryption |
Parquet Modular Encryption (PME) support |
# DuckDB only (default)
# PostgreSQL only
# MySQL only
# All backends
Example
# DuckDB catalog
# PostgreSQL catalog
# MySQL catalog
Integration
use RuntimeEnv;
use *;
use ;
use Arc;
// Create metadata provider
let provider = new?;
// Create runtime (register object stores if using S3/MinIO)
let runtime = new;
// Example: Register S3/MinIO object store
let s3: = new;
runtime.register_object_store;
// Create DuckLake catalog
let catalog = new?;
// Create session and register catalog
let ctx = new_with_config_rt;
ctx.register_catalog;
// Query
let df = ctx.sql.await?;
df.show.await?;
Project Status
This project is evolving alongside DataFusion and DuckLake. APIs may change as core abstractions are refined.
Feedback, issues, and contributions are welcome.