Skip to content

Filter on the broken column in the Iceberg manifest bounds tests - #122895

Merged
Algunenano merged 1 commit into
ClickHouse:masterfrom
groeneai:groeneai-iceberg-bounds-tests-filter-broken-column
Sep 29, 2026
Merged

Algunenano merged 1 commit into
ClickHouse:masterfrom
groeneai:groeneai-iceberg-bounds-tests-filter-broken-column

Conversation

@groeneai

@groeneai groeneai commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #122681
Related: #122679
Related: #118364

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

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

...

Description

test_iceberg_narrow_manifest_bounds fails on every master run since #122679 restored its file, e.g. Integration tests (amd_msan, 8/8): the grep for the log line usable range border for column id 1 returns ''.

Root cause. #122681 made ManifestFileIterator::processRow decode the bounds of only the columns the filter uses. The test narrows the bound of n, then greps after a read filtered on s alone, which no longer decodes n. The CI of #122681 did not run this file: #122485 had removed it at the time.

The same change made all five of the module's checks that "a well-formed column in the same manifest entry keeps pruning" vacuous, the failing test's one included. Each filtered on the well-formed column alone, so the broken bound was never decoded and the check passed whatever the per-column fallback did.

Change. Test only. The five per-column checks now also filter on the broken column (e.g. s < '100010' AND n > 50000), so the read decodes the broken bound, and the expected counts are unchanged. The pruner keeps one KeyCondition per filter column, so the conjunction prunes exactly as the single-column filter did.

Validation (native pytest, debug build of a3c1801d277f). The old file fails with the CI assertion. The new one passes 60/60, including --count 10 and a distributed-plan session. Two mutants make a guard drop min/max pruning for the whole manifest entry instead of one column. Each reddens the new file at exactly the checks of its own guard (3 and 2 checks). The old file's checks at those sites pass on both mutants.

🤖 Generated with Claude Code


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

Version info

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

`test_iceberg_narrow_manifest_bounds` fails on every master run since
ClickHouse#122679 restored its file:
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=eb34e3144cb9f262e3b7dc8a6b49e0371dbac2d0&name_0=MasterCI&name_1=Integration%20tests%20%28amd_msan%2C%208%2F8%29

ClickHouse#122681 made `ManifestFileIterator::processRow` decode the bounds of only
the columns the filter uses (`getMinMaxColumnTypes`). The test narrows the
bound of `n` and then greps for the width guard's log line after a read
filtered on `s` alone, which no longer decodes `n`, so the grep returns
nothing. The CI of ClickHouse#122681 did not run this file, because ClickHouse#122485 had
removed it at the time.

The same change made the module's four other checks that a well-formed
column in the same manifest entry keeps pruning vacuous: each filtered on
the well-formed column alone, so the broken bound was never decoded and the
check passed whatever the per-column fallback did.

The five per-column checks now also filter on the broken column. The pruner
keeps one `KeyCondition` per filter column with only that column as key, so
the other column's atom is unknown and the conjunction prunes exactly as the
single-column filter did; the expected counts are unchanged.

Validated with two mutants that make the width guard or the inverted-pair
guard drop min/max pruning for the whole entry instead of one column: each
reddens the new file at exactly the checks of its own guard, while the old
file's checks at those sites stay green.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai groeneai added can be tested Allows running workflows for external contributors groeneai-origin-ci-master PR origin: master/nightly CI monitoring finding labels Sep 29, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 0 findings), plus my own cold review of the diff (0 findings). Nothing to adjudicate.

Session id: cron:clickhouse-review-slot-10:20260929-135600

@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. The pre-edit file fails at test_iceberg_inverted_manifest_bounds.py:337 with assert '' on every local run (3/3), the CI assertion.
b Root cause explained? #122681 decodes the bounds of only the filter's columns, so the s-only read before the grep never decodes the narrowed bound of n, and no log line is written.
c Fix matches root cause? Yes. Each per-column check filters on the broken column too, which restores its precondition; no bound widened, no setting pinned, no product change.
d Test intent preserved / new tests added? Strengthened: the five per-column fallback checks were vacuous since #122681 and can fail again; the log witness is kept.
e Both directions demonstrated? Old file fails and new file passes on the same binary; two entry-wide mutants redden the new file at exactly the checks of their own guard (3 and 2), and none of the old file's.
f Fix is general across code paths? All five per-column sites of the module, both guard branches; no other bounds module makes a cross-column claim.
g Fix generalizes across inputs (params/datatypes/wrappers)? Int64, Int32, String, Decimal(10,2), Decimal(9,1), fixed[3], local and S3 storage; 60/60 under random settings, incl. the distributed plan.
h Backward compatible? (maintainer-approved exception only) N/A: test-only.
i Invariants and contracts preserved? Same fixtures and counts; every call still asserts pruning-off and pruning-on return the same rows.

Session id: cron:clickhouse-impl-slot-7:20260929-132300

@clickhouse-gh

clickhouse-gh Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [9ac0927]

Summary: ✅


AI Review

Summary

This PR repairs five Iceberg manifest-bounds integration assertions that became vacuous once ManifestFileIterator started decoding min/max bounds only for columns referenced by the filter. Each updated predicate now references the malformed column as well, so the test still proves that pruning falls back per column instead of disabling min/max pruning for the whole manifest entry. I did not find correctness, coverage, or PR metadata issues in the current diff.

Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Sep 29, 2026
@groeneai
groeneai requested a review from arsenmuk September 29, 2026 14:31
@clickhouse-gh clickhouse-gh Bot added the comp-testing Test content only (no production code). label Sep 29, 2026
@Algunenano
Algunenano added this pull request to the merge queue Sep 29, 2026
Merged via the queue into ClickHouse:master with commit c41a8a1 Sep 29, 2026
149 checks passed
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 29, 2026
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 29, 2026
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 29, 2026
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 29, 2026
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 29, 2026
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 29, 2026
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 29, 2026
…-nested-const

Picks up ClickHouse#122895, which fixes test_iceberg_narrow_manifest_bounds on master.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 29, 2026
…rong-results

Picks up ClickHouse#122895, which fixes test_iceberg_narrow_manifest_bounds on master.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 29, 2026
harikrishnan94 added a commit that referenced this pull request Oct 1, 2026
`test_iceberg_narrow_manifest_bounds` failed in `Integration tests (amd_llvm_coverage, 1/8)` on
2eb21c1. The test failed on every `master` run from #122679 until #122895 fixed it. The CI run
of 2eb21c1 started before that fix was merged, so it tested a merge without it. A re-run tests
that same merge again, so only a new run can pick up the fix. This merge is clean and does not
change the diff of the pull request.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=120024&sha=2eb21c1bc9f02e703ede180dc854745e7b1bf68d&name_0=PR
Related: #122895

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kolsha added a commit that referenced this pull request Oct 1, 2026
Bring in #122895 so the integration test no longer fails on this branch.
@clickhouse-gh clickhouse-gh Bot added comp-iceberg Apache Iceberg tables: reading and writing Iceberg metadata (snapshots, manifests, schema evoluti... and removed comp-testing Test content only (no production code). labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-iceberg Apache Iceberg tables: reading and writing Iceberg metadata (snapshots, manifests, schema evoluti... groeneai-origin-ci-master PR origin: master/nightly CI monitoring finding pr-ci 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