Repository navigation
Conversation
- Match DuckLake default schema and table path selection - Apply the rule to direct and atomic creation in every writer - Assert safe-name filtering and persisted SQLite UUID paths
faysou
requested review from
anoop-narang,
shefeek-jinnah and
zfarrell
as code owners
November 23, 2026 16:40
Contributor
Author
|
@anoop-narang or to maintainers, I did a comparison of available features in datafusion-ducklake and ducklake specs in July and prepared several PRs at the time, I've rebased and published them today in case some could be useful to your project. I don't have more PRs planned. |
- Give the SQLite lookup a selective key in the index fixture. - Date flushed deletes from time travel when the DuckDB reference reports a snapshot outside the change window.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Use the object's UUID as the default directory when a new schema or table name falls outside
DuckLake's path rules. Reserve the directory before uploading and carry the same plan into
the catalog commit. Reuse an existing schema's stored path and honor an explicit path.
Tables staged together in a new schema share its planned directory. If a concurrent write
creates the schema with a different directory, the commit rejects the plan and removes its
staged files.
UUID directory reservation
flowchart LR Resolve["Resolve schema and table paths"] --> Name{"New default path with an invalid name?"} Name -->|Yes| UUID["Reserve the object UUID directory"] Name -->|No| Path["Use the stored, explicit, or valid name path"] UUID --> Upload["Stage files under the selected path"] Path --> Upload Upload --> Check{"Catalog path agrees at commit?"} Check -->|Yes| Commit["Commit metadata and staged file paths"] Check -->|No| Clean["Reject the write and remove staged files"]Verification
All-feature Clippy passes.
Five UUID-directory tests pass. DuckDB reads the staged files through all four standard
catalog layouts. The SQLite race test checks that the conflicting commit leaves the
snapshot head intact and removes its staged object.
The staged-table fixture checks that two tables share a schema directory and have distinct v7
table directories. DuckDB returns the expected sum of 20 for the first table.
Four stored-schema-path regression tests pass.
The SQLite index check uses a selective lookup key. The PostgreSQL multicatalog parity
test uses time travel to verify deletion dates when DuckDB 1.5.5 reports a snapshot
outside the requested change window. Both checks pass locally.
Specification proof
Reference implementation
DuckDB's DuckLake extension applies the same name predicate and allocates the UUID before
deriving the schema or table directory. PR #395 already stores object UUIDs. This change
carries the chosen paths through the Rust writer's separate upload and metadata commit steps.
Default path predicate,
Schema creation,
Table creation.