You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Iceberg DataLakeCatalog: ALTER DELETE fails with Metadata is not initialized (LOGICAL_ERROR) #2136
ALTER TABLE … DELETE against an Iceberg table accessed through DataLakeCatalog fails with:
Code: 49. DB::Exception: Metadata is not initialized. (LOGICAL_ERROR)
The same delete works against a path-based ENGINE = Iceberg(...) table. INSERT into the same DataLakeCatalog table works when allow_insert_into_iceberg = 1.
How to reproduce
Requires a REST Iceberg catalog (e.g. ice-rest-catalog) with an existing merge-on-read table, then:
SET allow_experimental_database_iceberg =1;
SET allow_insert_into_iceberg =1;
CREATEDATABASEdatalake_db
ENGINE = DataLakeCatalog('http://ice-rest-catalog:5000', 'minio_key', 'minio_secret')
SETTINGS
catalog_type ='rest',
storage_endpoint ='http://minio:9000/warehouse',
warehouse ='s3://bucket1/',
auth_header ='Authorization: Bearer foo';
-- Assume catalog table `ns.t` already exists (format-version 2, write.delete.mode = merge-on-read)-- and has been seeded with rows (id, data).-- SELECT / INSERT via catalog work; DELETE does not:ALTERTABLE datalake_db.`ns.t`DELETEWHERE id <=2;
Observed error:
Code: 49. DB::Exception: Metadata is not initialized. (LOGICAL_ERROR)
By contrast, the path-based engine succeeds:
CREATETABLEiceberg_path
ENGINE = Iceberg('http://minio:9000/warehouse/data/ns/t', 'minio_key', 'minio_secret');
SET allow_insert_into_iceberg =1;
ALTERTABLE iceberg_path DELETEWHERE id <=2; -- OK, writes position deletes
Observed on 26.3.13.20001.altinityantalya.
Expected behavior
With allow_insert_into_iceberg = 1, ALTER TABLE <datalake_db>.'ns.t' DELETE WHERE … should write Iceberg position deletes and commit through the catalog, same as ENGINE = Iceberg.
alter table ice.`flowers.sample` delete where value=1;
ALTER TABLE ice.`flowers.sample`
(DELETE WHERE value = 1)
Query id: 6b5adcf9-574f-4fe6-9983-a9b4ab01da55
Ok.
0 rows in set. Elapsed: 0.401 sec.
Activity
DimensionWieldr commentedon Jul 31, 2026
Same bug was already reported and fixed upstream:
supportsDeleteinDataLakeConfigurationthrowsLOGICAL_ERRORon freshly-attached data lake table with uninitialized metadata ClickHouse/ClickHouse#104891 — `supportsDelete` throws `Metadata is not initialized` (fixed by FixMetadata is not initializedonDELETE FROMfor data lakes ClickHouse/ClickHouse#104917; merged into `26.6.1.286`, backported to `26.5.3.12`, `26.4.5.13`)ALTER TABLEquery ClickHouse/ClickHouse#8602426.3.13.20001.altinityantalyastill hits the bug on DataLakeCatalogALTER DELETE(upstream fix is on 26.4+).subkanthi commentedon Aug 7, 2026
@DimensionWieldr tried this on #2157
DimensionWieldr commentedon Aug 21, 2026
Fixed by #2157 , version 26.6, no need to backport to older versions.