Repository navigation
feat: PARTITIONED BY in a Unity Catalog CREATE TABLE - #143
Merged
Merged
Conversation
benfleis
force-pushed
the
feat/uc-create-external
branch
from
October 13, 2026 21:42
28945d8 to
544e4d5
Compare
DuckDB's base catalog rejects any WITH clause, SORTED BY and PARTITIONED BY before a bind finishes, so a Unity Catalog table could never be asked for by anything but its columns. The catalog now decides for itself: - `location`, the option that asks for an external table, is accepted through the bind and refused in the create path with what it would have meant. The external path is not built yet; this is what the user sees until it is. - PARTITIONED BY is allowed through. The partition columns reach the Delta writer and are registered with the table, so a partitioned managed table now works end to end. - Any other option is refused by name rather than carried into the create, where the catalog and the kernel each have their own view of what a property may be. SORTED BY keeps the base catalog's refusal. Option keys arrive lowercased from the parser, and both checks rely on that rather than one comparing case-insensitively and the other exactly -- the combination would have silently ignored a location. The new test pins each refusal, including the two that could only ever come from here. Its driver and create_table.py's now pass the catalog in explicitly: only a test that provisions resources exports it, so a body that relied on that skipped or passed depending on what ran before it.
…s one through PARTITIONED BY reaches the Delta writer once the catalog stops refusing it, and nothing checked what it produced. A partitioned table is now created, written across two partitions and read back, and the driver checks over UC's REST API that the partition column was registered as one -- the part no query through DuckDB can see. Also in the options test: - The header is whole again: the description had been split around its `group:` line. - The table-property case says what the code does -- every option but `location` is refused -- instead of describing a rule for protocol properties alone. - The driver takes the server's address from the fixture, so an attached server works without UC_ENDPOINT.
benfleis
force-pushed
the
feat/uc-create-external
branch
from
October 15, 2026 17:14
544e4d5 to
8028e14
Compare
This branch was successfully 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.
CREATE TABLE … PARTITIONED BY (…)now works in a Unity Catalog schema: thetable is written partitioned, and UC registers the partition columns.
WITH (location = …)asks for an external table, which is not supported yet;it now fails with an error that says so. Other
WITHoptions andSORTED BYstay refused.