Skip to content

feat(tdigest): Add batch quantile queries - #275

Open
ryux1 wants to merge 1 commit into
apache:mainfrom
ryux1:ryux1/feat/tdigest-batch-quantiles
Open

feat(tdigest): Add batch quantile queries#275
ryux1 wants to merge 1 commit into
apache:mainfrom
ryux1:ryux1/feat/tdigest-batch-quantiles

Conversation

@ryux1

@ryux1 ryux1 commented Sep 6, 2026

Copy link
Copy Markdown

Summary

  • add TDigestMut::quantiles and TDigest::quantiles
  • reuse a forward-only centroid cursor for nondecreasing ranks
  • preserve caller order for arbitrary rank input by sorting indices
  • add validation, integration coverage, benchmarks, and changelog entries

This is the focused batch-query half requested after #261 was split. The implementation is derived from @tisonkun’s work in #261; the commit preserves that contribution with a Co-authored-by trailer. It intentionally excludes all owned batch-merge changes.

Closes #268.

Validation

  • cargo +nightly fmt --all --check
  • cargo x check
  • cargo x prepare-testdata
  • cargo x test
  • cargo x lint
  • cargo bench --package benchmarks --bench benchmarks -- tdigest::query::quantiles --sample-count 100

The local benchmark measured six sequential scalar queries at a 2.409 us median and the six-rank batch at a 297 ns median.

Co-authored-by: tison <wander4096@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add batch quantile queries to T-Digest

1 participant