Repository navigation
Add basic implementation of DROP PARTITION for Iceberg - #111219
Conversation
|
Workflow [PR], commit [a05f715] Summary: ✅
AI ReviewSummaryThis PR adds experimental Findings❌ Blockers
Final Verdict❌ Changes requested. The feature is close, but the current implementation still rejects some valid historical Iceberg tables and silently misses others when manifest partition values are not already in the exact ClickHouse LLVM Coverage ReportMeasured on commit a05f715.
Changed lines: Changed C/C++ lines covered: 458/555 (82.52%) · Uncovered code |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
DROP PARTITIONDROP PARTITION for Iceberg
|
📊 Cloud Performance Report ✅ AI verdict: This PR adds Iceberg ALTER DROP PARTITION support (new executor, snapshot-summary delta accounting, a failpoint, and an avro submodule bump) — it touches only data-lake write/metadata paths and does not modify the general query-execution hot path. None of the flagged ClickBench queries (13, 16, 18, 32) read Iceberg tables, so the observed +12–23% deltas cannot plausibly be caused by this change. All four sit inside master's current variance band (Q16 was also intrinsically noisy and Q32's measurements were noisy), so they are downgraded to not-sure as run-to-run variance rather than real regressions. clickbenchFlagged queries (4 of 43)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_official🟢 No significant changes Debug info
|
|
BTW: It seems that even this simple insert can produce mixed-partition manifest file in Trino: https://pastila.nl/?0261b2e1/2efeb43ffce4105a5b07c09763692bca#Q46e2iXOxgxYmlCqShSuOA==GCM, so it will be worth to support such case. @alesapin @scanhex12 FYI |
cfc2054 to
ee56b7c
Compare
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 311/433 (71.82%) · Uncovered code |
421bbf6 to
f224efa
Compare
fbfdc05 to
ca6871b
Compare
…s the Iceberg transforms `PARTITION BY` accepts `toYearNumSinceEpoch`, `toMonthNumSinceEpoch`, `toRelativeDayNum` and `toRelativeHourNum` as spellings of the Iceberg `year`/`month`/`day`/`hour` transforms, and since ClickHouse#118583 the partition values of those transforms are computed by `icebergYear`/`icebergMonth`/ `icebergDay`/`icebergHour` (UTC, negative before 1970). `ALTER TABLE ... DROP PARTITION tuple(...)` evaluated the user's expression as written, so the old spellings produced the ClickHouse function values (saturated to 0 before 1970, `toRelativeHourNum` offset by 24, local-time for a zoned value) and the operation removed the data files of a different partition. The alias list now lives in one helper, `normalizeIcebergTransformFunctionName`, used by `getPartitionField` (PARTITION BY), `parseFunction` (sort order) and `parsePartitionTuple` (DROP PARTITION, top-level function of each tuple element). The DROP PARTITION docs of the engine and the table function list the `iceberg*` functions and mention the aliases. Tests: a stateless test drops pre-1970 day/hour/month/year partitions and a zoned day value with the old spellings (and checks that the two-argument `toRelativeDayNum(x, tz)` is rejected); a Spark test reads a pre-1970 table with `<column> = <value>` filters for all four transforms, the shape reported in ClickHouse#119579, which no existing test covered for `hours`/`months`. Related: ClickHouse#119579, ClickHouse#118583, ClickHouse#111219 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Antalya 26.8 Backport of ClickHouse#111219: Add basic implementation of `DROP PARTITION` for Iceberg
This PR introduces support for ALTER DROP PARTITION on iceberg tables
icebergBucketand etcRelated: #105198
Related: #109288
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Adds experimental support for
ALTER TABLE ... DROP PARTITIONon standalone Iceberg tables. The operation currently requires Iceberg format-version 2 with a single non-evolved partition spec and does not support catalog-backed tables.Workflow [PR]
Sync PR [sync-upstream/pr/111219]
Version info
26.10.1.461-master(included in26.10and later)