Skip to content

Backport #111617 to 26.3: Fix Iceberg trivial count bug - #118758

Closed
robot-ch-test-poll wants to merge 1 commit into
26.3from
backport/26.3/111617
Closed

robot-ch-test-poll wants to merge 1 commit into
26.3from
backport/26.3/111617

Conversation

@robot-ch-test-poll

Copy link
Copy Markdown
Contributor

Original pull-request #111617
Cherry-pick pull-request #118574

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

@robot-ch-test-poll robot-ch-test-poll added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default labels Sep 8, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [79a795a]

Summary: ❌

job_name test_name status info comment
Build (amd_debug) failure
Build ClickHouse failure cidb
Build (amd_asan) failure
Build ClickHouse failure cidb
Build (amd_tsan) failure
Build ClickHouse failure cidb
Build (amd_release) failure
Build ClickHouse failure cidb
Build (arm_release) failure
Build ClickHouse failure cidb
Build (amd_darwin) failure
Build ClickHouse failure cidb
Build (arm_darwin) failure
Build ClickHouse failure cidb
Docker server image dropped
Docker keeper image dropped
Install packages (amd_release) dropped

@PedroTadim PedroTadim self-assigned this Sep 8, 2026
@PedroTadim

Copy link
Copy Markdown
Member

Closing: #111617 cannot be cherry-picked to 26.3, and this automated backport does not build.

The generated backport is contaminated. It did not apply the PR's hunks on top of 26.3 — it largely took master's files. Compaction.cpp differs from 26.3 by 743 lines while the original PR changed it by 135, and the result is closer to master at the PR's merge commit (326 differing lines) than to its own base. Three separate consequences:

  • Compaction.cpp / IcebergWrites.{h,cpp} reference DataFileColumnStatistics and DataFileEntryLineage. Master defines both in IcebergWrites.h, and that definition never came across. This is the error CI reports.
  • Snapshot.h widened schema_id_on_snapshot_commit from Int32 to Int64. On master it was already Int64 and the PR only added a comment; on 26.3 the field feeds a std::pair<…, Int32> return, making this a narrowing conversion in list-initialisation — a second error, not reached because the compiler stopped at too many errors.
  • StorageObjectStorageSource.cpp picked up six unrelated lines declaring const bool headers_requested for the _headers virtual column, with nothing consuming it — an unused variable, a third error under -Werror.

More importantly, 26.3 predates the data model the fix is built on. ParsedManifestFileEntry::record_count does not exist on 26.3: it was added by #100645 on 2026-03-24, five days after the 26.3 branch point (2026-03-19). The core of #111617 is switching getRowsCountInAllFilesExcludingDeleted from best-effort per-column rows_count to the required file-level record_count, so it has nothing to compile against. The OPTIMIZE/lineage half additionally depends on #98178. 26.7 took this backport cleanly because it has both prerequisites; 26.3 has neither.

Restoring the prerequisite-dependent files to 26.3 and stripping the leaks does yield a buildable three-file change (IcebergMetadata.cpp, Snapshot.h, StorageObjectStorageSource.cpp), but it ships less than the PR — 26.3 would keep deriving counts from per-column rows_count — and tests 04614 / 04615, which assert record_count semantics, would have to be dropped. Backporting #100645 to restore record_count is not appropriate for a release branch: it bumps DBMS_CLUSTER_PROCESSING_PROTOCOL_VERSION 5→6.

If the corrupted-summary count() bug needs fixing on 26.3, it should be a purpose-written change against 26.3's data model rather than a cherry-pick of this PR.

@PedroTadim PedroTadim closed this Sep 8, 2026
thevar1able added a commit that referenced this pull request Sep 10, 2026
….3 backport

The test checks `count()` on an Iceberg table with equality deletes, which
depends on #111617 (Fix Iceberg
trivial count bug). That fix cannot be backported to 26.3, see
#118758, so the test fails there
while the code fix itself is unaffected.
@maxknv
maxknv deleted the backport/26.3/111617 branch November 13, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants