v.25.10New Feature
Aggregate function quantilePrometheusHistogram, which accepts the upper
Aggregate functionquantilePrometheusHistogram, which accepts the upper bounds and cumulative values of histogram buckets as arguments, and performs a linear interpolation between the upper and lower bounds of the bucket in which the quantile position is found. Behaves similarly to the PromQLhistogram_quantilefunction on classic histograms. #86294 (Stephen Chi).
Why it matters
This feature provides a native ClickHouse function to compute quantiles from Prometheus-style histograms, addressing the need for accurate percentile estimation from cumulative histogram buckets. It simplifies analysis of Prometheus histogram metrics within ClickHouse by replicating PromQL's histogram_quantile behavior.How to use it
Use thequantilePrometheusHistogram aggregate function by passing it two arguments: the upper bounds of histogram buckets and the cumulative counts for those buckets. The function interpolates linearly between bucket bounds to compute the desired quantile.