Skip to content

Add DuckLake storage extension with SQL pushdown support - #87

Merged
adsharma merged 2 commits into
LadybugDB:mainfrom
adsharma:feature/ducklake-pushdown
Sep 20, 2026
Merged

adsharma merged 2 commits into
LadybugDB:mainfrom
adsharma:feature/ducklake-pushdown

Conversation

@adsharma

@adsharma adsharma commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Mirrors the Iceberg/Unity Catalog extensions: embeds DuckDB, LOADs the ducklake (+httpfs) extension, and ATTACHes ducklake:<metadata> inside the embedded instance. Reuses DuckDBCatalog + AttachedDuckDBDatabase, so information_schema column lookups and the ForeignJoinPushDownOptimizer work with no core changes (default schema main, like DuckDB).

  • DBTYPE DUCKLAKE; ducklake:-prefixed, postgres-style, and file metadata paths pass through; empty path uses the TYPE ducklake secret.
  • ducklake_data_path / ducklake_read_only options (CALL-settable, env-seeded), forwarded as DATA_PATH + OVERRIDE_DATA_PATH / READ_ONLY.
  • Hermetic e2e test (ducklake.test) with checked-in file-backed catalog; rel tables need explicit CREATE REL TABLE ... WITH (storage=...) since DuckLake stores no PK/FK constraints for auto-detection.

Companion core PR: LadybugDB/ladybug#1002 (wires the submodule + Makefile list + ATTACH hint).

Verified: builds via build/ext, both e2e cases pass, EXPLAIN shows the 3-way join collapsing to a single pushed-down TABLE_FUNCTION_CALL.

Mirrors the Iceberg/Unity Catalog extensions: embeds DuckDB, LOADs the
ducklake (+httpfs) extension, and ATTACHes 'ducklake:<metadata>' inside the
embedded instance. Reuses DuckDBCatalog + AttachedDuckDBDatabase, so
information_schema column lookups and the ForeignJoinPushDownOptimizer work
with no core changes (default schema 'main', like DuckDB).

- DBTYPE DUCKLAKE; 'ducklake:'-prefixed, postgres-style, and file metadata
  paths pass through; empty path uses the TYPE ducklake secret.
- ducklake_data_path / ducklake_read_only options (SET-able, env-seeded),
  forwarded as DATA_PATH + OVERRIDE_DATA_PATH / READ_ONLY.
- Hermetic e2e test (ducklake.test) with checked-in file-backed catalog;
  rel tables need explicit CREATE REL TABLE ... WITH (storage=...) since
  DuckLake stores no PK/FK constraints for auto-detection.
The e2e runner executes every test file under extension/, including
ducklake.test, but libducklake.lbug_extension was never built because
EXTENSION_LIST omitted ducklake. LOAD_DYNAMIC_EXTENSION then failed and
both DuckLake cases cascaded (unknown option, no DBTYPE handler).
@adsharma
adsharma merged commit 3307c12 into LadybugDB:main Sep 20, 2026
2 checks passed
@adsharma
adsharma deleted the feature/ducklake-pushdown branch September 20, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant