Skip to content

CI fix: Make summation result independent of summation order + fix a typo - #100516

Merged
rschu1ze merged 2 commits into
masterfrom
this-is-the-last-bug-i-will-fix-today
Mar 24, 2026
Merged

rschu1ze merged 2 commits into
masterfrom
this-is-the-last-bug-i-will-fix-today

Conversation

@rschu1ze

@rschu1ze rschu1ze commented Mar 23, 2026 •

Copy link
Copy Markdown
Member

Fixes flaky PATH=$PATH:build/programs/ tests/clickhouse-test --test-runs 25 --settings "--max_threads 2 --optimize_arithmetic_operations_in_aggregate_functions False" 02931_rewrite_sum_column_and_constant

Seen [here](https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=99614&sha=latest&name_0=PR
#99614)

Closes #100602

Changelog category (leave one):

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

Version info

  • Merged into: 26.4.1.206

@clickhouse-gh

clickhouse-gh Bot commented Mar 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [8ebc340]


AI Review

Summary

This PR fixes a typo by renaming AggregateFunctionsArithmericOperationsPass to AggregateFunctionsArithmeticOperationsPass and stabilizes a flaky stateless test by switching float literals to exactly representable values (2.125) so results do not depend on summation order. I did not find correctness, safety, concurrency, compatibility, or performance regressions in the touched code.

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 ✅
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Mar 23, 2026
@rschu1ze rschu1ze changed the title Make summation result independent of summation order + fix a typo CI fix: Make summation result independent of summation order + fix a typo Mar 23, 2026
@clickhouse-gh

clickhouse-gh Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 83.90% 83.90% +0.00%
Functions 24.60% 24.50% -0.10%
Branches 76.50% 76.50% +0.00%

PR changed lines: PR changed-lines coverage: N/A (no coverable changed lines found in .info).
Diff coverage report
Uncovered code

EXPLAIN SYNTAX (SELECT 2.11 * count(uint64) + sum(uint64) From test_table);
EXPLAIN SYNTAX (SELECT sum(uint64) - 2.11 * count(uint64) From test_table);
EXPLAIN SYNTAX (SELECT 2.11 * count(uint64) - sum(uint64) From test_table);
SELECT sum(uint64 + 2.125) From test_table;

@rschu1ze rschu1ze Mar 24, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Applying the trick from l. 27 stabilized test results.

@@ -1,4 +1,4 @@
#include <Analyzer/Passes/AggregateFunctionsArithmericOperationsPass.h>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are still multiple places using Arithmeric beyond the file names. Can we fix them all, please?

@rschu1ze

Copy link
Copy Markdown
Member Author

Fascinating how such a typo could spread through the codebase.

@rschu1ze
rschu1ze added this pull request to the merge queue Mar 24, 2026
@rschu1ze

Copy link
Copy Markdown
Member Author

FastTest was green, in particular the build.

As the previous commit got green CI, let me merge to save some cycles.

Merged via the queue into master with commit 5493504 Mar 24, 2026
37 of 125 checks passed
@rschu1ze
rschu1ze deleted the this-is-the-last-bug-i-will-fix-today branch March 24, 2026 15:14
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Flaky test: 02931_rewrite_sum_column_and_constant

3 participants