Skip to content

Allow to create table without providing credentials if catalog specified - #114477

Merged
scanhex12 merged 20 commits into
masterfrom
zero-arg-catalog-table-engine
Oct 6, 2026
Merged

scanhex12 merged 20 commits into
masterfrom
zero-arg-catalog-table-engine

Conversation

@scanhex12

@scanhex12 scanhex12 commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Improvement

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

Allow to create table without providing credentials if catalog specified. Earlier the query to create table looked like create table catalog.table enigine = IcebergS3(url, key1, key2), but now we can create it via create table catalog.table enigine = IcebergS3


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

Version info

  • Merged into: 26.10.1.1677-master (included in 26.10 and later)

@scanhex12
scanhex12 force-pushed the zero-arg-catalog-table-engine branch from 5d264fa to fac5b01 Compare August 12, 2026 12:07
@clickhouse-gh

clickhouse-gh Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b7c10f2]


AI Review

Summary

This PR teaches DataLakeCatalog databases to infer a default table engine and engine arguments from the catalog, so CREATE TABLE can omit the storage URL and, in some modes, explicit credentials. The remaining correctness issues are the eager namespace-creation path used during engine inference and the OneLake 409 workaround, so I’m still at ⚠️ Request changes.

PR Metadata
  • Changelog category = Improvement is fine.
  • The current Changelog entry overclaims the behavior and has a couple of typos. The shorthand is still rejected for catalog-managed credential modes such as vended-credential REST and Glue provider-chain setups. Suggested replacement:
    Allow omitting table-engine arguments in CREATE TABLE on DataLakeCatalog databases when the catalog or database can determine the table location and required storage access.
Findings
  • ❌ Blockers
    • [src/Databases/DataLake/DatabaseDataLake.cpp:958] getDefaultTableEngineName is now stateful: InterpreterSetQuery::applySettingsFromQuery calls it while merely classifying a CREATE TABLE ... SETTINGS ... clause, before executeQuery reaches access checks. On REST-style catalogs that can auto-create namespaces, a query that later fails — or is not even authorized — can still leave the namespace behind. The helper used for engine inference needs to be side-effect free, or it needs the same rollback contract as the real create path.
  • ⚠️ Majors
    • [src/Databases/DataLake/RestCatalog.cpp:2002] The OneLake-specific 409 Conflict fallback only checks that the catalog now points at the same v1.metadata.json path. For a fresh table that path is deterministic, so two concurrent non-IF NOT EXISTS CREATE TABLE ns.t ... statements with different schemas still compare equal here. The loser then returns success even though the catalog may contain the other request’s schema. Please compare the existing table metadata to the requested schema / partition spec / write order before accepting the 409, or keep this path idempotent-only.
Tests
  • ⚠️ The PR still has no focused reproduction of the OneLake create-path 409 case. A small concurrent/conflicting CREATE TABLE test is needed to prove the relaxed fallback only accepts the intended auto-registration case.
Final Verdict
  • Status: ⚠️ Request changes
  • Minimum required actions:
    1. Make default-engine inference side-effect free, or defer namespace creation to the actual create path after access checks.
    2. Tighten the OneLake 409 acceptance so a conflicting concurrent create cannot succeed unless the existing table definition matches the request.

LLVM Coverage Report

Measured on commit b7c10f2.

Metric Baseline Current Δ
Lines 88.30% 88.30% +0.00%
Functions 91.80% 92.10% +0.30%
Branches 79.70% 79.70% +0.00%

Changed lines: Changed C/C++ lines covered: 237/403 (58.81%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Aug 12, 2026
Comment thread src/Databases/DataLake/RestCatalog.cpp Resolved
@clickhouse-gh

clickhouse-gh Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing b7c10f2d8 with master cf63c917b (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of d01529d7a; 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

57 object files changed (+188.32 KiB total), 0 added.

Object file Master PR Δ
src/CMakeFiles/dbms.dir/Databases/DataLake/DatabaseDataLake.cpp.o 1.57 MiB 1.63 MiB +65.96 KiB (+4.11%)
src/CMakeFiles/dbms.dir/Databases/DataLake/RestCatalog.cpp.o 1.11 MiB 1.14 MiB +31.45 KiB (+2.77%)
src/CMakeFiles/dbms.dir/Storages/ObjectStorage/registerStorageObjectStorage.cpp.o 1.44 MiB 1.46 MiB +19.68 KiB (+1.34%)
src/TableFunctions/CMakeFiles/clickhouse_table_functions.dir/TableFunctionObjectStorage.cpp.o 2.51 MiB 2.53 MiB +18.81 KiB (+0.73%)

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

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

Translation unit Master PR Δ vs median
src/Storages/StorageReplicatedMergeTree.cpp 41.3 s 29.6 s -9.8 s (-25%)
src/Interpreters/Context.cpp 41.0 s 29.9 s -9.1 s (-23%)

Job report

@clickhouse-gh clickhouse-gh Bot added the comp-datalake Data lake table formats (Iceberg/Delta/Hudi) integration. label Sep 4, 2026
Comment thread src/Databases/DataLake/RestCatalog.cpp Resolved

@asya-ch asya-ch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please address the open comments and I'll take another pass.

Also, a fair amount of the PR is refactoring. Would you mind moving the refactoring changes to an initial preparatory PR? It would make it easier to review.

Comment thread src/Databases/DataLake/RestCatalog.cpp Resolved
Comment thread src/Databases/DataLake/ICatalog.h Resolved
Comment thread src/Databases/DataLake/RestCatalog.cpp Resolved
@asya-ch asya-ch self-assigned this Sep 21, 2026
@scanhex12
scanhex12 force-pushed the zero-arg-catalog-table-engine branch from 641bf49 to 2910045 Compare September 22, 2026 09:46
Comment thread src/Databases/DataLake/RestCatalog.cpp Resolved
Comment thread src/Databases/DataLake/GlueCatalog.cpp Resolved
@scanhex12
scanhex12 requested a review from asya-ch September 22, 2026 17:06

@asya-ch asya-ch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Did you test it manually? Could you please add a comment with queries that you ran on Unity and OneLake? (With PII obscured.)

Comment thread src/Databases/DataLake/RestCatalog.cpp Resolved
Comment thread src/Databases/DataLake/RestCatalog.cpp Resolved
@scanhex12
scanhex12 force-pushed the zero-arg-catalog-table-engine branch 2 times, most recently from 3b881b5 to cf9798e Compare September 28, 2026 21:38
scanhex12 added a commit that referenced this pull request Sep 28, 2026
Only Fabric registers tables it discovers in the lakehouse, so only there the
initial metadata written just before `createTable` makes the catalog report the
identifier as taken. For other REST catalogs a 409 is a real name collision
again, which also keeps `splitLocationURI` from conflating locations on
different schemes or accounts there.

Also describe the location format handled in `OneLakeCatalog::getDefaultTableLocation`.

Address review: #114477

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
scanhex12 added a commit that referenced this pull request Sep 29, 2026
`tryGetDataLakeDatabase` used `std::static_pointer_cast`, so for `Iceberg*` /
`DeltaLake*` tables in a regular `Atomic`/`Ordinary` database the database object
was treated as `DatabaseDataLake`. `getCatalog` then locked a garbage mutex
(`mutex lock failed: Invalid argument`) or hung, breaking every such table and
killing the server in `test_database_iceberg`. Restore `std::dynamic_pointer_cast`,
which returns nullptr for non-catalog databases as callers expect.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=114477&sha=276ff65113ffd1527eb676e88da08fc7834faec5&name_0=PR
PR: #114477

Co-Authored-By: Claude Opus 5.5 <[email protected]>

auto table_metadata = tryGetNewTableMetadata(settings, *catalog, name);
const auto catalog_storage_type = catalog->getStorageType();
if (!table_metadata && !catalog_storage_type && catalog->createNamespaceIfNotExists(DataLake::parseTableName(name).first, /* location */ ""))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

getDefaultTableEngineName now creates the namespace while just inferring an omitted engine, but unlike getEngineArgsForNewTable it never tracks or rolls that namespace back if inference later fails. For REST-style catalogs with no namespace location, createNamespaceIfNotExists(..., "") succeeds here, tryGetNewTableMetadata still returns nullopt, and CREATE TABLE db.\ns.tbl` (x UInt8)now throws fromcannotTellNewTableLocationafter leavingns` behind in the catalog.

This also happens earlier than the real create path for CREATE ... SETTINGS ..., because InterpreterSetQuery::applySettingsFromQuery calls this helper during settings splitting. Can this mirror the namespace_created cleanup contract from getEngineArgsForNewTable, or defer namespace creation until the path that can roll it back?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@scanhex12, let's address this please. We need something like

     if (namespace_created)
          catalog->dropNamespace(namespace_name);

@scanhex12
scanhex12 requested a review from asya-ch September 29, 2026 17:18
f"CREATE TABLE {CATALOG_NAME}.`{root_namespace}.{table_name}` (x String) ENGINE = Iceberg",
settings={
"allow_experimental_database_iceberg": 1,
"write_full_path_in_iceberg_metadata": 1,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not a great user experience to have to specify write_full_path_in_iceberg_metadata=1. Do you think it would be feasible to flip the default (or even remove it) in a follow-up?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It writes, for instance, s3://a/b/c instead of /a/b/c. I don’t remember exactly why, but this setting is important for the test suite.

assert node.query(f"SELECT * FROM {CATALOG_NAME}.`{root_namespace}.{table_name}`") == "AAPL\n"


def test_create_without_engine_arguments(started_cluster):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: Up to you, but I would combine test_create_without_engine_arguments / test_create_without_engine and test_create_without_engine_arguments_storage_mismatch / test_create_without_engine_arguments_existing_namespace into parametrized tests. Would make it more readable. Same comment applies to the new tests in test_database_glue.


auto table_metadata = tryGetNewTableMetadata(settings, *catalog, name);
const auto catalog_storage_type = catalog->getStorageType();
if (!table_metadata && !catalog_storage_type && catalog->createNamespaceIfNotExists(DataLake::parseTableName(name).first, /* location */ ""))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@scanhex12, let's address this please. We need something like

     if (namespace_created)
          catalog->dropNamespace(namespace_name);

result.storage_type = table_metadata.getStorageType();
}

if (result.args.size() == 1)

@asya-ch asya-ch Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit:

Suggested change
if (result.args.size() == 1)
/// Only one arg means the user gave no credentials in CREATE DATABASE. Find them elsewhere.
if (result.args.size() == 1)

@@ -46,7 +46,7 @@ class UnityV2Catalog final : public ICatalog, private DB::WithContext
Poco::JSON::Object::Ptr metadata_content) const override;

/// Only checks that the schema exists. Unity schemas carry ownership and grants, so `CREATE TABLE` must not create them.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's add getDefaultTableLocation().

void StorageAzureConfiguration::addStructureAndFormatToArgsIfNeeded(
ASTs & args, const String & structure_, const String & format_, ContextPtr context, bool with_structure)
{
/// The OneLake signature is a single storage URL: the account and the container are

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I noticed you added OneLake tests in an earlier commit but they are gone now. Is it intentional?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes — the dedicated OneLake zero-argument CREATE TABLE coverage moved into the shared e2e suite rather than staying in test_database_iceberg.

The current coverage is:

  • tests/integration/test_e2e_catalogs/test.py:730 — test_create_without_engine_arguments
  • tests/integration/test_e2e_catalogs/test.py:754 — test_create_without_engine_arguments_storage_mismatch
  • parameterized across biglake, glue, and onelake by catalog_manager at tests/integration/test_e2e_catalogs/test.py:174

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I decided that right now e2e tests are really flaky for some reason and it's better not to touch them, but I'll return my tests back

Comment thread src/Databases/DataLake/RestCatalog.cpp Outdated
}
catch (const DB::HTTPException & ex)
{
/// Fabric registers tables it discovers in the lakehouse, so it has already picked up the

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm curious -- have you ran into the 409 issue? I know you mentioned offline you haven't ran this on a real OneLake catalog yet. Do our tests reproduce it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not for this create-path 409 case.

The only current 409 coverage I found is tests/integration/test_database_iceberg/test.py:2780, which exercises updateMetadata conflicts during concurrent INSERT writers. I did not find a test that reproduces RestCatalog::createTable getting a 409 because OneLake auto-registered the freshly written initial metadata.

scanhex12 added a commit that referenced this pull request Oct 2, 2026
Only Fabric registers tables it discovers in the lakehouse, so only there the
initial metadata written just before `createTable` makes the catalog report the
identifier as taken. For other REST catalogs a 409 is a real name collision
again, which also keeps `splitLocationURI` from conflating locations on
different schemes or accounts there.

Also describe the location format handled in `OneLakeCatalog::getDefaultTableLocation`.

Address review: #114477

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@scanhex12
scanhex12 force-pushed the zero-arg-catalog-table-engine branch from c60de1d to 4491836 Compare October 2, 2026 22:16
scanhex12 added a commit that referenced this pull request Oct 2, 2026
`tryGetDataLakeDatabase` used `std::static_pointer_cast`, so for `Iceberg*` /
`DeltaLake*` tables in a regular `Atomic`/`Ordinary` database the database object
was treated as `DatabaseDataLake`. `getCatalog` then locked a garbage mutex
(`mutex lock failed: Invalid argument`) or hung, breaking every such table and
killing the server in `test_database_iceberg`. Restore `std::dynamic_pointer_cast`,
which returns nullptr for non-catalog databases as callers expect.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=114477&sha=276ff65113ffd1527eb676e88da08fc7834faec5&name_0=PR
PR: #114477

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@scanhex12
scanhex12 force-pushed the zero-arg-catalog-table-engine branch from 6077c7e to 6473af8 Compare October 4, 2026 09:14
scanhex12 and others added 9 commits October 6, 2026 09:27
`tryGetDataLakeDatabase` used `std::static_pointer_cast`, so for `Iceberg*` /
`DeltaLake*` tables in a regular `Atomic`/`Ordinary` database the database object
was treated as `DatabaseDataLake`. `getCatalog` then locked a garbage mutex
(`mutex lock failed: Invalid argument`) or hung, breaking every such table and
killing the server in `test_database_iceberg`. Restore `std::dynamic_pointer_cast`,
which returns nullptr for non-catalog databases as callers expect.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=114477&sha=276ff65113ffd1527eb676e88da08fc7834faec5&name_0=PR
PR: #114477

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…faultTableLocation`

Only an absent database (`ENTITY_NOT_FOUND`) means "no default location". Other
failures (IAM denial, expired credentials, transient outage) were turned into
`std::nullopt` and surfaced as a misleading `BAD_ARGUMENTS` from
`DatabaseDataLake::getEngineArgsForNewTable`. Throw them as
`DATALAKE_DATABASE_ERROR`, like the other Glue methods do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e storage access

`vended_credentials` is on by default, so the check for credentials that come
from the catalog also rejected OneLake, BigLake and Paimon REST, which never pass
storage credentials in the engine arguments and configure storage access in
`applyCatalogSpecificConfiguration` instead. Exempt them, sharing the list with
`buildTableEngineArgs` through `catalogConfiguresStorageAccess`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…cation

`GlueCatalog::createNamespaceIfNotExists` creates a database without `LocationUri`,
so a zero-argument `CREATE TABLE` in a missing Glue namespace left an empty database
behind and still failed to find the table location. Only REST catalogs assign
a default location to a new namespace, so only they auto-create it now.

#114477

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@scanhex12
scanhex12 force-pushed the zero-arg-catalog-table-engine branch from 0ff4098 to b7c10f2 Compare October 6, 2026 09:31
const std::string registered_metadata_path
= existing_properties ? existing_properties->iceberg_metadata_file_location : std::string{};

if (!exists || splitLocationURI(registered_metadata_path) != splitLocationURI(new_metadata_path))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This 409 fallback is still too weak for non-IF NOT EXISTS creates. For a fresh Iceberg table the initial metadata file is deterministically .../metadata/v1.metadata.json, so two concurrent CREATE TABLE ns.t ... statements with different schemas still produce the same new_metadata_path. If one request wins and the other lands here, the loser now returns success solely because the catalog points at the same path, even though the catalog may contain the winner's schema.

That breaks the CREATE TABLE contract by letting a conflicting create succeed. Can we verify that the existing table metadata matches the requested schema / partition spec / write order before accepting the 409, or otherwise keep this relaxed path for explicitly idempotent creates only?

@scanhex12
scanhex12 enabled auto-merge October 6, 2026 14:00
@scanhex12
scanhex12 disabled auto-merge October 6, 2026 14:07
@scanhex12
scanhex12 added this pull request to the merge queue Oct 6, 2026
Merged via the queue into master with commit 2788f10 Oct 6, 2026
145 of 148 checks passed
@scanhex12
scanhex12 deleted the zero-arg-catalog-table-engine branch October 6, 2026 14:43
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 6, 2026
alexey-milovidov added a commit to zvonand/ClickHouse that referenced this pull request Oct 8, 2026
…erg-table

`master` gained a second way to create a table in a `DataLakeCatalog` (ClickHouse#114477):
`ENGINE = IcebergS3` (or another catalog-family engine) without arguments, completed
from the catalog by `completeEngineArgsFromCatalog` / `getEngineArgsForNewTable`. It
also injected that engine into a `CREATE TABLE` without `ENGINE` through
`IDatabase::getDefaultTableEngineName`. That overlaps the native engine-less path of
this pull request, so the conflicts were reconciled as follows:

- A `CREATE TABLE` without `ENGINE` keeps going through the native path of this PR
  (`DatabaseDataLake::createTable`). The `getDefaultTableEngineName` hook that rewrote
  it into a zero-argument engine is removed (`IDatabase`, `InterpreterCreateQuery`,
  `InterpreterSetQuery`, `DatabaseDataLake`). The native path now also places the
  table under the namespace location reported by the catalog
  (`ICatalog::getDefaultTableLocation`, e.g. Glue `LocationUri`) when no
  `default_base_location` is known, before falling back to `storage_endpoint`.
- An explicit table engine without arguments keeps working as on `master`:
  `validateCreateTableEngine` only checks the engine family for it and leaves the
  location, the credentials and the storage backend to `getEngineArgsForNewTable`.
- `ICatalog::createNamespaceIfNotExists` takes only the namespace, as on `master`:
  the catalog assigns the namespace location itself.
- `ICatalog` keeps this PR's `createTable` (returns whether the table was created,
  takes the compression method and `if_not_exists`) and `dropTable` (`purge`,
  `if_exists`), plus `master`'s `getDefaultTableLocation`, `assignsLocationToNewNamespaces`,
  `writesInitialMetadata` and `removeSnapshots`.
- `IcebergMetadata::createInitial`: the catalog writes the first metadata file when it
  manages the location or `writesInitialMetadata` (as on `master`), the existence check
  in the catalog is kept, and the leftover-files check, the version-hint cleanup and the
  `createTable` conflict handling of this PR are kept.
- `RestCatalog::createTable` keeps this PR's `write-order` handling and `if_not_exists`
  and `master`'s forwarding of table properties and the `OneLake` idempotent re-registration.
- Two `master` Glue tests that expected `cannot tell where table` also for a
  `CREATE TABLE` without `ENGINE` now run only with the explicit engine: the native path
  places such a table under `storage_endpoint`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
alexey-milovidov added a commit to zvonand/ClickHouse that referenced this pull request Oct 8, 2026
… assigns

After merging `master` (ClickHouse#114477), a `CREATE TABLE` without `ENGINE` in a `DataLakeCatalog`
without `default_base_location` failed for an Iceberg REST catalog that does not report
its storage type, while `master` created it under the location the catalog assigns to the
namespace. The native path now does the same: when no base location is known, it asks the
catalog for the location of the namespace (registering the namespace first if the catalog
assigns locations to new namespaces), mapped through `storage_endpoint` the same way the
table is read back, and only then falls back to `storage_endpoint`.

`createNamespaceIfNotExists` no longer sends a namespace location (as on `master`), so the
tests that checked the location derived for the namespace are updated: the table is placed
under `default_base_location`, and the namespace location is whatever the catalog assigns.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
zvonand added a commit to zvonand/ClickHouse that referenced this pull request Oct 8, 2026
…th and without `ENGINE`

`CREATE TABLE` without `ENGINE` and with a table engine without arguments now both
take the location from `getNewTableLocation`: `default_base_location` (of the catalog
or the database), then the location the catalog reports for the namespace, then
`storage_endpoint`. Previously the engine without arguments ignored
`default_base_location` and failed instead of falling back to `storage_endpoint`.

A catalog that assigns table locations itself now rejects a table engine without
arguments as well, as it already did with arguments.

Related: ClickHouse#98670 (comment)
Related: ClickHouse#114477
@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