Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangstar333 committed Sep 5, 2024
1 parent d87db38 commit 025bd78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions be/src/util/tdigest.h
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,9 @@ class TDigest {
// when complete, _unprocessed will be empty and _processed will have at most _max_processed centroids
void process() {
CentroidComparator cc;
// select percentile_approx(lo_orderkey,0.5) from lineorder;
// have test pdqsort and RadixSort, find here pdqsort performance is better when data is struct Centroid
// But when sort plain type like int/float of std::vector<T>, find RadixSort is better
pdqsort(_unprocessed.begin(), _unprocessed.end(), cc);
auto count = _unprocessed.size();
_unprocessed.insert(_unprocessed.end(), _processed.cbegin(), _processed.cend());
Expand Down

0 comments on commit 025bd78

Please sign in to comment.