Repository navigation
Conversation
|
Workflow [PR], commit [ed97981] Summary: ✅
AI ReviewSummaryAdds Final VerdictStatus: ✅ Approve. |
60cf3cb to
22bc344
Compare
22bc344 to
a4796a0
Compare
9f970cc to
089a07c
Compare
9244d04 to
d236827
Compare
Build profile diff (arm_release)Comparing Binary sizes
The official master build is compiled with Object file sizes
|
| Object file | Master | PR | Δ |
|---|---|---|---|
src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionHistogramExpl… |
new | 2.39 MiB | +2.39 MiB |
719 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.
Compile time of recompiled translation units
10 translation units recompiled, 24 s compile time in total, 9 of them have a recent master baseline.
Translation units without a recent master baseline:
src/AggregateFunctions/AggregateFunctionHistogramExplicit.cpp: 12.5 s
Symbol sizes
| Binary | Symbol | Master | PR | Δ |
|---|---|---|---|---|
programs/clickhouse |
DB::IAggregateFunction* DB::createWithNumericType<DB::(anonymous namespace)::AggregateFunctionHisto… |
new | 64.26 KiB | +64.26 KiB |
41f1124 to
71c7492
Compare
0ac7db9 to
ca20ce7
Compare
ec7d9fd to
d709679
Compare
Solution: Leave unchanged. is_window_function = true is required for correct NULL counting. Relaxing the strict isUInt8 check in AggregateFunctionCombinatorIf::transformArguments() would affect all aggregate functions, so this remains outside the scope of this change.
Solution: Add an opt-in virtual hook to IAggregateFunction (default: true), consulted in AggregateFunctionOrFill::insertResultIntoImpl(). When the hook reports no data, -OrNull returns NULL instead of delegating. This keeps the change additive and preserves existing behavior for other functions.
Solution: Override getNormalizedStateType() directly in AggregateFunctionOrFill.h. It requests the nested function's normalized state and wraps it back in AggregateFunctionOrFill, ensuring the state layout and type name match correctly. What do you think about this approach? |
a9f0103 to
fc5486c
Compare
fc5486c to
3872351
Compare
|
@clickhouse-bot add-label pr-autogenerated-docs |
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
|
@nikitamikhaylov |
8c5f6f8 to
d2938e6
Compare
Add docs and patch CombinatorsArgMinArgMax patch Decimal patch ArgMinArgMax and OrFill fixt style fix orFill fix UInt128/256 fix numbers patch numeric type and add tests patch roundMagnitudeToDouble fix arm_tidy fix double
fe21569 to
2379cf3
Compare
…ted job ClickHouse#122111 made the targeted stateless and integration jobs SKIP instead of ERROR when a test-selection CIDB request times out on every attempt (`CIDBTimeoutError`). The first selection read, the strict previously-failed lookup in `Targeting.get_previously_failed_tests_with_info`, re-wrapped any exception as a plain `RuntimeError`, so a timeout there lost its class before reaching either `except CIDBTimeoutError` handler and the shard still ERRORed ("Failed to load test selection" in the stateless job, an uncaught exception in the integration job). On a `pr-bugfix` PR that drops `Bugfix validation` and fails `Finish Workflow / Post Hooks`. Re-raise `CIDBTimeoutError` unchanged in strict mode. Every other failure (a refused connection, an answered non-OK response) stays wrapped and keeps failing the job, as ClickHouse#114730 intends. Best-effort mode is unchanged. CIDB shows 3 such errors, all on 2026-09-24/25 during the CIDB overload ClickHouse#122111 targets (PRs ClickHouse#118823, ClickHouse#117436, ClickHouse#114865). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Add
histogramExplicitandhistogramExplicitOpenClosedaggregate functions for histograms with user-defined bucket boundaries and optional counters for NULL, NaN, and zero values.Introducing histogramExplicit and histogramExplicitOpenClosed Aggregate Functions
Summary
This PR introduces the histogramExplicit and histogramExplicitOpenClosed aggregate functions for building histograms with fixed, user-defined bucket boundaries.
Unlike dynamic histogram functions, where bucket boundaries are derived from the input data, these functions keep the same boundaries across different datasets, time periods, or partitions. This makes them particularly useful for comparing distributions over time, including Data Drift Detection and metrics such as PSI, KL-divergence, and JS-divergence.
Features
Explicit bucket boundaries
Users provide the bucket boundaries directly:
Boundary normalization
Special value tracking
Optional flags allow NULL, NaN, and zero values to be tracked separately from the regular histogram buckets:
The result contains the histogram buckets followed by counters for the requested special values.
Use Cases
Data & Feature Drift Monitoring — consistent buckets for PSI, JS/KL divergence, and other distribution-comparison metrics.
SLA & Latency Percentile Tracking — predefined thresholds such as 50ms, 100ms, 500ms, and 1000ms.
Telemetry — consistent metric distributions across services, environments, or time periods.
Testing
Covered by C++ unit tests and stateless SQL tests:
'null','nan','zero'), and state merging across execution threadsFloat,Decimal, 64/128/256-bitIntegertypes, fractional rounding, and precision limitsWorkflow [PR]
Sync PR [sync-upstream/pr/118823]