Skip to content

Change default auto_statistics_types from basic, uniq to basic, uniq_v2#110878

Merged
hanfei1991 merged 1 commit into
ClickHouse:masterfrom
hanfei1991:auto-statistics-uniq-v2
Jul 20, 2026
Merged

Change default auto_statistics_types from basic, uniq to basic, uniq_v2#110878
hanfei1991 merged 1 commit into
ClickHouse:masterfrom
hanfei1991:auto-statistics-uniq-v2

Conversation

@hanfei1991

@hanfei1991 hanfei1991 commented Jul 17, 2026

Copy link
Copy Markdown
Member

uniq_v2 has less overhead on inserts and memory compared to uniq.

Changelog category (leave one):

  • Improvement

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

Change default auto_statistics_types from basic, uniq to basic, uniq_v2

Version info

  • Merged into: 26.7.1.1220 (included in 26.7 and later)

…uniq_v2`

`uniq_v2` has less overhead on inserts and memory compared to `uniq`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@clickhouse-gh

clickhouse-gh Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ca38323]

Summary:

job_name test_name status info comment
AST fuzzer (amd_debug) FAIL
Received signal 8 (STID: 4141-5867) FAIL cidb

AI Review

Summary

This PR changes the default auto_statistics_types for new MergeTree tables from basic, uniq to basic, uniq_v2, and updates the 26.7 compatibility history entry to match. I did not find a concrete correctness bug in the switch itself, but the change is still missing focused regression coverage for the exact default/compatibility boundary, so I cannot approve it as-is.

Tests
  • ⚠️ Add a focused regression for the exact implicit statistics set, not just the absence of MinMax. Today the existing upgrade coverage would still pass if new tables kept materializing Uniq instead of uniq_v2, or if compatibility = '26.6' stopped restoring the old default. The smallest useful test is: create a table without an explicit auto_statistics_types, materialize statistics, and assert the exact implicit set under both the current defaults and compatibility = '26.6'.
Final Verdict

Status: ⚠️ Request changes

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Jul 17, 2026
Comment thread src/Core/SettingsChangesHistory.cpp
@clickhouse-gh

clickhouse-gh Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.00% 86.00% +0.00%
Functions 91.80% 91.80% +0.00%
Branches 78.10% 78.20% +0.10%

Changed lines: Changed C/C++ lines covered: 14/14 (100.00%) · Uncovered code

Full report · Diff report

@rschu1ze rschu1ze self-assigned this Jul 20, 2026
@hanfei1991
hanfei1991 added this pull request to the merge queue Jul 20, 2026
Merged via the queue into ClickHouse:master with commit ecc5edd Jul 20, 2026
176 of 178 checks passed
@hanfei1991
hanfei1991 deleted the auto-statistics-uniq-v2 branch July 20, 2026 14:12
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements 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