imay commented on a change in pull request #1939: Added: Add tdigest compression param for pencentile_approx function URL: https://github.com/apache/incubator-doris/pull/1939#discussion_r333871154
########## File path: be/src/exprs/aggregate_functions.cpp ########## @@ -234,19 +234,29 @@ void AggregateFunctions::avg_update(FunctionContext* ctx, const T& src, StringVa struct PercentileApproxState { public: - PercentileApproxState() : digest(new TDigest()){ - } + PercentileApproxState() : digest(new TDigest()) {} + PercentileApproxState(double compression) : digest(new TDigest(compression)) {} ~PercentileApproxState() { delete digest; } - + TDigest *digest = nullptr; double targetQuantile = -1.0; }; void AggregateFunctions::percentile_approx_init(FunctionContext* ctx, StringVal* dst) { dst->is_null = false; dst->len = sizeof(PercentileApproxState); + std::cout << ctx->get_num_args() << std::endl; Review comment: Remove this ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org