Skip to content

Conversation

@mkmkme
Copy link
Collaborator

@mkmkme mkmkme commented Jan 21, 2026

This PR also backports ClickHouse#88406 to fix the flaky test added in the original PR

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):

Fixed two-level aggregation when using Merge over Distributed (ClickHouse#87687 by @c-end + ClickHouse#88406 by @azat).

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)
  • Tiered Storage (2h)

nickitat and others added 2 commits January 21, 2026 16:28
…merge-distributed

Fix two-level aggregation when using Merge over Distributed
…_merge_two_level_aggregation

tests: fix 03403_distributed_merge_two_level_aggregation flakiness
@github-actions
Copy link

github-actions bot commented Jan 21, 2026

Workflow [PR], commit [14076d5]

@mkmkme
Copy link
Collaborator Author

mkmkme commented Jan 22, 2026

The failed stateless tests are also related to enable_producing_buckets_out_of_order_in_aggregation. The old behaviour without that setting is not the same as with this setting enabled. To prove that, we can see the diff of the PR that introduced that setting: https://github.com/ClickHouse/ClickHouse/pull/80179/changes#diff-1806a5c1f13b491c615e887366acf1daac6d85b1528be423e3762705482c80fbR574

Otherwise the actual output of the test shows that the issue has been resolved, which is seen by the line GroupingAggregatedTransform 60 → 1 for ReadMergeTree which matches the upstream expected output and proves the pipeline is not being narrowed.

I'll update the .reference file to let the test pass, it's a matter of adding a new pass to it.

…uckets_out_of_order_in_aggregation

The test failed due to an extra step in actual pipeline output. It is
caused by a missing optimization
`enable_producing_buckets_out_of_order_in_aggregation` that was added to
upstream later and is not worth backporting at this point. The change
can be seen at [1].

[1]: https://github.com/ClickHouse/ClickHouse/pull/80179/changes#diff-1806a5c1f13b491c615e887366acf1daac6d85b1528be423e3762705482c80fbR574
Copy link
Collaborator

@arthurpassos arthurpassos left a comment

Choose a reason for hiding this comment

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

LGTM

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.

6 participants