Skip to content

Create tables without engine arguments through the Iceberg REST catalog - #125006

Merged
asya-ch merged 16 commits into
masterfrom
asya/catalog_create
Nov 10, 2026
Merged

asya-ch merged 16 commits into
masterfrom
asya/catalog_create

Conversation

@asya-ch

@asya-ch asya-ch commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #114477

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

CREATE TABLE without engine arguments in a DataLakeCatalog database with an Iceberg REST catalog now lets the catalog choose the table location and write the first metadata file, instead of ClickHouse writing it to storage directly. This makes such creates work with vended_credentials = 1.


Workflow [PR]
Sync PR [sync-upstream/pr/125006]

Version info

  • Merged into: 26.11.1.1823-master (included in 26.11 and later)

@clickhouse-gh

clickhouse-gh Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [7be985e]

Summary: ✅


AI Review

Summary

Reviewed #125006 at 7be985e34214d96a2e406e7a908e78dd59a6c2cb, including all existing review threads and replies. The change delegates pathless Iceberg table creation to the REST catalog so that the catalog selects the location and writes the initial metadata, enabling vended credentials. Request changes: existing bucket-qualified storage endpoints can leave newly created tables unreadable. One previously reported engine/backend mismatch also remains and is recorded below without reopening the author-resolved thread.

Findings

⚠️ Majors

  • src/Databases/DataLake/DatabaseDataLake.cpp:1190 — Catalog-selected buckets are incompatible with previously working bucket-qualified endpoints. With the original integration-test configuration (storage_endpoint = 'http://minio1:9001/warehouse-rest', catalog warehouse s3://iceberg-data/), creation now writes to bucket iceberg-data. However, TableMetadata::constructLocation builds http://minio1:9001/warehouse-rest/iceberg-data/<namespace>/<table>/, and tryGetTableImpl creates an S3 client for bucket warehouse-rest. The metadata pointer becomes relative to that incorrectly resolved table path, so the lazy CREATE TABLE can succeed while subsequent reads and inserts cannot find the metadata. Changing the test to a host-only endpoint removes the previous configuration from coverage. Reconcile endpoint resolution with the catalog-selected location or preserve the former creation path for these definitions; retain the original endpoint as a regression case.

  • src/Databases/DataLake/DatabaseDataLake.cpp:1148 — An unavailable location hint still bypasses engine/backend validation. [dismissed by author -- https://github.com/Create tables without engine arguments through the Iceberg REST catalog #125006#discussion_r4264947479] The issue remains because both location lookups can return no value, after which the actual backend returned by tryGetTableImpl is never compared with the requested engine. In the embedded catalog, /config advertises no base location and newly created namespaces have no location property; CREATE TABLE ... ENGINE = IcebergLocal can consequently create and return an S3 table. Validate the actual catalog-assigned backend while preserving the published table on failure. No reply or thread reopening is warranted by the existing discussion.

Tests
  • ⚠️ Retain the original bucket-qualified storage_endpoint case and verify pathless creation followed by insert/read; switching the fixture to a host-only endpoint conceals the regression.
  • ⚠️ Add an embedded-catalog mismatch case with no global or namespace location hint; the existing mismatch test covers a catalog that does expose a namespace location.
Missing context / blind spots
  • ⚠️ Integration tests were not run locally. The fetched Praktika report showed no failed tests, but its integration-job entries contained no individual test results. Running the focused endpoint and embedded-catalog cases at this head would provide runtime confirmation; the findings above are based on concrete source traces.
Final Verdict

⚠️ Request changes. Preserve usable storage resolution for existing bucket-qualified database endpoints and add focused regression coverage. The earlier engine/backend concern remains recorded as author-dismissed and is not reposted inline.

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Oct 9, 2026
@clickhouse-gh clickhouse-gh Bot added the comp-datalake Data lake table formats (Iceberg/Delta/Hudi) integration. label Oct 9, 2026
@scanhex12 scanhex12 self-assigned this Oct 14, 2026
Comment thread src/Databases/DataLake/ICatalog.cpp Resolved
@clickhouse-gh

clickhouse-gh Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 7be985e34 with master 213bd8dd0 (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of 35e918caf; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Object file sizes

50 object files changed (+33.24 KiB total), 0 added.

Object file Master PR Δ
src/CMakeFiles/dbms.dir/Databases/DataLake/DatabaseDataLake.cpp.o 1.78 MiB 1.81 MiB +30.84 KiB (+1.69%)
src/CMakeFiles/dbms.dir/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp.o 1.51 MiB 1.48 MiB -28.20 KiB (-1.83%)

719 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.

Compile time of recompiled translation units

745 translation units recompiled, 6128 s compile time in total, 745 of them have a recent master baseline.

Job report

@scanhex12 scanhex12 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally looks good, just few comments

@asya-ch
asya-ch enabled auto-merge November 7, 2026 00:58
@asya-ch
asya-ch disabled auto-merge November 9, 2026 19:06
@asya-ch
asya-ch added this pull request to the merge queue Nov 10, 2026
Merged via the queue into master with commit acbdf50 Nov 10, 2026
369 of 370 checks passed
@asya-ch
asya-ch deleted the asya/catalog_create branch November 10, 2026 06:17
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 10, 2026
@clickhouse-gh clickhouse-gh Bot added comp-datalake-catalogs Data lake catalogs: the DataLakeCatalog database engine and its catalog clients - Iceberg REST, A... and removed comp-datalake Data lake table formats (Iceberg/Delta/Hudi) integration. labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-datalake-catalogs Data lake catalogs: the DataLakeCatalog database engine and its catalog clients - Iceberg REST, A... pr-improvement Pull request with some product improvements pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants