Repository navigation
Add basic statistics type - #106048
Add basic statistics type#106048
basic statistics type#106048Conversation
A compact, per-column bundle of single-value summaries: - numeric / temporal columns: min and max, used for range-filter selectivity and part pruning; - `String` / `FixedString` columns: total byte length of non-NULL values (i.e. average string length); - `Nullable` / `LowCardinality(Nullable)` columns: null count. A single `basic` declaration on e.g. `Nullable(UInt32)` populates all applicable summaries at once, instead of stacking separate stat types. `basic` is opt-in via `STATISTICS(basic)` or `ALTER ... ADD STATISTICS ... TYPE basic`; the default `auto_statistics_types` is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Workflow [PR], commit [bcdfe3a] Summary: ✅
AI ReviewSummaryThis PR adds Findings
Tests
Final VerdictStatus: Minimum required actions: fix the three remaining contract violations above, or narrow the |
|
Does it make sense to add the number of default values to |
|
@CurtizJ It makes sense. I can add it in the next PR |
1334971 to
d8de418
Compare
22a4492 to
8ccb76c
Compare
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 566/665 (85.11%) | Lost baseline coverage (was covered on master, now uncovered in this PR): 46 line(s) · Uncovered code |
| DECLARE(String, auto_statistics_types, "minmax, uniq", R"( | ||
| Comma-separated list of statistics types to calculate automatically on all suitable columns. | ||
| Supported statistics types: tdigest, countmin, minmax, uniq. | ||
| Supported statistics types: basic, tdigest, countmin, minmax, uniq. |
There was a problem hiding this comment.
@hanfei1991 When you are back, let's not forget about changing to basic, uniqCombined(12).
A compact, per-column bundle of single-value summaries:
String/FixedStringcolumns: total byte length of non-NULL values (i.e. average string length);Nullable/LowCardinality(Nullable)columns: null count.A single
basicdeclaration on e.g.Nullable(UInt32)populates all applicable summaries at once, instead of stacking separate stat types.basicis opt-in viaSTATISTICS(basic)orALTER ... ADD STATISTICS ... TYPE basic; the defaultauto_statistics_typesis unchanged.This PR re-applies #102356 and #103949
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Support basic statistics, a compact per-column statistic that stores numeric min/max, average string length, and NULL counts where applicable.
Version info
26.6.1.449