Skip to content

Coalescing merge tree fix array - #102384

Merged
scanhex12 merged 3 commits into
ClickHouse:masterfrom
scanhex12:coalescing_merge_tree_fix_array_and_tuple
Apr 11, 2026
Merged

scanhex12 merged 3 commits into
ClickHouse:masterfrom
scanhex12:coalescing_merge_tree_fix_array_and_tuple

Conversation

@scanhex12

@scanhex12 scanhex12 commented Apr 10, 2026 •

Copy link
Copy Markdown
Member

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 into CHANGELOG.md):

Coalescing merge tree fix for array type. This closes #89509

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.4.1.829
  • Backported to: 26.3.7.9, 26.2.11.6, 26.1.8.36, 25.8.24.11

@scanhex12 scanhex12 added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Apr 10, 2026
@clickhouse-gh

clickhouse-gh Bot commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [28a8108]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_binary, flaky check) failure
03037_dynamic_merges_1_horizontal_compact_wide_tree FAIL cidb
03037_dynamic_merges_1_horizontal_compact_merge_tree FAIL cidb
Unit tests (msan) failure
FunctionsStress.stress failure cidb
AllTests failure cidb

AI Review

Summary

This PR fixes CoalescingMergeTree behavior for Array/Tuple columns when explicit columns are provided to aggregate. The change in SummingSortedAlgorithm::defineColumns now respects column_names_to_sum for these types, and the added stateless test covers both FINAL read and post-OPTIMIZE behavior. I did not find correctness, safety, concurrency, or performance issues in the diff.

ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
No large/binary files ✅
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Apr 10, 2026
@clickhouse-gh

clickhouse-gh Bot commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.00% 84.00% +0.00%
Functions 90.90% 90.90% +0.00%
Branches 76.50% 76.50% +0.00%

Changed lines: 81.82% (27/33) | lost baseline coverage: 6 line(s) · Uncovered code

Full report · Diff report

@Fgrtue Fgrtue self-assigned this Apr 10, 2026

@Fgrtue Fgrtue left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix repeats the pattern from SummingSortedAlgorithm.cpp:393-395, so it looks good to me.

@alexey-milovidov

Copy link
Copy Markdown
Member

Coalescing merge tree fix array. This closes #89509

The changelog entry should be better.

@scanhex12
scanhex12 enabled auto-merge April 11, 2026 07:01
@scanhex12
scanhex12 added this pull request to the merge queue Apr 11, 2026
Merged via the queue into ClickHouse:master with commit e50a4c0 Apr 11, 2026
161 of 164 checks passed
@scanhex12
scanhex12 deleted the coalescing_merge_tree_fix_array_and_tuple branch April 11, 2026 07:39
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Apr 11, 2026
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Apr 11, 2026
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Apr 11, 2026
clickhouse-gh Bot added a commit that referenced this pull request Apr 11, 2026
Backport #102384 to 26.1: Coalescing merge tree fix array
clickhouse-gh Bot added a commit that referenced this pull request Apr 11, 2026
Backport #102384 to 26.3: Coalescing merge tree fix array
clickhouse-gh Bot added a commit that referenced this pull request Apr 11, 2026
Backport #102384 to 26.2: Coalescing merge tree fix array
@scanhex12 scanhex12 added v25.12-must-backport and removed pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR labels Apr 13, 2026
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Apr 13, 2026
fm4v added a commit that referenced this pull request May 13, 2026
Backport #102384 to 25.8: Coalescing merge tree fix array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo v25.12-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arrays are cleared by CoalescingMergeTree with update-columns specified

7 participants