Repository navigation
DeltaLake: Use new create table transaction - #106011
Conversation
|
Workflow [PR], commit [debb618] Summary: ❌
AI ReviewSummaryThis PR adds Findings❌ Blockers
|
| Metric | Baseline | Current | Δ |
|---|---|---|---|
| Lines | 89.10% | 89.10% | +0.00% |
| Functions | 91.80% | 91.80% | +0.00% |
| Branches | 81.50% | 81.50% | +0.00% |
Changed lines: Changed C/C++ lines covered: 648/779 (83.18%) · Uncovered code
`getInMemoryMetadataPtr` returns a `StorageMetadataHandle` by value. Its rvalue `operator->` is deleted to prevent the reference returned by `getColumns` from dangling. Store the handle in a local variable so it outlives the `columns` reference. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
| } | ||
|
|
||
| /// A catalog-backed table is rebuilt from the registered Delta schema, which cannot carry a DEFAULT expression; reject rather than silently drop it. Plain tables keep it in their own metadata. | ||
| if (register_with_catalog && columns->hasDefaults()) |
There was a problem hiding this comment.
DEFAULT is not the only ClickHouse-side contract that this catalog path cannot preserve. StorageObjectStorage still stores constraints_ in the transient table object built for the DDL, but every later catalog lookup rebuilds the table with ConstraintsDescription{} and no local metadata in DatabaseDataLake::tryGetTableImpl (src/Storages/ObjectStorage/StorageObjectStorage.cpp:359-360, src/Databases/DataLake/DatabaseDataLake.cpp:972-991).
That means CREATE TABLE db.\ns.t` (x Int32 CONSTRAINT c CHECK x > 0) ENGINE = DeltaLake...succeeds here, then the constraint disappears on the next lookup and later inserts stop enforcing it. Please rejectCHECKconstraints on catalog-backedDeltaLake CREATE TABLEalongsideDEFAULT`, or persist a ClickHouse-side override for catalog tables.
|
📊 Cloud Performance Report ✅ AI verdict: no significant changes detected. K_source=6 K_base=30 flagged=0/65 clickbench🟢 No significant changes tpch_adapted_1_official🟢 No significant changes Debug info
|
|
@SmitaRKulkarni @kssenii — ClickGap found the following in this PR:
Close anything that's wrong or already addressed. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Support
CREATE TABLE ... ENGINE = DeltaLake(...)to create a new Delta Lake table (writing the initial commit via delta-kernel-rs), attach to an existing_delta_log, or register an existing table into a Unity catalog. Gated behind the newallow_delta_lake_create_tablesetting; creating a partitioned table (PARTITION BY) is not supported yet. Writes to a Delta Lake table now cast values to the Delta write-schema type with an accurate cast that throws when a value does not fit the target type (e.g.300written into a Deltabyte) instead of silently truncating; the newdelta_lake_accurate_write_castsetting (default enabled) controls this, andcompatibilitybelow 26.9 restores the previous truncating behaviour.Closes: #103155
Related: #105861
Workflow [PR]
Sync PR [sync-upstream/pr/106011]
Version info
26.9.1.1517(included in26.9and later)