Skip to content

Antalya 26.3 Backport of #100404 - Fix bad cast exception when inserting into Iceberg table partitioned by year/month/day on Date column#1770

Merged
zvonand merged 1 commit into
antalya-26.3from
backports/antalya-26.3/100404
May 12, 2026
Merged

Antalya 26.3 Backport of #100404 - Fix bad cast exception when inserting into Iceberg table partitioned by year/month/day on Date column#1770
zvonand merged 1 commit into
antalya-26.3from
backports/antalya-26.3/100404

Conversation

@mkmkme
Copy link
Copy Markdown
Collaborator

@mkmkme mkmkme commented May 9, 2026

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fix logical error exception when inserting into an Iceberg table with a Date column partitioned by year, month, or day transforms (ClickHouse#100404 by @alexey-milovidov).

Documentation entry for user-facing changes

...

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)

…-partition-year

Fix bad cast exception when inserting into Iceberg table partitioned by year/month/day on Date column
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

Workflow [PR], commit [243ee36]

@alsugiliazova
Copy link
Copy Markdown
Member

Verification: PR #1770

Title: Antalya 26.3 Backport of ClickHouse#100404 — Fix bad cast exception when inserting into Iceberg table partitioned by year/month/day on Date column
Base: antalya-26.3backports/antalya-26.3/100404
Head: 243ee366eafc94bb3973b46990003dc4023bf8b8
Size: +69 / -3 across 4 files · State: OPEN · Mergeable

Changes

Production fix (2 files):

  • src/Storages/ObjectStorage/DataLakes/Iceberg/ChunkPartitioner.cpp — replaces the hard-coded DataTypeString result type with the real result_data_types[transform_ind] when executing the partition transform (root cause of the bad cast).
  • src/Storages/ObjectStorage/DataLakes/Iceberg/Utils.cpp — extends getAvroType() to also map UInt8, Int8, Int16 to the correct Avro type.

New tests (2 files):

PR-added tests — all GREEN

12 new parametrized cases × 3 integration jobs = 36 runs, 0 failures.

Job New tests run All status
Integration tests (amd_asan, db disk, old analyzer, 4/6) 12 OK
Integration tests (amd_binary, 5/5) 12 OK
Integration tests (arm_binary, distributed plan, 2/4) 12 OK

Coverage:

  • toYearNumSinceEpoch(d), toMonthNumSinceEpoch(d), toRelativeDayNum(d) (ClickHouse-side write) — all pass on s3 + local.
  • Spark-side PARTITIONED BY (year|month|day(c0)) then ClickHouse insert — all pass on s3 + local.

The new code path has clean positive coverage on all three architectures/builds.

CI overview (head commit)

  • PR test workflow: 0 test_status='FAIL' rows in DB. All real test runs are OK or SKIPPED. GH-level rollup is fully green for the PR test workflow.
  • Regression workflow: 27 success / 69 skipped / 4 failure (chronic baseline).
  • One pending action_required job (queue/auth, not a real failure).

Regression-workflow failures (chronic baseline on antalya-26.3)

Suite Fails Verdict
Swarms (Aarch64 + Release) 227 chronic baseline (initiator out of disk space, etc.)
Parquet (Aarch64 + Release) 34 chronic baseline
S3Export partition (Aarch64 + Release) 20 chronic baseline
S3Export part (Aarch64 + Release) 14 chronic baseline

Identical fingerprint to sibling antalya-26.3 PRs (1767, 1762, 1759, 1748, 1747, …). No new failure modes introduced.

Caveat — partial frontport

PR lands on antalya-26.3 while companion features from antalya-26.1 are still being frontported in parallel. Some regression suites still rely on settings/CLI args not yet wired in this base; a final re-verify is recommended once the rest of the frontport bundle lands.

Verdict

Safe to merge.

  • Newly added tests pass 100% (36/36 runs) across 3 integration jobs and all 6 parametrizations each.
  • No PR-caused regression at the test level.
  • All red checks are pre-existing chronic baseline failures shared with sibling antalya-26.3 PRs.

@alsugiliazova
Copy link
Copy Markdown
Member

Audit: PR #1770 — Antalya 26.3 Backport of #100404 — Fix bad cast exception when inserting into Iceberg table partitioned by year/month/day on Date column

AI audit note: This review comment was generated by AI (Cursor agent, audit-review skill).

Confirmed defects

No confirmed defects in reviewed scope.

@alsugiliazova alsugiliazova added the verified Approved for release label May 11, 2026
@zvonand zvonand merged commit 65f3464 into antalya-26.3 May 12, 2026
296 of 313 checks passed
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.

5 participants