Add NullCount statistics support for part pruning by zoomxi · Pull Request #104214 · ClickHouse/ClickHouse · GitHub
Skip to content

Add NullCount statistics support for part pruning#104214

Merged
hanfei1991 merged 6 commits into
ClickHouse:masterfrom
zoomxi:null_count_pruning
May 14, 2026
Merged

Add NullCount statistics support for part pruning#104214
hanfei1991 merged 6 commits into
ClickHouse:masterfrom
zoomxi:null_count_pruning

Conversation

@zoomxi

@zoomxi zoomxi commented May 6, 2026

Copy link
Copy Markdown
Contributor

Follow up #102356.

Changelog category (leave one):

  • New Feature

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

NullCount column statistics can now be used for part pruning. Queries with IS NULL or IS NOT NULL predicates on Nullable columns that have NullCount statistics can skip entire data parts where the statistics prove no matching rows exist.

Version info

  • Merged into: 26.5.1.658

@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label May 6, 2026
@clickhouse-gh

clickhouse-gh Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

@clickhouse-gh clickhouse-gh Bot added the pr-feature Pull request with new product feature label May 6, 2026
@zoomxi

zoomxi commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

@hanfei1991 CI is green now. Could you please take some time to review this PR when you're free? Thanks!

@hanfei1991 hanfei1991 self-assigned this May 8, 2026
Comment thread src/Storages/MergeTree/KeyCondition.h
Comment thread src/Storages/Statistics/StatisticsPartPruner.h
Comment thread tests/queries/0_stateless/04142_statistics_null_count_part_pruning.sql Outdated
Comment thread src/Storages/MergeTree/KeyCondition.cpp
@zoomxi

zoomxi commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

@clickhouse-gh

clickhouse-gh Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.10% 84.10% +0.00%
Functions 92.00% 92.00% +0.00%
Branches 76.50% 76.60% +0.10%

Changed lines: 94.81% (146/154) · Uncovered code

Full report · Diff report

@zoomxi

zoomxi commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

@hanfei1991 hanfei1991 added this pull request to the merge queue May 14, 2026
Merged via the queue into ClickHouse:master with commit 801397d May 14, 2026
165 of 167 checks passed
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 14, 2026
@zoomxi zoomxi deleted the null_count_pruning branch May 15, 2026 03:26
pull Bot pushed a commit to Spencerx/ClickHouse that referenced this pull request May 19, 2026
…runing"

This reverts commit 801397d, reversing
changes made to 0144a49.
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 pr-feature Pull request with new product feature 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.

4 participants