Skip to content

Support Iceberg DROP PARTITION in REST catalogs - #122269

Merged
Diskein merged 2 commits into
masterfrom
dk-iceberg-drop-partition-catalogs
Oct 9, 2026
Merged

Diskein merged 2 commits into
masterfrom
dk-iceberg-drop-partition-catalogs

Conversation

@Diskein

@Diskein Diskein commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Allow ALTER TABLE ... DROP PARTITION on Iceberg tables backed by Iceberg REST catalogs. Resolve the current metadata through the catalog and commit the new snapshot through its update API. Reject catalogs without metadata update support before writing files.

Changelog category (leave one):

  • New Feature

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

Support ALTER TABLE ... DROP PARTITION for Iceberg tables backed by Iceberg REST catalogs.


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

Version info

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

@clickhouse-gh

clickhouse-gh Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [71ffd2d]

Summary: ✅


AI Review

Summary

This PR extends Iceberg ALTER TABLE ... DROP PARTITION to catalog-backed tables by resolving the current metadata pointer through the catalog and committing the new snapshot through the catalog update API. After re-reading the current diff and the existing discussion threads, I do not see a remaining correctness, safety, or concurrency blocker in the implementation.

PR Metadata
  • Changelog category: New Feature is correct for the user-visible surface added here.
  • Changelog entry: required, but the current text is both too narrow and has a typo (bu → by). The implementation and docs now cover the REST-derived catalog family plus unity v2, not only plain rest catalogs.
  • Suggested replacement: Support ALTER TABLE ... DROP PARTITION for Iceberg tables in DataLakeCatalog databases using rest, onelake, biglake, delta_sharing, horizon, s3tables, or unity with use_unity_catalog_v2 = 1.
Final Verdict
  • Status: ✅ Approve

LLVM Coverage Report

Measured on commit 71ffd2d.

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

Changed lines: Changed C/C++ lines covered: 89/101 (88.12%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-feature Pull request with new product feature label Sep 25, 2026
@clickhouse-gh clickhouse-gh Bot added the comp-datalake Data lake table formats (Iceberg/Delta/Hudi) integration. label Sep 25, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 71ffd2d47 with master c20a83fc9 (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of 5de8a5f22; 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.

Compile time of recompiled translation units

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

Job report

Pass the catalog and the `StorageID` into `AlterDropPartitionExecutor`: the
snapshot state is read through the catalog, and the new metadata is committed
with `updateMetadata`. A transactional catalog writes the metadata file itself,
so the direct metadata write and the version hint are skipped for it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@Diskein
Diskein force-pushed the dk-iceberg-drop-partition-catalogs branch from 7babfe8 to 1b817a4 Compare October 5, 2026 17:14
@Diskein Diskein changed the title Support Iceberg DROP PARTITION with Glue and REST catalogs Support Iceberg DROP PARTITION in REST catalogs Oct 7, 2026
@Diskein
Diskein marked this pull request as ready for review October 7, 2026 10:36
@clickhouse-gh

clickhouse-gh Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

📊 Cloud Performance Report

✅ AI verdict: no_change — no significant changes across 31 queries analysed

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
  • StressHouse run: cb3e7984-0fae-4448-9ad4-99e311568249
  • MIRAI run: b132fc38-7436-4d6b-ad1d-a16b4f6a54a6
  • PR check IDs:
    • clickbench_523198_1791542611
    • clickbench_523204_1791542611
    • clickbench_523210_1791542611
    • tpch_adapted_1_official_523221_1791542611
    • tpch_adapted_1_official_523232_1791542611
    • tpch_adapted_1_official_523267_1791542611

@asya-ch asya-ch self-assigned this Oct 8, 2026
@Diskein
Diskein enabled auto-merge October 9, 2026 08:30
@Diskein
Diskein added this pull request to the merge queue Oct 9, 2026
Merged via the queue into master with commit 96b4775 Oct 9, 2026
152 checks passed
@Diskein
Diskein deleted the dk-iceberg-drop-partition-catalogs branch October 9, 2026 17:32
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 9, 2026
nihalzp pushed a commit to nihalzp/ClickHouse that referenced this pull request Oct 16, 2026
With parallel replicas usable for cluster engines, `DatabaseDataLake`
serves catalog tables through `StorageObjectStorageCluster`. ClickHouse#119214 made
that wrapper forward the catalog write and DDL entry points to the same
configuration and catalog that `StorageObjectStorage` uses, but not
`checkAlterPartitionIsPossible` / `alterPartition`. So
`ALTER TABLE <catalog table> DROP PARTITION` (ClickHouse#122269) reached the
`IStorage` defaults and failed with
`Table engine IcebergS3 doesn't support partitioning (NOT_IMPLEMENTED)`.

Forward both exactly as `StorageObjectStorage` does. Which partition
commands and catalogs are allowed stays decided by the data lake metadata,
so the result is the same as with parallel replicas off.

Closes ClickHouse#124988

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clickhouse-gh clickhouse-gh Bot added comp-iceberg Apache Iceberg tables: reading and writing Iceberg metadata (snapshots, manifests, schema evoluti... 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-iceberg Apache Iceberg tables: reading and writing Iceberg metadata (snapshots, manifests, schema evoluti... pr-feature Pull request with new product feature 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