Skip to content

feature (iceberg): Implement TRUNCATE TABLE for Iceberg Engine (REST …#1655

Open
il9ue wants to merge 1 commit intoantalya-26.3from
feature/iceberg-truncate-26.3
Open

feature (iceberg): Implement TRUNCATE TABLE for Iceberg Engine (REST …#1655
il9ue wants to merge 1 commit intoantalya-26.3from
feature/iceberg-truncate-26.3

Conversation

@il9ue
Copy link
Copy Markdown

@il9ue il9ue commented Apr 16, 2026

Changelog category (leave one):

  • New Feature

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

Frontport for Antalya 26.3

  • 26.1 Antalya port - Implement TRUNCATE TABLE for Iceberg Engine (REST catalog support) Feature: Support TRUNCATE TABLE for Iceberg engine #1529, It's a frontport from 26.1, contains:
    • feat(iceberg): Implement TRUNCATE TABLE for Iceberg Engine (REST catalog support) — Core implementation: metadata-only truncation generating a new overwrite snapshot with empty manifest list, committed atomically via REST catalog
    • fix(iceberg): pass new_snapshot to updateMetadata in IcebergStorageSink — Fixed silent breakage of all INSERTs on REST catalog tables (wrong JSON object passed to catalog->updateMetadata)
    • fix(iceberg): restore return false in RestCatalog::updateMetadata — Preserve retry contract; add LOG_WARNING for diagnostics
    • fix(iceberg): revert Mutations.cpp updateMetadata to pass new_snapshot — Same fix as IcebergStorageSink, applied to ALTER TABLE DELETE/UPDATE path
    • refactor(iceberg): add comment explaining Avro zigzag encoding — Reviewer-requested documentation for manual Avro OCF serialization
    • refactor(iceberg): address code review feedback on TRUNCATE implementation — Named zero arguments, helper functions, restart integration test

Adaptation notes for antalya-26.3

The following API changes between antalya-26.1 and antalya-26.3 required adaptation:

  • RestCatalog constructor signature updated to match antalya-26.3 calling convention in DataLakeConfiguration.h
  • DatabaseDataLakeSetting member names updated
  • Cargo.lock restored to antalya-26.3 version (our changes do not touch any Rust code)

All feature logic is identical to the merged antalya-26.1 implementation.

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All with Aarch64
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 16, 2026

Workflow [PR], commit [e229240]

…catalog support)

Forward-port of Iceberg TRUNCATE TABLE from antalya-26.1 to antalya-26.3.
Adapted to antalya-26.3 API changes in RestCatalog constructor,
DatabaseDataLakeSetting, and related interfaces.

See original implementation details in antalya-26.1 PR #1529.

Signed-off-by: Daniel Q. Kim <daniel.kim@altinity.com>
@il9ue il9ue force-pushed the feature/iceberg-truncate-26.3 branch from db43b6b to e229240 Compare April 16, 2026 08:42
@il9ue
Copy link
Copy Markdown
Author

il9ue commented Apr 16, 2026

On CI Failures & Asking a review

Flagging the CI failures for review. All observed failures are pre-existing and unrelated to the Iceberg TRUNCATE changes in this PR.

03706_statistics_preserve_checksums_on_mutations
MergeTree checksum mismatch in Statistics/mutations code path. The full stack trace contains no Iceberg frames. Pre-existing flaky test unrelated to this diff.

Docker CVEs (CVE-2026-28388, CVE-2026-28389, CVE-2026-28390, CVE-2026-31790, CVE-2026-40200)
Grype scan failures against the Alpine base image:

  • openssl 3.3.6-r0 — fixed in 3.3.7-r0 (CVEs 28388/28389/28390/31790)
  • musl 1.2.5-r9 — fixed in 1.2.5-r11 (CVE-2026-40200)

These require a base image update by the Docker/infra team and are unrelated to any C++ code changes in this PR. The same CVEs appear on the base antalya-26.3 branch independently of this PR.

This PR is a forward-port of the Iceberg TRUNCATE TABLE feature from antalya-26.1 (merged as PR #1529), adapted for antalya-26.3 API changes. All 19 integration tests pass including test_iceberg_truncate and test_iceberg_truncate_restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants