You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "gitmodimo (via GitHub)" <gi...@apache.org> on 2025/09/09 10:50:23 UTC
Re: [I] [C++][Python] Adding data to tdigest in pyarrow [arrow]
gitmodimo commented on issue #35508:
URL: https://github.com/apache/arrow/issues/35508#issuecomment-3270116720
Hello Everyone. I am willing to contribute in C++ part.
> 1. Currently it is only possible to compute one t-digest from a data array and return a given percentile. There doesn't seem to be an option to continuously 'add' data to the digest,...
I believe what you need can be achieved by introducing 3 additional functions.:
1. tdigest_map - functionally the same as tdigest but instead of quantiles outputs `centroids_vector` as fixed_size_list of length `delta` (with nullable values) each element would be struct{double mean; double weight}
2. tdigest_merge - function that takes vector of `centroids_vector`s and output merged `centroids_vector`
3. tdigest_guantile - function that takes `centroids_vector` and calculates quantiles as tdigest does
> 2\. Is it possible to alter the scale function used in the implementation? I'm not sure which scale function you have implemented but it would be nice to have some control over this!
This should be straight forward to allow selecting between ScalerK0/ScalerK1 implementation. Enabling custom scaler functions is way more complicated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org