imay commented on a change in pull request #1432: Add percentile_approx aggregate function URL: https://github.com/apache/incubator-doris/pull/1432#discussion_r301531431
########## File path: be/src/util/tdigest.h ########## @@ -0,0 +1,728 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// T-Digest : Percentile and Quantile Estimation of Big Data +// A new data structure for accurate on-line accumulation of rank-based statistics +// such as quantiles and trimmed means. +// See original paper: "Computing extremely accurate quantiles using t-digest" +// by Ted Dunning and Otmar Ertl for more details +// https://github.com/tdunning/t-digest/blob/07b8f2ca2be8d0a9f04df2feadad5ddc1bb73c88/docs/t-digest-paper/histo.pdf. +// https://github.com/derrickburns/tdigest + +#ifndef TDIGEST2_TDIGEST_H_ +#define TDIGEST2_TDIGEST_H_ + +#include <iostream> +#include <algorithm> +#include <cfloat> +#include <cmath> +#include <queue> +#include <utility> +#include <vector> +#include <memory> + +#include "common/logging.h" +#include "util/debug_util.h" +#include "udf/udf.h" + +namespace doris { + + using Value = double; Review comment: can you make this code's ident same with our style? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
