be/src/exprs/aggregate/aggregate_function_percentile.h
Line | Count | Source |
1 | | // Licensed to the Apache Software Foundation (ASF) under one |
2 | | // or more contributor license agreements. See the NOTICE file |
3 | | // distributed with this work for additional information |
4 | | // regarding copyright ownership. The ASF licenses this file |
5 | | // to you under the Apache License, Version 2.0 (the |
6 | | // "License"); you may not use this file except in compliance |
7 | | // with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, |
12 | | // software distributed under the License is distributed on an |
13 | | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | // KIND, either express or implied. See the License for the |
15 | | // specific language governing permissions and limitations |
16 | | // under the License. |
17 | | |
18 | | #pragma once |
19 | | |
20 | | #include <glog/logging.h> |
21 | | #include <stddef.h> |
22 | | #include <stdint.h> |
23 | | |
24 | | #include <boost/iterator/iterator_facade.hpp> |
25 | | #include <cmath> |
26 | | #include <cstdint> |
27 | | #include <memory> |
28 | | #include <string> |
29 | | #include <vector> |
30 | | |
31 | | #include "core/assert_cast.h" |
32 | | #include "core/column/column.h" |
33 | | #include "core/column/column_array.h" |
34 | | #include "core/column/column_nullable.h" |
35 | | #include "core/column/column_vector.h" |
36 | | #include "core/data_type/data_type_array.h" |
37 | | #include "core/data_type/data_type_nullable.h" |
38 | | #include "core/data_type/data_type_number.h" |
39 | | #include "core/pod_array.h" |
40 | | #include "core/pod_array_fwd.h" |
41 | | #include "core/types.h" |
42 | | #include "exprs/aggregate/aggregate_function.h" |
43 | | #include "util/percentile_util.h" |
44 | | #include "util/tdigest.h" |
45 | | |
46 | | namespace doris { |
47 | | |
48 | | class Arena; |
49 | | class BufferReadable; |
50 | | |
51 | | struct PercentileApproxState { |
52 | | static constexpr double INIT_QUANTILE = -1.0; |
53 | 1.09k | PercentileApproxState() = default; |
54 | 1.09k | ~PercentileApproxState() = default; |
55 | | |
56 | 885 | void init(double quantile, float compression = 10000) { |
57 | 885 | if (!init_flag) { |
58 | | //https://doris.apache.org/zh-CN/sql-reference/sql-functions/aggregate-functions/percentile_approx.html#description |
59 | | //The compression parameter setting range is [2048, 10000]. |
60 | | //If the value of compression parameter is not specified set, or is outside the range of [2048, 10000], |
61 | | //will use the default value of 10000 |
62 | 471 | if (compression < 2048 || compression > 10000) { |
63 | 0 | compression = 10000; |
64 | 0 | } |
65 | 471 | digest = TDigest::create_unique(compression); |
66 | 471 | check_quantile(quantile); |
67 | 471 | target_quantile = quantile; |
68 | 471 | compressions = compression; |
69 | 471 | init_flag = true; |
70 | 471 | } |
71 | 885 | } |
72 | | |
73 | 355 | void write(BufferWritable& buf) const { |
74 | 355 | buf.write_binary(init_flag); |
75 | 355 | if (!init_flag) { |
76 | 0 | return; |
77 | 0 | } |
78 | | |
79 | 355 | buf.write_binary(target_quantile); |
80 | 355 | buf.write_binary(compressions); |
81 | 355 | uint32_t serialize_size = digest->serialized_size(); |
82 | 355 | std::string result(serialize_size, '0'); |
83 | 355 | DCHECK(digest.get() != nullptr); |
84 | 355 | digest->serialize((uint8_t*)result.c_str()); |
85 | | |
86 | 355 | buf.write_binary(result); |
87 | 355 | } |
88 | | |
89 | 316 | void read(BufferReadable& buf) { |
90 | 316 | buf.read_binary(init_flag); |
91 | 316 | if (!init_flag) { |
92 | 0 | return; |
93 | 0 | } |
94 | | |
95 | 316 | buf.read_binary(target_quantile); |
96 | 316 | buf.read_binary(compressions); |
97 | 316 | std::string str; |
98 | 316 | buf.read_binary(str); |
99 | 316 | digest = TDigest::create_unique(compressions); |
100 | 316 | digest->unserialize((uint8_t*)str.c_str()); |
101 | 316 | } |
102 | | |
103 | 366 | double get() const { |
104 | 366 | if (init_flag) { |
105 | 364 | return digest->quantile(static_cast<float>(target_quantile)); |
106 | 364 | } else { |
107 | 2 | return std::nan(""); |
108 | 2 | } |
109 | 366 | } |
110 | | |
111 | 316 | void merge(const PercentileApproxState& rhs) { |
112 | 316 | if (!rhs.init_flag) { |
113 | 0 | return; |
114 | 0 | } |
115 | 316 | if (init_flag) { |
116 | 165 | DCHECK(digest.get() != nullptr); |
117 | 165 | digest->merge(rhs.digest.get()); |
118 | 165 | } else { |
119 | 151 | digest = TDigest::create_unique(compressions); |
120 | 151 | digest->merge(rhs.digest.get()); |
121 | 151 | init_flag = true; |
122 | 151 | } |
123 | 316 | if (target_quantile == PercentileApproxState::INIT_QUANTILE) { |
124 | 151 | target_quantile = rhs.target_quantile; |
125 | 151 | } |
126 | 316 | } |
127 | | |
128 | 742 | void add(double source) { digest->add(static_cast<float>(source)); } |
129 | | |
130 | 134 | void add_with_weight(double source, double weight) { |
131 | | // the weight should be positive num, as have check the value valid use DCHECK_GT(c._weight, 0); |
132 | 134 | if (weight <= 0) { |
133 | 10 | return; |
134 | 10 | } |
135 | 124 | digest->add(static_cast<float>(source), static_cast<float>(weight)); |
136 | 124 | } |
137 | | |
138 | 158 | void reset() { |
139 | 158 | target_quantile = INIT_QUANTILE; |
140 | 158 | init_flag = false; |
141 | 158 | digest = TDigest::create_unique(compressions); |
142 | 158 | } |
143 | | |
144 | | bool init_flag = false; |
145 | | std::unique_ptr<TDigest> digest; |
146 | | double target_quantile = INIT_QUANTILE; |
147 | | float compressions = 10000; |
148 | | }; |
149 | | |
150 | | template <typename Derived> |
151 | | class AggregateFunctionPercentileApproxBase |
152 | | : public IAggregateFunctionDataHelper<PercentileApproxState, Derived> { |
153 | | public: |
154 | | AggregateFunctionPercentileApproxBase(const DataTypes& argument_types_) |
155 | 839 | : IAggregateFunctionDataHelper<PercentileApproxState, Derived>(argument_types_) {}_ZN5doris37AggregateFunctionPercentileApproxBaseINS_42AggregateFunctionPercentileApproxTwoParamsEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 155 | 757 | : IAggregateFunctionDataHelper<PercentileApproxState, Derived>(argument_types_) {} |
_ZN5doris37AggregateFunctionPercentileApproxBaseINS_44AggregateFunctionPercentileApproxThreeParamsEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 155 | 37 | : IAggregateFunctionDataHelper<PercentileApproxState, Derived>(argument_types_) {} |
_ZN5doris37AggregateFunctionPercentileApproxBaseINS_52AggregateFunctionPercentileApproxWeightedThreeParamsEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 155 | 23 | : IAggregateFunctionDataHelper<PercentileApproxState, Derived>(argument_types_) {} |
_ZN5doris37AggregateFunctionPercentileApproxBaseINS_51AggregateFunctionPercentileApproxWeightedFourParamsEEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 155 | 22 | : IAggregateFunctionDataHelper<PercentileApproxState, Derived>(argument_types_) {} |
|
156 | | |
157 | 82 | String get_name() const override { return "percentile_approx"; }_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_42AggregateFunctionPercentileApproxTwoParamsEE8get_nameB5cxx11Ev Line | Count | Source | 157 | 55 | String get_name() const override { return "percentile_approx"; } |
_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_44AggregateFunctionPercentileApproxThreeParamsEE8get_nameB5cxx11Ev Line | Count | Source | 157 | 17 | String get_name() const override { return "percentile_approx"; } |
_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_52AggregateFunctionPercentileApproxWeightedThreeParamsEE8get_nameB5cxx11Ev Line | Count | Source | 157 | 10 | String get_name() const override { return "percentile_approx"; } |
Unexecuted instantiation: _ZNK5doris37AggregateFunctionPercentileApproxBaseINS_51AggregateFunctionPercentileApproxWeightedFourParamsEE8get_nameB5cxx11Ev |
158 | | |
159 | 158 | void reset(AggregateDataPtr __restrict place) const override { this->data(place).reset(); }_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_42AggregateFunctionPercentileApproxTwoParamsEE5resetEPc Line | Count | Source | 159 | 50 | void reset(AggregateDataPtr __restrict place) const override { this->data(place).reset(); } |
_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_44AggregateFunctionPercentileApproxThreeParamsEE5resetEPc Line | Count | Source | 159 | 105 | void reset(AggregateDataPtr __restrict place) const override { this->data(place).reset(); } |
_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_52AggregateFunctionPercentileApproxWeightedThreeParamsEE5resetEPc Line | Count | Source | 159 | 3 | void reset(AggregateDataPtr __restrict place) const override { this->data(place).reset(); } |
Unexecuted instantiation: _ZNK5doris37AggregateFunctionPercentileApproxBaseINS_51AggregateFunctionPercentileApproxWeightedFourParamsEE5resetEPc |
160 | | |
161 | | void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, |
162 | 316 | Arena&) const override { |
163 | 316 | this->data(place).merge(this->data(rhs)); |
164 | 316 | } _ZNK5doris37AggregateFunctionPercentileApproxBaseINS_42AggregateFunctionPercentileApproxTwoParamsEE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 162 | 222 | Arena&) const override { | 163 | 222 | this->data(place).merge(this->data(rhs)); | 164 | 222 | } |
_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_44AggregateFunctionPercentileApproxThreeParamsEE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 162 | 76 | Arena&) const override { | 163 | 76 | this->data(place).merge(this->data(rhs)); | 164 | 76 | } |
_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_52AggregateFunctionPercentileApproxWeightedThreeParamsEE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 162 | 8 | Arena&) const override { | 163 | 8 | this->data(place).merge(this->data(rhs)); | 164 | 8 | } |
_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_51AggregateFunctionPercentileApproxWeightedFourParamsEE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 162 | 10 | Arena&) const override { | 163 | 10 | this->data(place).merge(this->data(rhs)); | 164 | 10 | } |
|
165 | | |
166 | 355 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { |
167 | 355 | this->data(place).write(buf); |
168 | 355 | } _ZNK5doris37AggregateFunctionPercentileApproxBaseINS_42AggregateFunctionPercentileApproxTwoParamsEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 166 | 261 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 167 | 261 | this->data(place).write(buf); | 168 | 261 | } |
_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_44AggregateFunctionPercentileApproxThreeParamsEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 166 | 76 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 167 | 76 | this->data(place).write(buf); | 168 | 76 | } |
_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_52AggregateFunctionPercentileApproxWeightedThreeParamsEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 166 | 8 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 167 | 8 | this->data(place).write(buf); | 168 | 8 | } |
_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_51AggregateFunctionPercentileApproxWeightedFourParamsEE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 166 | 10 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 167 | 10 | this->data(place).write(buf); | 168 | 10 | } |
|
169 | | |
170 | | void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf, |
171 | 316 | Arena&) const override { |
172 | 316 | this->data(place).read(buf); |
173 | 316 | } _ZNK5doris37AggregateFunctionPercentileApproxBaseINS_42AggregateFunctionPercentileApproxTwoParamsEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 171 | 222 | Arena&) const override { | 172 | 222 | this->data(place).read(buf); | 173 | 222 | } |
_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_44AggregateFunctionPercentileApproxThreeParamsEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 171 | 76 | Arena&) const override { | 172 | 76 | this->data(place).read(buf); | 173 | 76 | } |
_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_52AggregateFunctionPercentileApproxWeightedThreeParamsEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 171 | 8 | Arena&) const override { | 172 | 8 | this->data(place).read(buf); | 173 | 8 | } |
_ZNK5doris37AggregateFunctionPercentileApproxBaseINS_51AggregateFunctionPercentileApproxWeightedFourParamsEE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 171 | 10 | Arena&) const override { | 172 | 10 | this->data(place).read(buf); | 173 | 10 | } |
|
174 | | }; |
175 | | |
176 | | class AggregateFunctionPercentileApproxTwoParams final |
177 | | : public AggregateFunctionPercentileApproxBase<AggregateFunctionPercentileApproxTwoParams>, |
178 | | public MultiExpression, |
179 | | public NullableAggregateFunction { |
180 | | public: |
181 | | AggregateFunctionPercentileApproxTwoParams(const DataTypes& argument_types_) |
182 | 757 | : AggregateFunctionPercentileApproxBase<AggregateFunctionPercentileApproxTwoParams>( |
183 | 757 | argument_types_) {} |
184 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
185 | 311 | Arena&) const override { |
186 | 311 | const auto& sources = |
187 | 311 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
188 | 311 | const auto& quantile = |
189 | 311 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
190 | 311 | this->data(place).init(quantile.get_element(0)); |
191 | 311 | this->data(place).add(sources.get_element(row_num)); |
192 | 311 | } |
193 | | |
194 | 128 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
195 | | |
196 | 104 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
197 | 104 | auto& col = assert_cast<ColumnFloat64&>(to); |
198 | 104 | col.get_data().push_back(this->data(place).get()); |
199 | 104 | } |
200 | | }; |
201 | | |
202 | | class AggregateFunctionPercentileApproxThreeParams final |
203 | | : public AggregateFunctionPercentileApproxBase< |
204 | | AggregateFunctionPercentileApproxThreeParams>, |
205 | | public MultiExpression, |
206 | | public NullableAggregateFunction { |
207 | | public: |
208 | | AggregateFunctionPercentileApproxThreeParams(const DataTypes& argument_types_) |
209 | 37 | : AggregateFunctionPercentileApproxBase<AggregateFunctionPercentileApproxThreeParams>( |
210 | 37 | argument_types_) {} |
211 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
212 | 440 | Arena&) const override { |
213 | 440 | const auto& sources = |
214 | 440 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
215 | 440 | const auto& quantile = |
216 | 440 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
217 | 440 | const auto& compression = |
218 | 440 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[2]); |
219 | | |
220 | 440 | this->data(place).init(quantile.get_element(0), |
221 | 440 | static_cast<float>(compression.get_element(0))); |
222 | 440 | this->data(place).add(sources.get_element(row_num)); |
223 | 440 | } |
224 | | |
225 | 74 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
226 | | |
227 | 225 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
228 | 225 | auto& col = assert_cast<ColumnFloat64&>(to); |
229 | 225 | col.get_data().push_back(this->data(place).get()); |
230 | 225 | } |
231 | | }; |
232 | | |
233 | | class AggregateFunctionPercentileApproxWeightedThreeParams final |
234 | | : public AggregateFunctionPercentileApproxBase< |
235 | | AggregateFunctionPercentileApproxWeightedThreeParams>, |
236 | | MultiExpression, |
237 | | NullableAggregateFunction { |
238 | | public: |
239 | | AggregateFunctionPercentileApproxWeightedThreeParams(const DataTypes& argument_types_) |
240 | 23 | : AggregateFunctionPercentileApproxBase< |
241 | 23 | AggregateFunctionPercentileApproxWeightedThreeParams>(argument_types_) {} |
242 | | |
243 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
244 | 54 | Arena&) const override { |
245 | 54 | const auto& sources = |
246 | 54 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
247 | 54 | const auto& weight = |
248 | 54 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
249 | 54 | const auto& quantile = |
250 | 54 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[2]); |
251 | | |
252 | 54 | this->data(place).init(quantile.get_element(0)); |
253 | 54 | this->data(place).add_with_weight(sources.get_element(row_num), |
254 | 54 | weight.get_element(row_num)); |
255 | 54 | } |
256 | | |
257 | 55 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
258 | | |
259 | 27 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
260 | 27 | auto& col = assert_cast<ColumnFloat64&>(to); |
261 | 27 | col.get_data().push_back(this->data(place).get()); |
262 | 27 | } |
263 | | }; |
264 | | |
265 | | class AggregateFunctionPercentileApproxWeightedFourParams final |
266 | | : public AggregateFunctionPercentileApproxBase< |
267 | | AggregateFunctionPercentileApproxWeightedFourParams>, |
268 | | MultiExpression, |
269 | | NullableAggregateFunction { |
270 | | public: |
271 | | AggregateFunctionPercentileApproxWeightedFourParams(const DataTypes& argument_types_) |
272 | 22 | : AggregateFunctionPercentileApproxBase< |
273 | 22 | AggregateFunctionPercentileApproxWeightedFourParams>(argument_types_) {} |
274 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
275 | 80 | Arena&) const override { |
276 | 80 | const auto& sources = |
277 | 80 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
278 | 80 | const auto& weight = |
279 | 80 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
280 | 80 | const auto& quantile = |
281 | 80 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[2]); |
282 | 80 | const auto& compression = |
283 | 80 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[3]); |
284 | | |
285 | 80 | this->data(place).init(quantile.get_element(0), |
286 | 80 | static_cast<float>(compression.get_element(0))); |
287 | 80 | this->data(place).add_with_weight(sources.get_element(row_num), |
288 | 80 | weight.get_element(row_num)); |
289 | 80 | } |
290 | | |
291 | 43 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
292 | | |
293 | 10 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
294 | 10 | auto& col = assert_cast<ColumnFloat64&>(to); |
295 | 10 | col.get_data().push_back(this->data(place).get()); |
296 | 10 | } |
297 | | }; |
298 | | |
299 | | template <PrimitiveType T> |
300 | | struct PercentileState { |
301 | | mutable std::vector<Counts<typename PrimitiveTypeTraits<T>::CppType>> vec_counts; |
302 | | std::vector<double> vec_quantile {-1}; |
303 | | bool inited_flag = false; |
304 | | |
305 | 393 | void write(BufferWritable& buf) const { |
306 | 393 | buf.write_binary(inited_flag); |
307 | 393 | if (!inited_flag) { |
308 | 8 | return; |
309 | 8 | } |
310 | 385 | int size_num = cast_set<int>(vec_quantile.size()); |
311 | 385 | buf.write_binary(size_num); |
312 | 689 | for (const auto& quantile : vec_quantile) { |
313 | 689 | buf.write_binary(quantile); |
314 | 689 | } |
315 | 689 | for (auto& counts : vec_counts) { |
316 | 689 | counts.serialize(buf); |
317 | 689 | } |
318 | 385 | } Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE3EE5writeERNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE4EE5writeERNS_14BufferWritableE _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE5EE5writeERNS_14BufferWritableE Line | Count | Source | 305 | 160 | void write(BufferWritable& buf) const { | 306 | 160 | buf.write_binary(inited_flag); | 307 | 160 | if (!inited_flag) { | 308 | 8 | return; | 309 | 8 | } | 310 | 152 | int size_num = cast_set<int>(vec_quantile.size()); | 311 | 152 | buf.write_binary(size_num); | 312 | 456 | for (const auto& quantile : vec_quantile) { | 313 | 456 | buf.write_binary(quantile); | 314 | 456 | } | 315 | 456 | for (auto& counts : vec_counts) { | 316 | 456 | counts.serialize(buf); | 317 | 456 | } | 318 | 152 | } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE6EE5writeERNS_14BufferWritableE Line | Count | Source | 305 | 233 | void write(BufferWritable& buf) const { | 306 | 233 | buf.write_binary(inited_flag); | 307 | 233 | if (!inited_flag) { | 308 | 0 | return; | 309 | 0 | } | 310 | 233 | int size_num = cast_set<int>(vec_quantile.size()); | 311 | 233 | buf.write_binary(size_num); | 312 | 233 | for (const auto& quantile : vec_quantile) { | 313 | 233 | buf.write_binary(quantile); | 314 | 233 | } | 315 | 233 | for (auto& counts : vec_counts) { | 316 | 233 | counts.serialize(buf); | 317 | 233 | } | 318 | 233 | } |
Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE7EE5writeERNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE8EE5writeERNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE9EE5writeERNS_14BufferWritableE |
319 | | |
320 | 354 | void read(BufferReadable& buf) { |
321 | 354 | buf.read_binary(inited_flag); |
322 | 354 | if (!inited_flag) { |
323 | 8 | return; |
324 | 8 | } |
325 | 346 | int size_num = 0; |
326 | 346 | buf.read_binary(size_num); |
327 | 346 | double data = 0.0; |
328 | 346 | vec_quantile.clear(); |
329 | 917 | for (int i = 0; i < size_num; ++i) { |
330 | 571 | buf.read_binary(data); |
331 | 571 | vec_quantile.emplace_back(data); |
332 | 571 | } |
333 | 346 | vec_counts.clear(); |
334 | 346 | vec_counts.resize(size_num); |
335 | 918 | for (int i = 0; i < size_num; ++i) { |
336 | 572 | vec_counts[i].unserialize(buf); |
337 | 572 | } |
338 | 346 | } Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE3EE4readERNS_14BufferReadableE Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE4EE4readERNS_14BufferReadableE _ZN5doris15PercentileStateILNS_13PrimitiveTypeE5EE4readERNS_14BufferReadableE Line | Count | Source | 320 | 121 | void read(BufferReadable& buf) { | 321 | 121 | buf.read_binary(inited_flag); | 322 | 121 | if (!inited_flag) { | 323 | 8 | return; | 324 | 8 | } | 325 | 113 | int size_num = 0; | 326 | 113 | buf.read_binary(size_num); | 327 | 113 | double data = 0.0; | 328 | 113 | vec_quantile.clear(); | 329 | 451 | for (int i = 0; i < size_num; ++i) { | 330 | 338 | buf.read_binary(data); | 331 | 338 | vec_quantile.emplace_back(data); | 332 | 338 | } | 333 | 113 | vec_counts.clear(); | 334 | 113 | vec_counts.resize(size_num); | 335 | 452 | for (int i = 0; i < size_num; ++i) { | 336 | 339 | vec_counts[i].unserialize(buf); | 337 | 339 | } | 338 | 113 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE6EE4readERNS_14BufferReadableE Line | Count | Source | 320 | 233 | void read(BufferReadable& buf) { | 321 | 233 | buf.read_binary(inited_flag); | 322 | 233 | if (!inited_flag) { | 323 | 0 | return; | 324 | 0 | } | 325 | 233 | int size_num = 0; | 326 | 233 | buf.read_binary(size_num); | 327 | 233 | double data = 0.0; | 328 | 233 | vec_quantile.clear(); | 329 | 466 | for (int i = 0; i < size_num; ++i) { | 330 | 233 | buf.read_binary(data); | 331 | 233 | vec_quantile.emplace_back(data); | 332 | 233 | } | 333 | 233 | vec_counts.clear(); | 334 | 233 | vec_counts.resize(size_num); | 335 | 466 | for (int i = 0; i < size_num; ++i) { | 336 | 233 | vec_counts[i].unserialize(buf); | 337 | 233 | } | 338 | 233 | } |
Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE7EE4readERNS_14BufferReadableE Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE8EE4readERNS_14BufferReadableE Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE9EE4readERNS_14BufferReadableE |
339 | | |
340 | | void add(typename PrimitiveTypeTraits<T>::CppType source, |
341 | 222 | const PaddedPODArray<Float64>& quantiles, const NullMap& null_maps, int64_t arg_size) { |
342 | 222 | if (!inited_flag) { |
343 | 222 | vec_counts.resize(arg_size); |
344 | 222 | vec_quantile.resize(arg_size, -1); |
345 | 222 | inited_flag = true; |
346 | 644 | for (int i = 0; i < arg_size; ++i) { |
347 | | // throw Exception func call percentile_array(id, [1,0,null]) |
348 | 422 | if (null_maps[i]) { |
349 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, |
350 | 0 | "quantiles in func percentile_array should not have null"); |
351 | 0 | } |
352 | 422 | check_quantile(quantiles[i]); |
353 | 422 | vec_quantile[i] = quantiles[i]; |
354 | 422 | } |
355 | 222 | } |
356 | 644 | for (int i = 0; i < arg_size; ++i) { |
357 | 422 | vec_counts[i].increment(source); |
358 | 422 | } |
359 | 222 | } Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE3EE3addEaRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE4EE3addEsRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl _ZN5doris15PercentileStateILNS_13PrimitiveTypeE5EE3addEiRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl Line | Count | Source | 341 | 100 | const PaddedPODArray<Float64>& quantiles, const NullMap& null_maps, int64_t arg_size) { | 342 | 100 | if (!inited_flag) { | 343 | 100 | vec_counts.resize(arg_size); | 344 | 100 | vec_quantile.resize(arg_size, -1); | 345 | 100 | inited_flag = true; | 346 | 400 | for (int i = 0; i < arg_size; ++i) { | 347 | | // throw Exception func call percentile_array(id, [1,0,null]) | 348 | 300 | if (null_maps[i]) { | 349 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 350 | 0 | "quantiles in func percentile_array should not have null"); | 351 | 0 | } | 352 | 300 | check_quantile(quantiles[i]); | 353 | 300 | vec_quantile[i] = quantiles[i]; | 354 | 300 | } | 355 | 100 | } | 356 | 400 | for (int i = 0; i < arg_size; ++i) { | 357 | 300 | vec_counts[i].increment(source); | 358 | 300 | } | 359 | 100 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE6EE3addElRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl Line | Count | Source | 341 | 122 | const PaddedPODArray<Float64>& quantiles, const NullMap& null_maps, int64_t arg_size) { | 342 | 122 | if (!inited_flag) { | 343 | 122 | vec_counts.resize(arg_size); | 344 | 122 | vec_quantile.resize(arg_size, -1); | 345 | 122 | inited_flag = true; | 346 | 244 | for (int i = 0; i < arg_size; ++i) { | 347 | | // throw Exception func call percentile_array(id, [1,0,null]) | 348 | 122 | if (null_maps[i]) { | 349 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 350 | 0 | "quantiles in func percentile_array should not have null"); | 351 | 0 | } | 352 | 122 | check_quantile(quantiles[i]); | 353 | 122 | vec_quantile[i] = quantiles[i]; | 354 | 122 | } | 355 | 122 | } | 356 | 244 | for (int i = 0; i < arg_size; ++i) { | 357 | 122 | vec_counts[i].increment(source); | 358 | 122 | } | 359 | 122 | } |
Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE7EE3addEnRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE8EE3addEfRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE9EE3addEdRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl |
360 | | |
361 | | void add_batch(const PaddedPODArray<typename PrimitiveTypeTraits<T>::CppType>& source, |
362 | 0 | const Float64& q) { |
363 | 0 | if (!inited_flag) { |
364 | 0 | inited_flag = true; |
365 | 0 | vec_counts.resize(1); |
366 | 0 | vec_quantile.resize(1); |
367 | 0 | check_quantile(q); |
368 | 0 | vec_quantile[0] = q; |
369 | 0 | } |
370 | 0 | vec_counts[0].increment_batch(source); |
371 | 0 | } Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE3EE9add_batchERKNS_8PODArrayIaLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE4EE9add_batchERKNS_8PODArrayIsLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE5EE9add_batchERKNS_8PODArrayIiLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE6EE9add_batchERKNS_8PODArrayIlLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE7EE9add_batchERKNS_8PODArrayInLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE8EE9add_batchERKNS_8PODArrayIfLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE9EE9add_batchERKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd |
372 | | |
373 | 354 | void merge(const PercentileState& rhs) { |
374 | 354 | if (!rhs.inited_flag) { |
375 | 8 | return; |
376 | 8 | } |
377 | 346 | int size_num = cast_set<int>(rhs.vec_quantile.size()); |
378 | 346 | if (!inited_flag) { |
379 | 187 | vec_counts.resize(size_num); |
380 | 187 | vec_quantile.resize(size_num, -1); |
381 | 187 | inited_flag = true; |
382 | 187 | } |
383 | | |
384 | 918 | for (int i = 0; i < size_num; ++i) { |
385 | 572 | if (vec_quantile[i] == -1.0) { |
386 | 291 | vec_quantile[i] = rhs.vec_quantile[i]; |
387 | 291 | } |
388 | 572 | vec_counts[i].merge(&(rhs.vec_counts[i])); |
389 | 572 | } |
390 | 346 | } Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE3EE5mergeERKS2_ Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE4EE5mergeERKS2_ _ZN5doris15PercentileStateILNS_13PrimitiveTypeE5EE5mergeERKS2_ Line | Count | Source | 373 | 121 | void merge(const PercentileState& rhs) { | 374 | 121 | if (!rhs.inited_flag) { | 375 | 8 | return; | 376 | 8 | } | 377 | 113 | int size_num = cast_set<int>(rhs.vec_quantile.size()); | 378 | 113 | if (!inited_flag) { | 379 | 52 | vec_counts.resize(size_num); | 380 | 52 | vec_quantile.resize(size_num, -1); | 381 | 52 | inited_flag = true; | 382 | 52 | } | 383 | | | 384 | 452 | for (int i = 0; i < size_num; ++i) { | 385 | 339 | if (vec_quantile[i] == -1.0) { | 386 | 156 | vec_quantile[i] = rhs.vec_quantile[i]; | 387 | 156 | } | 388 | 339 | vec_counts[i].merge(&(rhs.vec_counts[i])); | 389 | 339 | } | 390 | 113 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE6EE5mergeERKS2_ Line | Count | Source | 373 | 233 | void merge(const PercentileState& rhs) { | 374 | 233 | if (!rhs.inited_flag) { | 375 | 0 | return; | 376 | 0 | } | 377 | 233 | int size_num = cast_set<int>(rhs.vec_quantile.size()); | 378 | 233 | if (!inited_flag) { | 379 | 135 | vec_counts.resize(size_num); | 380 | 135 | vec_quantile.resize(size_num, -1); | 381 | 135 | inited_flag = true; | 382 | 135 | } | 383 | | | 384 | 466 | for (int i = 0; i < size_num; ++i) { | 385 | 233 | if (vec_quantile[i] == -1.0) { | 386 | 135 | vec_quantile[i] = rhs.vec_quantile[i]; | 387 | 135 | } | 388 | 233 | vec_counts[i].merge(&(rhs.vec_counts[i])); | 389 | 233 | } | 390 | 233 | } |
Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE7EE5mergeERKS2_ Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE8EE5mergeERKS2_ Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE9EE5mergeERKS2_ |
391 | | |
392 | 107 | void reset() { |
393 | 107 | vec_counts.clear(); |
394 | 107 | vec_quantile.clear(); |
395 | 107 | inited_flag = false; |
396 | 107 | } Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE3EE5resetEv Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE4EE5resetEv _ZN5doris15PercentileStateILNS_13PrimitiveTypeE5EE5resetEv Line | Count | Source | 392 | 26 | void reset() { | 393 | 26 | vec_counts.clear(); | 394 | 26 | vec_quantile.clear(); | 395 | 26 | inited_flag = false; | 396 | 26 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE6EE5resetEv Line | Count | Source | 392 | 81 | void reset() { | 393 | 81 | vec_counts.clear(); | 394 | 81 | vec_quantile.clear(); | 395 | 81 | inited_flag = false; | 396 | 81 | } |
Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE7EE5resetEv Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE8EE5resetEv Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE9EE5resetEv |
397 | | |
398 | 24 | double get() const { return vec_counts.empty() ? 0 : vec_counts[0].terminate(vec_quantile[0]); }Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE3EE3getEv Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE4EE3getEv Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE5EE3getEv _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE6EE3getEv Line | Count | Source | 398 | 24 | double get() const { return vec_counts.empty() ? 0 : vec_counts[0].terminate(vec_quantile[0]); } |
Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE7EE3getEv Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE8EE3getEv Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE9EE3getEv |
399 | | |
400 | 0 | void insert_result_into(IColumn& to) const { |
401 | 0 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); |
402 | 0 | for (int i = 0; i < vec_counts.size(); ++i) { |
403 | 0 | column_data.push_back(vec_counts[i].terminate(vec_quantile[i])); |
404 | 0 | } |
405 | 0 | } Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE3EE18insert_result_intoERNS_7IColumnE Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE4EE18insert_result_intoERNS_7IColumnE Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE5EE18insert_result_intoERNS_7IColumnE Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE6EE18insert_result_intoERNS_7IColumnE Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE7EE18insert_result_intoERNS_7IColumnE Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE8EE18insert_result_intoERNS_7IColumnE Unexecuted instantiation: _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE9EE18insert_result_intoERNS_7IColumnE |
406 | | }; |
407 | | |
408 | | template <PrimitiveType T> |
409 | | struct PercentileExactState { |
410 | | using ValueType = typename PrimitiveTypeTraits<T>::CppType; |
411 | | static constexpr size_t bytes_in_arena = 64 - sizeof(PODArray<ValueType>); |
412 | | using Array = PODArrayWithStackMemory<ValueType, bytes_in_arena>; |
413 | | |
414 | 828 | void add_single_range(const ValueType* data, size_t count, double quantile) { |
415 | 828 | if (!inited_flag) { |
416 | 323 | _set_single_level(quantile); |
417 | 323 | inited_flag = true; |
418 | 323 | } |
419 | 828 | _append(data, count); |
420 | 828 | } _ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE3EE16add_single_rangeEPKamd Line | Count | Source | 414 | 31 | void add_single_range(const ValueType* data, size_t count, double quantile) { | 415 | 31 | if (!inited_flag) { | 416 | 6 | _set_single_level(quantile); | 417 | 6 | inited_flag = true; | 418 | 6 | } | 419 | 31 | _append(data, count); | 420 | 31 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE4EE16add_single_rangeEPKsmd Line | Count | Source | 414 | 311 | void add_single_range(const ValueType* data, size_t count, double quantile) { | 415 | 311 | if (!inited_flag) { | 416 | 100 | _set_single_level(quantile); | 417 | 100 | inited_flag = true; | 418 | 100 | } | 419 | 311 | _append(data, count); | 420 | 311 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE5EE16add_single_rangeEPKimd Line | Count | Source | 414 | 231 | void add_single_range(const ValueType* data, size_t count, double quantile) { | 415 | 231 | if (!inited_flag) { | 416 | 63 | _set_single_level(quantile); | 417 | 63 | inited_flag = true; | 418 | 63 | } | 419 | 231 | _append(data, count); | 420 | 231 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE6EE16add_single_rangeEPKlmd Line | Count | Source | 414 | 197 | void add_single_range(const ValueType* data, size_t count, double quantile) { | 415 | 197 | if (!inited_flag) { | 416 | 121 | _set_single_level(quantile); | 417 | 121 | inited_flag = true; | 418 | 121 | } | 419 | 197 | _append(data, count); | 420 | 197 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE7EE16add_single_rangeEPKnmd Line | Count | Source | 414 | 3 | void add_single_range(const ValueType* data, size_t count, double quantile) { | 415 | 3 | if (!inited_flag) { | 416 | 2 | _set_single_level(quantile); | 417 | 2 | inited_flag = true; | 418 | 2 | } | 419 | 3 | _append(data, count); | 420 | 3 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE8EE16add_single_rangeEPKfmd Line | Count | Source | 414 | 6 | void add_single_range(const ValueType* data, size_t count, double quantile) { | 415 | 6 | if (!inited_flag) { | 416 | 3 | _set_single_level(quantile); | 417 | 3 | inited_flag = true; | 418 | 3 | } | 419 | 6 | _append(data, count); | 420 | 6 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE9EE16add_single_rangeEPKdmd Line | Count | Source | 414 | 49 | void add_single_range(const ValueType* data, size_t count, double quantile) { | 415 | 49 | if (!inited_flag) { | 416 | 28 | _set_single_level(quantile); | 417 | 28 | inited_flag = true; | 418 | 28 | } | 419 | 49 | _append(data, count); | 420 | 49 | } |
|
421 | | |
422 | | void add_many_range(const ValueType* data, size_t count, |
423 | | const PaddedPODArray<Float64>& quantiles_data, const NullMap& null_maps, |
424 | 670 | size_t start, int64_t arg_size) { |
425 | 670 | if (!inited_flag) { |
426 | 293 | _set_many_levels(quantiles_data, null_maps, start, arg_size); |
427 | 293 | inited_flag = true; |
428 | 293 | } |
429 | 670 | if (levels.empty()) { |
430 | 0 | return; |
431 | 0 | } |
432 | 670 | _append(data, count); |
433 | 670 | } _ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE3EE14add_many_rangeEPKamRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS5_IhLm4096ES8_Lm16ELm15EEEml Line | Count | Source | 424 | 15 | size_t start, int64_t arg_size) { | 425 | 15 | if (!inited_flag) { | 426 | 12 | _set_many_levels(quantiles_data, null_maps, start, arg_size); | 427 | 12 | inited_flag = true; | 428 | 12 | } | 429 | 15 | if (levels.empty()) { | 430 | 0 | return; | 431 | 0 | } | 432 | 15 | _append(data, count); | 433 | 15 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE4EE14add_many_rangeEPKsmRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS5_IhLm4096ES8_Lm16ELm15EEEml Line | Count | Source | 424 | 30 | size_t start, int64_t arg_size) { | 425 | 30 | if (!inited_flag) { | 426 | 15 | _set_many_levels(quantiles_data, null_maps, start, arg_size); | 427 | 15 | inited_flag = true; | 428 | 15 | } | 429 | 30 | if (levels.empty()) { | 430 | 0 | return; | 431 | 0 | } | 432 | 30 | _append(data, count); | 433 | 30 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE5EE14add_many_rangeEPKimRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS5_IhLm4096ES8_Lm16ELm15EEEml Line | Count | Source | 424 | 485 | size_t start, int64_t arg_size) { | 425 | 485 | if (!inited_flag) { | 426 | 191 | _set_many_levels(quantiles_data, null_maps, start, arg_size); | 427 | 191 | inited_flag = true; | 428 | 191 | } | 429 | 485 | if (levels.empty()) { | 430 | 0 | return; | 431 | 0 | } | 432 | 485 | _append(data, count); | 433 | 485 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE6EE14add_many_rangeEPKlmRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS5_IhLm4096ES8_Lm16ELm15EEEml Line | Count | Source | 424 | 33 | size_t start, int64_t arg_size) { | 425 | 33 | if (!inited_flag) { | 426 | 16 | _set_many_levels(quantiles_data, null_maps, start, arg_size); | 427 | 16 | inited_flag = true; | 428 | 16 | } | 429 | 33 | if (levels.empty()) { | 430 | 0 | return; | 431 | 0 | } | 432 | 33 | _append(data, count); | 433 | 33 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE7EE14add_many_rangeEPKnmRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS5_IhLm4096ES8_Lm16ELm15EEEml Line | Count | Source | 424 | 15 | size_t start, int64_t arg_size) { | 425 | 15 | if (!inited_flag) { | 426 | 12 | _set_many_levels(quantiles_data, null_maps, start, arg_size); | 427 | 12 | inited_flag = true; | 428 | 12 | } | 429 | 15 | if (levels.empty()) { | 430 | 0 | return; | 431 | 0 | } | 432 | 15 | _append(data, count); | 433 | 15 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE8EE14add_many_rangeEPKfmRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS5_IhLm4096ES8_Lm16ELm15EEEml Line | Count | Source | 424 | 3 | size_t start, int64_t arg_size) { | 425 | 3 | if (!inited_flag) { | 426 | 2 | _set_many_levels(quantiles_data, null_maps, start, arg_size); | 427 | 2 | inited_flag = true; | 428 | 2 | } | 429 | 3 | if (levels.empty()) { | 430 | 0 | return; | 431 | 0 | } | 432 | 3 | _append(data, count); | 433 | 3 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE9EE14add_many_rangeEPKdmRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS5_IhLm4096ES8_Lm16ELm15EEEml Line | Count | Source | 424 | 89 | size_t start, int64_t arg_size) { | 425 | 89 | if (!inited_flag) { | 426 | 45 | _set_many_levels(quantiles_data, null_maps, start, arg_size); | 427 | 45 | inited_flag = true; | 428 | 45 | } | 429 | 89 | if (levels.empty()) { | 430 | 0 | return; | 431 | 0 | } | 432 | 89 | _append(data, count); | 433 | 89 | } |
|
434 | | |
435 | 367 | void write(BufferWritable& buf) const { |
436 | 367 | buf.write_binary(inited_flag); |
437 | 367 | if (!inited_flag) { |
438 | 2 | return; |
439 | 2 | } |
440 | | |
441 | 365 | levels.write(buf); |
442 | 365 | size_t size = values.size(); |
443 | 365 | buf.write_binary(size); |
444 | 365 | if (size > 0) { |
445 | 363 | buf.write(reinterpret_cast<const char*>(values.data()), sizeof(ValueType) * size); |
446 | 363 | } |
447 | 365 | } _ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE3EE5writeERNS_14BufferWritableE Line | Count | Source | 435 | 4 | void write(BufferWritable& buf) const { | 436 | 4 | buf.write_binary(inited_flag); | 437 | 4 | if (!inited_flag) { | 438 | 0 | return; | 439 | 0 | } | 440 | | | 441 | 4 | levels.write(buf); | 442 | 4 | size_t size = values.size(); | 443 | 4 | buf.write_binary(size); | 444 | 4 | if (size > 0) { | 445 | 4 | buf.write(reinterpret_cast<const char*>(values.data()), sizeof(ValueType) * size); | 446 | 4 | } | 447 | 4 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE4EE5writeERNS_14BufferWritableE Line | Count | Source | 435 | 8 | void write(BufferWritable& buf) const { | 436 | 8 | buf.write_binary(inited_flag); | 437 | 8 | if (!inited_flag) { | 438 | 1 | return; | 439 | 1 | } | 440 | | | 441 | 7 | levels.write(buf); | 442 | 7 | size_t size = values.size(); | 443 | 7 | buf.write_binary(size); | 444 | 7 | if (size > 0) { | 445 | 7 | buf.write(reinterpret_cast<const char*>(values.data()), sizeof(ValueType) * size); | 446 | 7 | } | 447 | 7 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE5EE5writeERNS_14BufferWritableE Line | Count | Source | 435 | 198 | void write(BufferWritable& buf) const { | 436 | 198 | buf.write_binary(inited_flag); | 437 | 198 | if (!inited_flag) { | 438 | 1 | return; | 439 | 1 | } | 440 | | | 441 | 197 | levels.write(buf); | 442 | 197 | size_t size = values.size(); | 443 | 197 | buf.write_binary(size); | 444 | 197 | if (size > 0) { | 445 | 197 | buf.write(reinterpret_cast<const char*>(values.data()), sizeof(ValueType) * size); | 446 | 197 | } | 447 | 197 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE6EE5writeERNS_14BufferWritableE Line | Count | Source | 435 | 102 | void write(BufferWritable& buf) const { | 436 | 102 | buf.write_binary(inited_flag); | 437 | 102 | if (!inited_flag) { | 438 | 0 | return; | 439 | 0 | } | 440 | | | 441 | 102 | levels.write(buf); | 442 | 102 | size_t size = values.size(); | 443 | 102 | buf.write_binary(size); | 444 | 102 | if (size > 0) { | 445 | 102 | buf.write(reinterpret_cast<const char*>(values.data()), sizeof(ValueType) * size); | 446 | 102 | } | 447 | 102 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE7EE5writeERNS_14BufferWritableE Line | Count | Source | 435 | 4 | void write(BufferWritable& buf) const { | 436 | 4 | buf.write_binary(inited_flag); | 437 | 4 | if (!inited_flag) { | 438 | 0 | return; | 439 | 0 | } | 440 | | | 441 | 4 | levels.write(buf); | 442 | 4 | size_t size = values.size(); | 443 | 4 | buf.write_binary(size); | 444 | 4 | if (size > 0) { | 445 | 4 | buf.write(reinterpret_cast<const char*>(values.data()), sizeof(ValueType) * size); | 446 | 4 | } | 447 | 4 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE8EE5writeERNS_14BufferWritableE Line | Count | Source | 435 | 5 | void write(BufferWritable& buf) const { | 436 | 5 | buf.write_binary(inited_flag); | 437 | 5 | if (!inited_flag) { | 438 | 0 | return; | 439 | 0 | } | 440 | | | 441 | 5 | levels.write(buf); | 442 | 5 | size_t size = values.size(); | 443 | 5 | buf.write_binary(size); | 444 | 5 | if (size > 0) { | 445 | 5 | buf.write(reinterpret_cast<const char*>(values.data()), sizeof(ValueType) * size); | 446 | 5 | } | 447 | 5 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE9EE5writeERNS_14BufferWritableE Line | Count | Source | 435 | 46 | void write(BufferWritable& buf) const { | 436 | 46 | buf.write_binary(inited_flag); | 437 | 46 | if (!inited_flag) { | 438 | 0 | return; | 439 | 0 | } | 440 | | | 441 | 46 | levels.write(buf); | 442 | 46 | size_t size = values.size(); | 443 | 46 | buf.write_binary(size); | 444 | 46 | if (size > 0) { | 445 | 44 | buf.write(reinterpret_cast<const char*>(values.data()), sizeof(ValueType) * size); | 446 | 44 | } | 447 | 46 | } |
|
448 | | |
449 | 367 | void read(BufferReadable& buf) { |
450 | 367 | reset(); |
451 | 367 | buf.read_binary(inited_flag); |
452 | 367 | if (!inited_flag) { |
453 | 2 | return; |
454 | 2 | } |
455 | | |
456 | 365 | levels.read(buf); |
457 | 365 | size_t size = 0; |
458 | 365 | buf.read_binary(size); |
459 | 365 | values.resize(size); |
460 | 365 | if (size > 0) { |
461 | 363 | auto raw = buf.read(sizeof(ValueType) * size); |
462 | 363 | memcpy(values.data(), raw.data, raw.size); |
463 | 363 | } |
464 | 365 | } _ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE3EE4readERNS_14BufferReadableE Line | Count | Source | 449 | 4 | void read(BufferReadable& buf) { | 450 | 4 | reset(); | 451 | 4 | buf.read_binary(inited_flag); | 452 | 4 | if (!inited_flag) { | 453 | 0 | return; | 454 | 0 | } | 455 | | | 456 | 4 | levels.read(buf); | 457 | 4 | size_t size = 0; | 458 | 4 | buf.read_binary(size); | 459 | 4 | values.resize(size); | 460 | 4 | if (size > 0) { | 461 | 4 | auto raw = buf.read(sizeof(ValueType) * size); | 462 | 4 | memcpy(values.data(), raw.data, raw.size); | 463 | 4 | } | 464 | 4 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE4EE4readERNS_14BufferReadableE Line | Count | Source | 449 | 8 | void read(BufferReadable& buf) { | 450 | 8 | reset(); | 451 | 8 | buf.read_binary(inited_flag); | 452 | 8 | if (!inited_flag) { | 453 | 1 | return; | 454 | 1 | } | 455 | | | 456 | 7 | levels.read(buf); | 457 | 7 | size_t size = 0; | 458 | 7 | buf.read_binary(size); | 459 | 7 | values.resize(size); | 460 | 7 | if (size > 0) { | 461 | 7 | auto raw = buf.read(sizeof(ValueType) * size); | 462 | 7 | memcpy(values.data(), raw.data, raw.size); | 463 | 7 | } | 464 | 7 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE5EE4readERNS_14BufferReadableE Line | Count | Source | 449 | 198 | void read(BufferReadable& buf) { | 450 | 198 | reset(); | 451 | 198 | buf.read_binary(inited_flag); | 452 | 198 | if (!inited_flag) { | 453 | 1 | return; | 454 | 1 | } | 455 | | | 456 | 197 | levels.read(buf); | 457 | 197 | size_t size = 0; | 458 | 197 | buf.read_binary(size); | 459 | 197 | values.resize(size); | 460 | 197 | if (size > 0) { | 461 | 197 | auto raw = buf.read(sizeof(ValueType) * size); | 462 | 197 | memcpy(values.data(), raw.data, raw.size); | 463 | 197 | } | 464 | 197 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE6EE4readERNS_14BufferReadableE Line | Count | Source | 449 | 102 | void read(BufferReadable& buf) { | 450 | 102 | reset(); | 451 | 102 | buf.read_binary(inited_flag); | 452 | 102 | if (!inited_flag) { | 453 | 0 | return; | 454 | 0 | } | 455 | | | 456 | 102 | levels.read(buf); | 457 | 102 | size_t size = 0; | 458 | 102 | buf.read_binary(size); | 459 | 102 | values.resize(size); | 460 | 102 | if (size > 0) { | 461 | 102 | auto raw = buf.read(sizeof(ValueType) * size); | 462 | 102 | memcpy(values.data(), raw.data, raw.size); | 463 | 102 | } | 464 | 102 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE7EE4readERNS_14BufferReadableE Line | Count | Source | 449 | 4 | void read(BufferReadable& buf) { | 450 | 4 | reset(); | 451 | 4 | buf.read_binary(inited_flag); | 452 | 4 | if (!inited_flag) { | 453 | 0 | return; | 454 | 0 | } | 455 | | | 456 | 4 | levels.read(buf); | 457 | 4 | size_t size = 0; | 458 | 4 | buf.read_binary(size); | 459 | 4 | values.resize(size); | 460 | 4 | if (size > 0) { | 461 | 4 | auto raw = buf.read(sizeof(ValueType) * size); | 462 | 4 | memcpy(values.data(), raw.data, raw.size); | 463 | 4 | } | 464 | 4 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE8EE4readERNS_14BufferReadableE Line | Count | Source | 449 | 5 | void read(BufferReadable& buf) { | 450 | 5 | reset(); | 451 | 5 | buf.read_binary(inited_flag); | 452 | 5 | if (!inited_flag) { | 453 | 0 | return; | 454 | 0 | } | 455 | | | 456 | 5 | levels.read(buf); | 457 | 5 | size_t size = 0; | 458 | 5 | buf.read_binary(size); | 459 | 5 | values.resize(size); | 460 | 5 | if (size > 0) { | 461 | 5 | auto raw = buf.read(sizeof(ValueType) * size); | 462 | 5 | memcpy(values.data(), raw.data, raw.size); | 463 | 5 | } | 464 | 5 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE9EE4readERNS_14BufferReadableE Line | Count | Source | 449 | 46 | void read(BufferReadable& buf) { | 450 | 46 | reset(); | 451 | 46 | buf.read_binary(inited_flag); | 452 | 46 | if (!inited_flag) { | 453 | 0 | return; | 454 | 0 | } | 455 | | | 456 | 46 | levels.read(buf); | 457 | 46 | size_t size = 0; | 458 | 46 | buf.read_binary(size); | 459 | 46 | values.resize(size); | 460 | 46 | if (size > 0) { | 461 | 44 | auto raw = buf.read(sizeof(ValueType) * size); | 462 | 44 | memcpy(values.data(), raw.data, raw.size); | 463 | 44 | } | 464 | 46 | } |
|
465 | | |
466 | 367 | void merge(const PercentileExactState& rhs) { |
467 | 367 | if (!rhs.inited_flag) { |
468 | 2 | return; |
469 | 2 | } |
470 | | |
471 | 365 | if (!inited_flag) { |
472 | 251 | levels = rhs.levels; |
473 | 251 | inited_flag = true; |
474 | 251 | } else { |
475 | 114 | levels.merge(rhs.levels); |
476 | 114 | } |
477 | 365 | _append(rhs.values.data(), rhs.values.size()); |
478 | 365 | } _ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE3EE5mergeERKS2_ Line | Count | Source | 466 | 4 | void merge(const PercentileExactState& rhs) { | 467 | 4 | if (!rhs.inited_flag) { | 468 | 0 | return; | 469 | 0 | } | 470 | | | 471 | 4 | if (!inited_flag) { | 472 | 2 | levels = rhs.levels; | 473 | 2 | inited_flag = true; | 474 | 2 | } else { | 475 | 2 | levels.merge(rhs.levels); | 476 | 2 | } | 477 | 4 | _append(rhs.values.data(), rhs.values.size()); | 478 | 4 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE4EE5mergeERKS2_ Line | Count | Source | 466 | 8 | void merge(const PercentileExactState& rhs) { | 467 | 8 | if (!rhs.inited_flag) { | 468 | 1 | return; | 469 | 1 | } | 470 | | | 471 | 7 | if (!inited_flag) { | 472 | 3 | levels = rhs.levels; | 473 | 3 | inited_flag = true; | 474 | 4 | } else { | 475 | 4 | levels.merge(rhs.levels); | 476 | 4 | } | 477 | 7 | _append(rhs.values.data(), rhs.values.size()); | 478 | 7 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE5EE5mergeERKS2_ Line | Count | Source | 466 | 198 | void merge(const PercentileExactState& rhs) { | 467 | 198 | if (!rhs.inited_flag) { | 468 | 1 | return; | 469 | 1 | } | 470 | | | 471 | 197 | if (!inited_flag) { | 472 | 166 | levels = rhs.levels; | 473 | 166 | inited_flag = true; | 474 | 166 | } else { | 475 | 31 | levels.merge(rhs.levels); | 476 | 31 | } | 477 | 197 | _append(rhs.values.data(), rhs.values.size()); | 478 | 197 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE6EE5mergeERKS2_ Line | Count | Source | 466 | 102 | void merge(const PercentileExactState& rhs) { | 467 | 102 | if (!rhs.inited_flag) { | 468 | 0 | return; | 469 | 0 | } | 470 | | | 471 | 102 | if (!inited_flag) { | 472 | 46 | levels = rhs.levels; | 473 | 46 | inited_flag = true; | 474 | 56 | } else { | 475 | 56 | levels.merge(rhs.levels); | 476 | 56 | } | 477 | 102 | _append(rhs.values.data(), rhs.values.size()); | 478 | 102 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE7EE5mergeERKS2_ Line | Count | Source | 466 | 4 | void merge(const PercentileExactState& rhs) { | 467 | 4 | if (!rhs.inited_flag) { | 468 | 0 | return; | 469 | 0 | } | 470 | | | 471 | 4 | if (!inited_flag) { | 472 | 2 | levels = rhs.levels; | 473 | 2 | inited_flag = true; | 474 | 2 | } else { | 475 | 2 | levels.merge(rhs.levels); | 476 | 2 | } | 477 | 4 | _append(rhs.values.data(), rhs.values.size()); | 478 | 4 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE8EE5mergeERKS2_ Line | Count | Source | 466 | 5 | void merge(const PercentileExactState& rhs) { | 467 | 5 | if (!rhs.inited_flag) { | 468 | 0 | return; | 469 | 0 | } | 470 | | | 471 | 5 | if (!inited_flag) { | 472 | 3 | levels = rhs.levels; | 473 | 3 | inited_flag = true; | 474 | 3 | } else { | 475 | 2 | levels.merge(rhs.levels); | 476 | 2 | } | 477 | 5 | _append(rhs.values.data(), rhs.values.size()); | 478 | 5 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE9EE5mergeERKS2_ Line | Count | Source | 466 | 46 | void merge(const PercentileExactState& rhs) { | 467 | 46 | if (!rhs.inited_flag) { | 468 | 0 | return; | 469 | 0 | } | 470 | | | 471 | 46 | if (!inited_flag) { | 472 | 29 | levels = rhs.levels; | 473 | 29 | inited_flag = true; | 474 | 29 | } else { | 475 | 17 | levels.merge(rhs.levels); | 476 | 17 | } | 477 | 46 | _append(rhs.values.data(), rhs.values.size()); | 478 | 46 | } |
|
479 | | |
480 | 487 | void reset() { |
481 | 487 | values.clear(); |
482 | 487 | levels.clear(); |
483 | 487 | inited_flag = false; |
484 | 487 | } _ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE3EE5resetEv Line | Count | Source | 480 | 4 | void reset() { | 481 | 4 | values.clear(); | 482 | 4 | levels.clear(); | 483 | 4 | inited_flag = false; | 484 | 4 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE4EE5resetEv Line | Count | Source | 480 | 113 | void reset() { | 481 | 113 | values.clear(); | 482 | 113 | levels.clear(); | 483 | 113 | inited_flag = false; | 484 | 113 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE5EE5resetEv Line | Count | Source | 480 | 207 | void reset() { | 481 | 207 | values.clear(); | 482 | 207 | levels.clear(); | 483 | 207 | inited_flag = false; | 484 | 207 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE6EE5resetEv Line | Count | Source | 480 | 102 | void reset() { | 481 | 102 | values.clear(); | 482 | 102 | levels.clear(); | 483 | 102 | inited_flag = false; | 484 | 102 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE7EE5resetEv Line | Count | Source | 480 | 4 | void reset() { | 481 | 4 | values.clear(); | 482 | 4 | levels.clear(); | 483 | 4 | inited_flag = false; | 484 | 4 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE8EE5resetEv Line | Count | Source | 480 | 5 | void reset() { | 481 | 5 | values.clear(); | 482 | 5 | levels.clear(); | 483 | 5 | inited_flag = false; | 484 | 5 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE9EE5resetEv Line | Count | Source | 480 | 52 | void reset() { | 481 | 52 | values.clear(); | 482 | 52 | levels.clear(); | 483 | 52 | inited_flag = false; | 484 | 52 | } |
|
485 | | |
486 | 366 | double get() const { |
487 | 366 | if (!inited_flag || levels.empty() || values.empty()) { |
488 | 3 | return std::numeric_limits<double>::quiet_NaN(); |
489 | 3 | } |
490 | | |
491 | 366 | DCHECK_EQ(levels.quantiles.size(), 1); |
492 | 363 | return _get_result(levels.quantiles[0]); |
493 | 366 | } _ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE3EE3getEv Line | Count | Source | 486 | 30 | double get() const { | 487 | 30 | if (!inited_flag || levels.empty() || values.empty()) { | 488 | 1 | return std::numeric_limits<double>::quiet_NaN(); | 489 | 1 | } | 490 | | | 491 | 30 | DCHECK_EQ(levels.quantiles.size(), 1); | 492 | 29 | return _get_result(levels.quantiles[0]); | 493 | 30 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE4EE3getEv Line | Count | Source | 486 | 177 | double get() const { | 487 | 177 | if (!inited_flag || levels.empty() || values.empty()) { | 488 | 0 | return std::numeric_limits<double>::quiet_NaN(); | 489 | 0 | } | 490 | | | 491 | 177 | DCHECK_EQ(levels.quantiles.size(), 1); | 492 | 177 | return _get_result(levels.quantiles[0]); | 493 | 177 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE5EE3getEv Line | Count | Source | 486 | 54 | double get() const { | 487 | 54 | if (!inited_flag || levels.empty() || values.empty()) { | 488 | 0 | return std::numeric_limits<double>::quiet_NaN(); | 489 | 0 | } | 490 | | | 491 | 54 | DCHECK_EQ(levels.quantiles.size(), 1); | 492 | 54 | return _get_result(levels.quantiles[0]); | 493 | 54 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE6EE3getEv Line | Count | Source | 486 | 67 | double get() const { | 487 | 67 | if (!inited_flag || levels.empty() || values.empty()) { | 488 | 1 | return std::numeric_limits<double>::quiet_NaN(); | 489 | 1 | } | 490 | | | 491 | 67 | DCHECK_EQ(levels.quantiles.size(), 1); | 492 | 66 | return _get_result(levels.quantiles[0]); | 493 | 67 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE7EE3getEv Line | Count | Source | 486 | 1 | double get() const { | 487 | 1 | if (!inited_flag || levels.empty() || values.empty()) { | 488 | 0 | return std::numeric_limits<double>::quiet_NaN(); | 489 | 0 | } | 490 | | | 491 | 1 | DCHECK_EQ(levels.quantiles.size(), 1); | 492 | 1 | return _get_result(levels.quantiles[0]); | 493 | 1 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE8EE3getEv Line | Count | Source | 486 | 2 | double get() const { | 487 | 2 | if (!inited_flag || levels.empty() || values.empty()) { | 488 | 0 | return std::numeric_limits<double>::quiet_NaN(); | 489 | 0 | } | 490 | | | 491 | 2 | DCHECK_EQ(levels.quantiles.size(), 1); | 492 | 2 | return _get_result(levels.quantiles[0]); | 493 | 2 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE9EE3getEv Line | Count | Source | 486 | 35 | double get() const { | 487 | 35 | if (!inited_flag || levels.empty() || values.empty()) { | 488 | 1 | return std::numeric_limits<double>::quiet_NaN(); | 489 | 1 | } | 490 | | | 491 | 35 | DCHECK_EQ(levels.quantiles.size(), 1); | 492 | 34 | return _get_result(levels.quantiles[0]); | 493 | 35 | } |
|
494 | | |
495 | 260 | void insert_result_into(IColumn& to) const { |
496 | 260 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); |
497 | 260 | if (!inited_flag || levels.empty()) { |
498 | 3 | return; |
499 | 3 | } |
500 | | |
501 | 257 | size_t old_size = column_data.size(); |
502 | 257 | size_t size = levels.quantiles.size(); |
503 | 257 | column_data.resize(old_size + size); |
504 | 257 | auto* result = column_data.data() + old_size; |
505 | | |
506 | 257 | if (values.empty()) { |
507 | 4 | for (size_t i = 0; i < size; ++i) { |
508 | 3 | result[i] = std::numeric_limits<double>::quiet_NaN(); |
509 | 3 | } |
510 | 1 | return; |
511 | 1 | } |
512 | | |
513 | 256 | if (values.size() == 1) { |
514 | 452 | for (size_t i = 0; i < size; ++i) { |
515 | 320 | result[i] = static_cast<double>(values.front()); |
516 | 320 | } |
517 | 132 | return; |
518 | 132 | } |
519 | | |
520 | 124 | size_t prev_index = 0; |
521 | 124 | const auto& quantiles = levels.quantiles; |
522 | 124 | const auto& permutation = levels.get_permutation(); |
523 | 421 | for (size_t i = 0; i < size; ++i) { |
524 | 297 | auto level_index = permutation[i]; |
525 | 297 | auto level = quantiles[level_index]; |
526 | 297 | double u = static_cast<double>(values.size() - 1) * level; |
527 | 297 | auto index = static_cast<size_t>(u); |
528 | | |
529 | 297 | if (index + 1 >= values.size()) { |
530 | 0 | result[level_index] = |
531 | 0 | static_cast<double>(*std::max_element(values.begin(), values.end())); |
532 | 297 | } else { |
533 | 297 | std::nth_element(values.begin() + prev_index, values.begin() + index, values.end()); |
534 | 297 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); |
535 | 297 | result[level_index] = |
536 | 297 | static_cast<double>(values[index]) + |
537 | 297 | (u - static_cast<double>(index)) * (static_cast<double>(*nth_elem) - |
538 | 297 | static_cast<double>(values[index])); |
539 | 297 | prev_index = index; |
540 | 297 | } |
541 | 297 | } |
542 | 124 | } _ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE3EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 495 | 11 | void insert_result_into(IColumn& to) const { | 496 | 11 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 497 | 11 | if (!inited_flag || levels.empty()) { | 498 | 0 | return; | 499 | 0 | } | 500 | | | 501 | 11 | size_t old_size = column_data.size(); | 502 | 11 | size_t size = levels.quantiles.size(); | 503 | 11 | column_data.resize(old_size + size); | 504 | 11 | auto* result = column_data.data() + old_size; | 505 | | | 506 | 11 | if (values.empty()) { | 507 | 0 | for (size_t i = 0; i < size; ++i) { | 508 | 0 | result[i] = std::numeric_limits<double>::quiet_NaN(); | 509 | 0 | } | 510 | 0 | return; | 511 | 0 | } | 512 | | | 513 | 11 | if (values.size() == 1) { | 514 | 32 | for (size_t i = 0; i < size; ++i) { | 515 | 24 | result[i] = static_cast<double>(values.front()); | 516 | 24 | } | 517 | 8 | return; | 518 | 8 | } | 519 | | | 520 | 3 | size_t prev_index = 0; | 521 | 3 | const auto& quantiles = levels.quantiles; | 522 | 3 | const auto& permutation = levels.get_permutation(); | 523 | 11 | for (size_t i = 0; i < size; ++i) { | 524 | 8 | auto level_index = permutation[i]; | 525 | 8 | auto level = quantiles[level_index]; | 526 | 8 | double u = static_cast<double>(values.size() - 1) * level; | 527 | 8 | auto index = static_cast<size_t>(u); | 528 | | | 529 | 8 | if (index + 1 >= values.size()) { | 530 | 0 | result[level_index] = | 531 | 0 | static_cast<double>(*std::max_element(values.begin(), values.end())); | 532 | 8 | } else { | 533 | 8 | std::nth_element(values.begin() + prev_index, values.begin() + index, values.end()); | 534 | 8 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 535 | 8 | result[level_index] = | 536 | 8 | static_cast<double>(values[index]) + | 537 | 8 | (u - static_cast<double>(index)) * (static_cast<double>(*nth_elem) - | 538 | 8 | static_cast<double>(values[index])); | 539 | 8 | prev_index = index; | 540 | 8 | } | 541 | 8 | } | 542 | 3 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE4EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 495 | 12 | void insert_result_into(IColumn& to) const { | 496 | 12 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 497 | 12 | if (!inited_flag || levels.empty()) { | 498 | 0 | return; | 499 | 0 | } | 500 | | | 501 | 12 | size_t old_size = column_data.size(); | 502 | 12 | size_t size = levels.quantiles.size(); | 503 | 12 | column_data.resize(old_size + size); | 504 | 12 | auto* result = column_data.data() + old_size; | 505 | | | 506 | 12 | if (values.empty()) { | 507 | 0 | for (size_t i = 0; i < size; ++i) { | 508 | 0 | result[i] = std::numeric_limits<double>::quiet_NaN(); | 509 | 0 | } | 510 | 0 | return; | 511 | 0 | } | 512 | | | 513 | 12 | if (values.size() == 1) { | 514 | 32 | for (size_t i = 0; i < size; ++i) { | 515 | 24 | result[i] = static_cast<double>(values.front()); | 516 | 24 | } | 517 | 8 | return; | 518 | 8 | } | 519 | | | 520 | 4 | size_t prev_index = 0; | 521 | 4 | const auto& quantiles = levels.quantiles; | 522 | 4 | const auto& permutation = levels.get_permutation(); | 523 | 15 | for (size_t i = 0; i < size; ++i) { | 524 | 11 | auto level_index = permutation[i]; | 525 | 11 | auto level = quantiles[level_index]; | 526 | 11 | double u = static_cast<double>(values.size() - 1) * level; | 527 | 11 | auto index = static_cast<size_t>(u); | 528 | | | 529 | 11 | if (index + 1 >= values.size()) { | 530 | 0 | result[level_index] = | 531 | 0 | static_cast<double>(*std::max_element(values.begin(), values.end())); | 532 | 11 | } else { | 533 | 11 | std::nth_element(values.begin() + prev_index, values.begin() + index, values.end()); | 534 | 11 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 535 | 11 | result[level_index] = | 536 | 11 | static_cast<double>(values[index]) + | 537 | 11 | (u - static_cast<double>(index)) * (static_cast<double>(*nth_elem) - | 538 | 11 | static_cast<double>(values[index])); | 539 | 11 | prev_index = index; | 540 | 11 | } | 541 | 11 | } | 542 | 4 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE5EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 495 | 170 | void insert_result_into(IColumn& to) const { | 496 | 170 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 497 | 170 | if (!inited_flag || levels.empty()) { | 498 | 3 | return; | 499 | 3 | } | 500 | | | 501 | 167 | size_t old_size = column_data.size(); | 502 | 167 | size_t size = levels.quantiles.size(); | 503 | 167 | column_data.resize(old_size + size); | 504 | 167 | auto* result = column_data.data() + old_size; | 505 | | | 506 | 167 | if (values.empty()) { | 507 | 0 | for (size_t i = 0; i < size; ++i) { | 508 | 0 | result[i] = std::numeric_limits<double>::quiet_NaN(); | 509 | 0 | } | 510 | 0 | return; | 511 | 0 | } | 512 | | | 513 | 167 | if (values.size() == 1) { | 514 | 297 | for (size_t i = 0; i < size; ++i) { | 515 | 206 | result[i] = static_cast<double>(values.front()); | 516 | 206 | } | 517 | 91 | return; | 518 | 91 | } | 519 | | | 520 | 76 | size_t prev_index = 0; | 521 | 76 | const auto& quantiles = levels.quantiles; | 522 | 76 | const auto& permutation = levels.get_permutation(); | 523 | 245 | for (size_t i = 0; i < size; ++i) { | 524 | 169 | auto level_index = permutation[i]; | 525 | 169 | auto level = quantiles[level_index]; | 526 | 169 | double u = static_cast<double>(values.size() - 1) * level; | 527 | 169 | auto index = static_cast<size_t>(u); | 528 | | | 529 | 169 | if (index + 1 >= values.size()) { | 530 | 0 | result[level_index] = | 531 | 0 | static_cast<double>(*std::max_element(values.begin(), values.end())); | 532 | 169 | } else { | 533 | 169 | std::nth_element(values.begin() + prev_index, values.begin() + index, values.end()); | 534 | 169 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 535 | 169 | result[level_index] = | 536 | 169 | static_cast<double>(values[index]) + | 537 | 169 | (u - static_cast<double>(index)) * (static_cast<double>(*nth_elem) - | 538 | 169 | static_cast<double>(values[index])); | 539 | 169 | prev_index = index; | 540 | 169 | } | 541 | 169 | } | 542 | 76 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE6EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 495 | 12 | void insert_result_into(IColumn& to) const { | 496 | 12 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 497 | 12 | if (!inited_flag || levels.empty()) { | 498 | 0 | return; | 499 | 0 | } | 500 | | | 501 | 12 | size_t old_size = column_data.size(); | 502 | 12 | size_t size = levels.quantiles.size(); | 503 | 12 | column_data.resize(old_size + size); | 504 | 12 | auto* result = column_data.data() + old_size; | 505 | | | 506 | 12 | if (values.empty()) { | 507 | 0 | for (size_t i = 0; i < size; ++i) { | 508 | 0 | result[i] = std::numeric_limits<double>::quiet_NaN(); | 509 | 0 | } | 510 | 0 | return; | 511 | 0 | } | 512 | | | 513 | 12 | if (values.size() == 1) { | 514 | 32 | for (size_t i = 0; i < size; ++i) { | 515 | 24 | result[i] = static_cast<double>(values.front()); | 516 | 24 | } | 517 | 8 | return; | 518 | 8 | } | 519 | | | 520 | 4 | size_t prev_index = 0; | 521 | 4 | const auto& quantiles = levels.quantiles; | 522 | 4 | const auto& permutation = levels.get_permutation(); | 523 | 15 | for (size_t i = 0; i < size; ++i) { | 524 | 11 | auto level_index = permutation[i]; | 525 | 11 | auto level = quantiles[level_index]; | 526 | 11 | double u = static_cast<double>(values.size() - 1) * level; | 527 | 11 | auto index = static_cast<size_t>(u); | 528 | | | 529 | 11 | if (index + 1 >= values.size()) { | 530 | 0 | result[level_index] = | 531 | 0 | static_cast<double>(*std::max_element(values.begin(), values.end())); | 532 | 11 | } else { | 533 | 11 | std::nth_element(values.begin() + prev_index, values.begin() + index, values.end()); | 534 | 11 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 535 | 11 | result[level_index] = | 536 | 11 | static_cast<double>(values[index]) + | 537 | 11 | (u - static_cast<double>(index)) * (static_cast<double>(*nth_elem) - | 538 | 11 | static_cast<double>(values[index])); | 539 | 11 | prev_index = index; | 540 | 11 | } | 541 | 11 | } | 542 | 4 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE7EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 495 | 11 | void insert_result_into(IColumn& to) const { | 496 | 11 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 497 | 11 | if (!inited_flag || levels.empty()) { | 498 | 0 | return; | 499 | 0 | } | 500 | | | 501 | 11 | size_t old_size = column_data.size(); | 502 | 11 | size_t size = levels.quantiles.size(); | 503 | 11 | column_data.resize(old_size + size); | 504 | 11 | auto* result = column_data.data() + old_size; | 505 | | | 506 | 11 | if (values.empty()) { | 507 | 0 | for (size_t i = 0; i < size; ++i) { | 508 | 0 | result[i] = std::numeric_limits<double>::quiet_NaN(); | 509 | 0 | } | 510 | 0 | return; | 511 | 0 | } | 512 | | | 513 | 11 | if (values.size() == 1) { | 514 | 32 | for (size_t i = 0; i < size; ++i) { | 515 | 24 | result[i] = static_cast<double>(values.front()); | 516 | 24 | } | 517 | 8 | return; | 518 | 8 | } | 519 | | | 520 | 3 | size_t prev_index = 0; | 521 | 3 | const auto& quantiles = levels.quantiles; | 522 | 3 | const auto& permutation = levels.get_permutation(); | 523 | 11 | for (size_t i = 0; i < size; ++i) { | 524 | 8 | auto level_index = permutation[i]; | 525 | 8 | auto level = quantiles[level_index]; | 526 | 8 | double u = static_cast<double>(values.size() - 1) * level; | 527 | 8 | auto index = static_cast<size_t>(u); | 528 | | | 529 | 8 | if (index + 1 >= values.size()) { | 530 | 0 | result[level_index] = | 531 | 0 | static_cast<double>(*std::max_element(values.begin(), values.end())); | 532 | 8 | } else { | 533 | 8 | std::nth_element(values.begin() + prev_index, values.begin() + index, values.end()); | 534 | 8 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 535 | 8 | result[level_index] = | 536 | 8 | static_cast<double>(values[index]) + | 537 | 8 | (u - static_cast<double>(index)) * (static_cast<double>(*nth_elem) - | 538 | 8 | static_cast<double>(values[index])); | 539 | 8 | prev_index = index; | 540 | 8 | } | 541 | 8 | } | 542 | 3 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE8EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 495 | 1 | void insert_result_into(IColumn& to) const { | 496 | 1 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 497 | 1 | if (!inited_flag || levels.empty()) { | 498 | 0 | return; | 499 | 0 | } | 500 | | | 501 | 1 | size_t old_size = column_data.size(); | 502 | 1 | size_t size = levels.quantiles.size(); | 503 | 1 | column_data.resize(old_size + size); | 504 | 1 | auto* result = column_data.data() + old_size; | 505 | | | 506 | 1 | if (values.empty()) { | 507 | 0 | for (size_t i = 0; i < size; ++i) { | 508 | 0 | result[i] = std::numeric_limits<double>::quiet_NaN(); | 509 | 0 | } | 510 | 0 | return; | 511 | 0 | } | 512 | | | 513 | 1 | if (values.size() == 1) { | 514 | 0 | for (size_t i = 0; i < size; ++i) { | 515 | 0 | result[i] = static_cast<double>(values.front()); | 516 | 0 | } | 517 | 0 | return; | 518 | 0 | } | 519 | | | 520 | 1 | size_t prev_index = 0; | 521 | 1 | const auto& quantiles = levels.quantiles; | 522 | 1 | const auto& permutation = levels.get_permutation(); | 523 | 3 | for (size_t i = 0; i < size; ++i) { | 524 | 2 | auto level_index = permutation[i]; | 525 | 2 | auto level = quantiles[level_index]; | 526 | 2 | double u = static_cast<double>(values.size() - 1) * level; | 527 | 2 | auto index = static_cast<size_t>(u); | 528 | | | 529 | 2 | if (index + 1 >= values.size()) { | 530 | 0 | result[level_index] = | 531 | 0 | static_cast<double>(*std::max_element(values.begin(), values.end())); | 532 | 2 | } else { | 533 | 2 | std::nth_element(values.begin() + prev_index, values.begin() + index, values.end()); | 534 | 2 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 535 | 2 | result[level_index] = | 536 | 2 | static_cast<double>(values[index]) + | 537 | 2 | (u - static_cast<double>(index)) * (static_cast<double>(*nth_elem) - | 538 | 2 | static_cast<double>(values[index])); | 539 | 2 | prev_index = index; | 540 | 2 | } | 541 | 2 | } | 542 | 1 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE9EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 495 | 43 | void insert_result_into(IColumn& to) const { | 496 | 43 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 497 | 43 | if (!inited_flag || levels.empty()) { | 498 | 0 | return; | 499 | 0 | } | 500 | | | 501 | 43 | size_t old_size = column_data.size(); | 502 | 43 | size_t size = levels.quantiles.size(); | 503 | 43 | column_data.resize(old_size + size); | 504 | 43 | auto* result = column_data.data() + old_size; | 505 | | | 506 | 43 | if (values.empty()) { | 507 | 4 | for (size_t i = 0; i < size; ++i) { | 508 | 3 | result[i] = std::numeric_limits<double>::quiet_NaN(); | 509 | 3 | } | 510 | 1 | return; | 511 | 1 | } | 512 | | | 513 | 42 | if (values.size() == 1) { | 514 | 27 | for (size_t i = 0; i < size; ++i) { | 515 | 18 | result[i] = static_cast<double>(values.front()); | 516 | 18 | } | 517 | 9 | return; | 518 | 9 | } | 519 | | | 520 | 33 | size_t prev_index = 0; | 521 | 33 | const auto& quantiles = levels.quantiles; | 522 | 33 | const auto& permutation = levels.get_permutation(); | 523 | 121 | for (size_t i = 0; i < size; ++i) { | 524 | 88 | auto level_index = permutation[i]; | 525 | 88 | auto level = quantiles[level_index]; | 526 | 88 | double u = static_cast<double>(values.size() - 1) * level; | 527 | 88 | auto index = static_cast<size_t>(u); | 528 | | | 529 | 88 | if (index + 1 >= values.size()) { | 530 | 0 | result[level_index] = | 531 | 0 | static_cast<double>(*std::max_element(values.begin(), values.end())); | 532 | 88 | } else { | 533 | 88 | std::nth_element(values.begin() + prev_index, values.begin() + index, values.end()); | 534 | 88 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 535 | 88 | result[level_index] = | 536 | 88 | static_cast<double>(values[index]) + | 537 | 88 | (u - static_cast<double>(index)) * (static_cast<double>(*nth_elem) - | 538 | 88 | static_cast<double>(values[index])); | 539 | 88 | prev_index = index; | 540 | 88 | } | 541 | 88 | } | 542 | 33 | } |
|
543 | | |
544 | | private: |
545 | 322 | void _set_single_level(double quantile) { |
546 | 322 | DCHECK(levels.empty()); |
547 | 322 | check_quantile(quantile); |
548 | 322 | levels.quantiles.push_back(quantile); |
549 | 322 | levels.permutation.push_back(0); |
550 | 322 | } _ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE3EE17_set_single_levelEd Line | Count | Source | 545 | 6 | void _set_single_level(double quantile) { | 546 | | DCHECK(levels.empty()); | 547 | 6 | check_quantile(quantile); | 548 | 6 | levels.quantiles.push_back(quantile); | 549 | 6 | levels.permutation.push_back(0); | 550 | 6 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE4EE17_set_single_levelEd Line | Count | Source | 545 | 100 | void _set_single_level(double quantile) { | 546 | | DCHECK(levels.empty()); | 547 | 100 | check_quantile(quantile); | 548 | 100 | levels.quantiles.push_back(quantile); | 549 | 100 | levels.permutation.push_back(0); | 550 | 100 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE5EE17_set_single_levelEd Line | Count | Source | 545 | 62 | void _set_single_level(double quantile) { | 546 | | DCHECK(levels.empty()); | 547 | 62 | check_quantile(quantile); | 548 | 62 | levels.quantiles.push_back(quantile); | 549 | 62 | levels.permutation.push_back(0); | 550 | 62 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE6EE17_set_single_levelEd Line | Count | Source | 545 | 121 | void _set_single_level(double quantile) { | 546 | | DCHECK(levels.empty()); | 547 | 121 | check_quantile(quantile); | 548 | 121 | levels.quantiles.push_back(quantile); | 549 | 121 | levels.permutation.push_back(0); | 550 | 121 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE7EE17_set_single_levelEd Line | Count | Source | 545 | 2 | void _set_single_level(double quantile) { | 546 | | DCHECK(levels.empty()); | 547 | 2 | check_quantile(quantile); | 548 | 2 | levels.quantiles.push_back(quantile); | 549 | 2 | levels.permutation.push_back(0); | 550 | 2 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE8EE17_set_single_levelEd Line | Count | Source | 545 | 3 | void _set_single_level(double quantile) { | 546 | | DCHECK(levels.empty()); | 547 | 3 | check_quantile(quantile); | 548 | 3 | levels.quantiles.push_back(quantile); | 549 | 3 | levels.permutation.push_back(0); | 550 | 3 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE9EE17_set_single_levelEd Line | Count | Source | 545 | 28 | void _set_single_level(double quantile) { | 546 | | DCHECK(levels.empty()); | 547 | 28 | check_quantile(quantile); | 548 | 28 | levels.quantiles.push_back(quantile); | 549 | 28 | levels.permutation.push_back(0); | 550 | 28 | } |
|
551 | | |
552 | | void _set_many_levels(const PaddedPODArray<Float64>& quantiles_data, const NullMap& null_maps, |
553 | 293 | size_t start, int64_t arg_size) { |
554 | 293 | DCHECK(levels.empty()); |
555 | 293 | size_t size = cast_set<size_t>(arg_size); |
556 | 293 | levels.quantiles.resize(size); |
557 | 293 | levels.permutation.resize(size); |
558 | 974 | for (size_t i = 0; i < size; ++i) { |
559 | 682 | if (null_maps[start + i]) { |
560 | 1 | throw Exception(ErrorCode::INVALID_ARGUMENT, |
561 | 1 | "quantiles in func percentile_array should not have null"); |
562 | 1 | } |
563 | 681 | check_quantile(quantiles_data[start + i]); |
564 | 681 | levels.quantiles[i] = quantiles_data[start + i]; |
565 | 681 | levels.permutation[i] = i; |
566 | 681 | } |
567 | 293 | } _ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE3EE16_set_many_levelsERKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEml Line | Count | Source | 553 | 12 | size_t start, int64_t arg_size) { | 554 | 12 | DCHECK(levels.empty()); | 555 | 12 | size_t size = cast_set<size_t>(arg_size); | 556 | 12 | levels.quantiles.resize(size); | 557 | 12 | levels.permutation.resize(size); | 558 | 46 | for (size_t i = 0; i < size; ++i) { | 559 | 34 | if (null_maps[start + i]) { | 560 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 561 | 0 | "quantiles in func percentile_array should not have null"); | 562 | 0 | } | 563 | 34 | check_quantile(quantiles_data[start + i]); | 564 | 34 | levels.quantiles[i] = quantiles_data[start + i]; | 565 | 34 | levels.permutation[i] = i; | 566 | 34 | } | 567 | 12 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE4EE16_set_many_levelsERKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEml Line | Count | Source | 553 | 15 | size_t start, int64_t arg_size) { | 554 | 15 | DCHECK(levels.empty()); | 555 | 15 | size_t size = cast_set<size_t>(arg_size); | 556 | 15 | levels.quantiles.resize(size); | 557 | 15 | levels.permutation.resize(size); | 558 | 58 | for (size_t i = 0; i < size; ++i) { | 559 | 43 | if (null_maps[start + i]) { | 560 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 561 | 0 | "quantiles in func percentile_array should not have null"); | 562 | 0 | } | 563 | 43 | check_quantile(quantiles_data[start + i]); | 564 | 43 | levels.quantiles[i] = quantiles_data[start + i]; | 565 | 43 | levels.permutation[i] = i; | 566 | 43 | } | 567 | 15 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE5EE16_set_many_levelsERKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEml Line | Count | Source | 553 | 191 | size_t start, int64_t arg_size) { | 554 | 191 | DCHECK(levels.empty()); | 555 | 191 | size_t size = cast_set<size_t>(arg_size); | 556 | 191 | levels.quantiles.resize(size); | 557 | 191 | levels.permutation.resize(size); | 558 | 615 | for (size_t i = 0; i < size; ++i) { | 559 | 424 | if (null_maps[start + i]) { | 560 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 561 | 0 | "quantiles in func percentile_array should not have null"); | 562 | 0 | } | 563 | 424 | check_quantile(quantiles_data[start + i]); | 564 | 424 | levels.quantiles[i] = quantiles_data[start + i]; | 565 | 424 | levels.permutation[i] = i; | 566 | 424 | } | 567 | 191 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE6EE16_set_many_levelsERKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEml Line | Count | Source | 553 | 16 | size_t start, int64_t arg_size) { | 554 | 16 | DCHECK(levels.empty()); | 555 | 16 | size_t size = cast_set<size_t>(arg_size); | 556 | 16 | levels.quantiles.resize(size); | 557 | 16 | levels.permutation.resize(size); | 558 | 59 | for (size_t i = 0; i < size; ++i) { | 559 | 44 | if (null_maps[start + i]) { | 560 | 1 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 561 | 1 | "quantiles in func percentile_array should not have null"); | 562 | 1 | } | 563 | 43 | check_quantile(quantiles_data[start + i]); | 564 | 43 | levels.quantiles[i] = quantiles_data[start + i]; | 565 | 43 | levels.permutation[i] = i; | 566 | 43 | } | 567 | 16 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE7EE16_set_many_levelsERKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEml Line | Count | Source | 553 | 12 | size_t start, int64_t arg_size) { | 554 | 12 | DCHECK(levels.empty()); | 555 | 12 | size_t size = cast_set<size_t>(arg_size); | 556 | 12 | levels.quantiles.resize(size); | 557 | 12 | levels.permutation.resize(size); | 558 | 46 | for (size_t i = 0; i < size; ++i) { | 559 | 34 | if (null_maps[start + i]) { | 560 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 561 | 0 | "quantiles in func percentile_array should not have null"); | 562 | 0 | } | 563 | 34 | check_quantile(quantiles_data[start + i]); | 564 | 34 | levels.quantiles[i] = quantiles_data[start + i]; | 565 | 34 | levels.permutation[i] = i; | 566 | 34 | } | 567 | 12 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE8EE16_set_many_levelsERKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEml Line | Count | Source | 553 | 2 | size_t start, int64_t arg_size) { | 554 | 2 | DCHECK(levels.empty()); | 555 | 2 | size_t size = cast_set<size_t>(arg_size); | 556 | 2 | levels.quantiles.resize(size); | 557 | 2 | levels.permutation.resize(size); | 558 | 6 | for (size_t i = 0; i < size; ++i) { | 559 | 4 | if (null_maps[start + i]) { | 560 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 561 | 0 | "quantiles in func percentile_array should not have null"); | 562 | 0 | } | 563 | 4 | check_quantile(quantiles_data[start + i]); | 564 | 4 | levels.quantiles[i] = quantiles_data[start + i]; | 565 | 4 | levels.permutation[i] = i; | 566 | 4 | } | 567 | 2 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE9EE16_set_many_levelsERKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEml Line | Count | Source | 553 | 45 | size_t start, int64_t arg_size) { | 554 | 45 | DCHECK(levels.empty()); | 555 | 45 | size_t size = cast_set<size_t>(arg_size); | 556 | 45 | levels.quantiles.resize(size); | 557 | 45 | levels.permutation.resize(size); | 558 | 144 | for (size_t i = 0; i < size; ++i) { | 559 | 99 | if (null_maps[start + i]) { | 560 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 561 | 0 | "quantiles in func percentile_array should not have null"); | 562 | 0 | } | 563 | 99 | check_quantile(quantiles_data[start + i]); | 564 | 99 | levels.quantiles[i] = quantiles_data[start + i]; | 565 | 99 | levels.permutation[i] = i; | 566 | 99 | } | 567 | 45 | } |
|
568 | | |
569 | 1.85k | void _append(const ValueType* data, size_t count) { |
570 | 1.85k | if (count == 0) { |
571 | 2 | return; |
572 | 2 | } |
573 | 1.85k | values.reserve(values.size() + count); |
574 | 1.85k | if constexpr (std::is_floating_point_v<ValueType>) { |
575 | 413 | for (size_t i = 0; i < count; ++i) { |
576 | 223 | if (!std::isnan(data[i])) { |
577 | 216 | values.push_back(data[i]); |
578 | 216 | } |
579 | 223 | } |
580 | 1.66k | } else { |
581 | 1.66k | values.insert_assume_reserved(data, data + count); |
582 | 1.66k | } |
583 | 1.85k | } _ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE3EE7_appendEPKam Line | Count | Source | 569 | 50 | void _append(const ValueType* data, size_t count) { | 570 | 50 | if (count == 0) { | 571 | 0 | return; | 572 | 0 | } | 573 | 50 | values.reserve(values.size() + count); | 574 | | if constexpr (std::is_floating_point_v<ValueType>) { | 575 | | for (size_t i = 0; i < count; ++i) { | 576 | | if (!std::isnan(data[i])) { | 577 | | values.push_back(data[i]); | 578 | | } | 579 | | } | 580 | 50 | } else { | 581 | 50 | values.insert_assume_reserved(data, data + count); | 582 | 50 | } | 583 | 50 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE4EE7_appendEPKsm Line | Count | Source | 569 | 348 | void _append(const ValueType* data, size_t count) { | 570 | 348 | if (count == 0) { | 571 | 0 | return; | 572 | 0 | } | 573 | 348 | values.reserve(values.size() + count); | 574 | | if constexpr (std::is_floating_point_v<ValueType>) { | 575 | | for (size_t i = 0; i < count; ++i) { | 576 | | if (!std::isnan(data[i])) { | 577 | | values.push_back(data[i]); | 578 | | } | 579 | | } | 580 | 348 | } else { | 581 | 348 | values.insert_assume_reserved(data, data + count); | 582 | 348 | } | 583 | 348 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE5EE7_appendEPKim Line | Count | Source | 569 | 911 | void _append(const ValueType* data, size_t count) { | 570 | 911 | if (count == 0) { | 571 | 0 | return; | 572 | 0 | } | 573 | 911 | values.reserve(values.size() + count); | 574 | | if constexpr (std::is_floating_point_v<ValueType>) { | 575 | | for (size_t i = 0; i < count; ++i) { | 576 | | if (!std::isnan(data[i])) { | 577 | | values.push_back(data[i]); | 578 | | } | 579 | | } | 580 | 911 | } else { | 581 | 911 | values.insert_assume_reserved(data, data + count); | 582 | 911 | } | 583 | 911 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE6EE7_appendEPKlm Line | Count | Source | 569 | 329 | void _append(const ValueType* data, size_t count) { | 570 | 329 | if (count == 0) { | 571 | 0 | return; | 572 | 0 | } | 573 | 329 | values.reserve(values.size() + count); | 574 | | if constexpr (std::is_floating_point_v<ValueType>) { | 575 | | for (size_t i = 0; i < count; ++i) { | 576 | | if (!std::isnan(data[i])) { | 577 | | values.push_back(data[i]); | 578 | | } | 579 | | } | 580 | 329 | } else { | 581 | 329 | values.insert_assume_reserved(data, data + count); | 582 | 329 | } | 583 | 329 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE7EE7_appendEPKnm Line | Count | Source | 569 | 22 | void _append(const ValueType* data, size_t count) { | 570 | 22 | if (count == 0) { | 571 | 0 | return; | 572 | 0 | } | 573 | 22 | values.reserve(values.size() + count); | 574 | | if constexpr (std::is_floating_point_v<ValueType>) { | 575 | | for (size_t i = 0; i < count; ++i) { | 576 | | if (!std::isnan(data[i])) { | 577 | | values.push_back(data[i]); | 578 | | } | 579 | | } | 580 | 22 | } else { | 581 | 22 | values.insert_assume_reserved(data, data + count); | 582 | 22 | } | 583 | 22 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE8EE7_appendEPKfm Line | Count | Source | 569 | 14 | void _append(const ValueType* data, size_t count) { | 570 | 14 | if (count == 0) { | 571 | 0 | return; | 572 | 0 | } | 573 | 14 | values.reserve(values.size() + count); | 574 | 14 | if constexpr (std::is_floating_point_v<ValueType>) { | 575 | 31 | for (size_t i = 0; i < count; ++i) { | 576 | 17 | if (!std::isnan(data[i])) { | 577 | 16 | values.push_back(data[i]); | 578 | 16 | } | 579 | 17 | } | 580 | | } else { | 581 | | values.insert_assume_reserved(data, data + count); | 582 | | } | 583 | 14 | } |
_ZN5doris20PercentileExactStateILNS_13PrimitiveTypeE9EE7_appendEPKdm Line | Count | Source | 569 | 178 | void _append(const ValueType* data, size_t count) { | 570 | 178 | if (count == 0) { | 571 | 2 | return; | 572 | 2 | } | 573 | 176 | values.reserve(values.size() + count); | 574 | 176 | if constexpr (std::is_floating_point_v<ValueType>) { | 575 | 382 | for (size_t i = 0; i < count; ++i) { | 576 | 206 | if (!std::isnan(data[i])) { | 577 | 200 | values.push_back(data[i]); | 578 | 200 | } | 579 | 206 | } | 580 | | } else { | 581 | | values.insert_assume_reserved(data, data + count); | 582 | | } | 583 | 176 | } |
|
584 | | |
585 | 363 | double _get_result(double quantile) const { |
586 | 363 | if (values.size() == 1) { |
587 | 114 | return static_cast<double>(values.front()); |
588 | 114 | } |
589 | | |
590 | 249 | double u = static_cast<double>(values.size() - 1) * quantile; |
591 | 249 | auto index = static_cast<size_t>(u); |
592 | | |
593 | 249 | if (index + 1 >= values.size()) { |
594 | 6 | return static_cast<double>(*std::max_element(values.begin(), values.end())); |
595 | 6 | } |
596 | | |
597 | 243 | std::nth_element(values.begin(), values.begin() + index, values.end()); |
598 | 243 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); |
599 | | |
600 | 243 | return static_cast<double>(values[index]) + |
601 | 243 | (u - static_cast<double>(index)) * |
602 | 243 | (static_cast<double>(*nth_elem) - static_cast<double>(values[index])); |
603 | 249 | } _ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE3EE11_get_resultEd Line | Count | Source | 585 | 29 | double _get_result(double quantile) const { | 586 | 29 | if (values.size() == 1) { | 587 | 4 | return static_cast<double>(values.front()); | 588 | 4 | } | 589 | | | 590 | 25 | double u = static_cast<double>(values.size() - 1) * quantile; | 591 | 25 | auto index = static_cast<size_t>(u); | 592 | | | 593 | 25 | if (index + 1 >= values.size()) { | 594 | 6 | return static_cast<double>(*std::max_element(values.begin(), values.end())); | 595 | 6 | } | 596 | | | 597 | 19 | std::nth_element(values.begin(), values.begin() + index, values.end()); | 598 | 19 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 599 | | | 600 | 19 | return static_cast<double>(values[index]) + | 601 | 19 | (u - static_cast<double>(index)) * | 602 | 19 | (static_cast<double>(*nth_elem) - static_cast<double>(values[index])); | 603 | 25 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE4EE11_get_resultEd Line | Count | Source | 585 | 177 | double _get_result(double quantile) const { | 586 | 177 | if (values.size() == 1) { | 587 | 42 | return static_cast<double>(values.front()); | 588 | 42 | } | 589 | | | 590 | 135 | double u = static_cast<double>(values.size() - 1) * quantile; | 591 | 135 | auto index = static_cast<size_t>(u); | 592 | | | 593 | 135 | if (index + 1 >= values.size()) { | 594 | 0 | return static_cast<double>(*std::max_element(values.begin(), values.end())); | 595 | 0 | } | 596 | | | 597 | 135 | std::nth_element(values.begin(), values.begin() + index, values.end()); | 598 | 135 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 599 | | | 600 | 135 | return static_cast<double>(values[index]) + | 601 | 135 | (u - static_cast<double>(index)) * | 602 | 135 | (static_cast<double>(*nth_elem) - static_cast<double>(values[index])); | 603 | 135 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE5EE11_get_resultEd Line | Count | Source | 585 | 54 | double _get_result(double quantile) const { | 586 | 54 | if (values.size() == 1) { | 587 | 21 | return static_cast<double>(values.front()); | 588 | 21 | } | 589 | | | 590 | 33 | double u = static_cast<double>(values.size() - 1) * quantile; | 591 | 33 | auto index = static_cast<size_t>(u); | 592 | | | 593 | 33 | if (index + 1 >= values.size()) { | 594 | 0 | return static_cast<double>(*std::max_element(values.begin(), values.end())); | 595 | 0 | } | 596 | | | 597 | 33 | std::nth_element(values.begin(), values.begin() + index, values.end()); | 598 | 33 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 599 | | | 600 | 33 | return static_cast<double>(values[index]) + | 601 | 33 | (u - static_cast<double>(index)) * | 602 | 33 | (static_cast<double>(*nth_elem) - static_cast<double>(values[index])); | 603 | 33 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE6EE11_get_resultEd Line | Count | Source | 585 | 66 | double _get_result(double quantile) const { | 586 | 66 | if (values.size() == 1) { | 587 | 35 | return static_cast<double>(values.front()); | 588 | 35 | } | 589 | | | 590 | 31 | double u = static_cast<double>(values.size() - 1) * quantile; | 591 | 31 | auto index = static_cast<size_t>(u); | 592 | | | 593 | 31 | if (index + 1 >= values.size()) { | 594 | 0 | return static_cast<double>(*std::max_element(values.begin(), values.end())); | 595 | 0 | } | 596 | | | 597 | 31 | std::nth_element(values.begin(), values.begin() + index, values.end()); | 598 | 31 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 599 | | | 600 | 31 | return static_cast<double>(values[index]) + | 601 | 31 | (u - static_cast<double>(index)) * | 602 | 31 | (static_cast<double>(*nth_elem) - static_cast<double>(values[index])); | 603 | 31 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE7EE11_get_resultEd Line | Count | Source | 585 | 1 | double _get_result(double quantile) const { | 586 | 1 | if (values.size() == 1) { | 587 | 0 | return static_cast<double>(values.front()); | 588 | 0 | } | 589 | | | 590 | 1 | double u = static_cast<double>(values.size() - 1) * quantile; | 591 | 1 | auto index = static_cast<size_t>(u); | 592 | | | 593 | 1 | if (index + 1 >= values.size()) { | 594 | 0 | return static_cast<double>(*std::max_element(values.begin(), values.end())); | 595 | 0 | } | 596 | | | 597 | 1 | std::nth_element(values.begin(), values.begin() + index, values.end()); | 598 | 1 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 599 | | | 600 | 1 | return static_cast<double>(values[index]) + | 601 | 1 | (u - static_cast<double>(index)) * | 602 | 1 | (static_cast<double>(*nth_elem) - static_cast<double>(values[index])); | 603 | 1 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE8EE11_get_resultEd Line | Count | Source | 585 | 2 | double _get_result(double quantile) const { | 586 | 2 | if (values.size() == 1) { | 587 | 0 | return static_cast<double>(values.front()); | 588 | 0 | } | 589 | | | 590 | 2 | double u = static_cast<double>(values.size() - 1) * quantile; | 591 | 2 | auto index = static_cast<size_t>(u); | 592 | | | 593 | 2 | if (index + 1 >= values.size()) { | 594 | 0 | return static_cast<double>(*std::max_element(values.begin(), values.end())); | 595 | 0 | } | 596 | | | 597 | 2 | std::nth_element(values.begin(), values.begin() + index, values.end()); | 598 | 2 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 599 | | | 600 | 2 | return static_cast<double>(values[index]) + | 601 | 2 | (u - static_cast<double>(index)) * | 602 | 2 | (static_cast<double>(*nth_elem) - static_cast<double>(values[index])); | 603 | 2 | } |
_ZNK5doris20PercentileExactStateILNS_13PrimitiveTypeE9EE11_get_resultEd Line | Count | Source | 585 | 34 | double _get_result(double quantile) const { | 586 | 34 | if (values.size() == 1) { | 587 | 12 | return static_cast<double>(values.front()); | 588 | 12 | } | 589 | | | 590 | 22 | double u = static_cast<double>(values.size() - 1) * quantile; | 591 | 22 | auto index = static_cast<size_t>(u); | 592 | | | 593 | 22 | if (index + 1 >= values.size()) { | 594 | 0 | return static_cast<double>(*std::max_element(values.begin(), values.end())); | 595 | 0 | } | 596 | | | 597 | 22 | std::nth_element(values.begin(), values.begin() + index, values.end()); | 598 | 22 | auto* nth_elem = std::min_element(values.begin() + index + 1, values.end()); | 599 | | | 600 | 22 | return static_cast<double>(values[index]) + | 601 | 22 | (u - static_cast<double>(index)) * | 602 | 22 | (static_cast<double>(*nth_elem) - static_cast<double>(values[index])); | 603 | 22 | } |
|
604 | | |
605 | | mutable Array values; |
606 | | mutable PercentileLevels levels; |
607 | | bool inited_flag = false; |
608 | | }; |
609 | | |
610 | | template <PrimitiveType T> |
611 | | class AggregateFunctionPercentile final |
612 | | : public IAggregateFunctionDataHelper<PercentileState<T>, AggregateFunctionPercentile<T>>, |
613 | | MultiExpression, |
614 | | NullableAggregateFunction { |
615 | | public: |
616 | | using ColVecType = typename PrimitiveTypeTraits<T>::ColumnType; |
617 | | using Base = IAggregateFunctionDataHelper<PercentileState<T>, AggregateFunctionPercentile<T>>; |
618 | 1.30k | AggregateFunctionPercentile(const DataTypes& argument_types_) : Base(argument_types_) {}Unexecuted instantiation: _ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Unexecuted instantiation: _ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Unexecuted instantiation: _ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE _ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 618 | 1.30k | AggregateFunctionPercentile(const DataTypes& argument_types_) : Base(argument_types_) {} |
Unexecuted instantiation: _ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Unexecuted instantiation: _ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Unexecuted instantiation: _ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE |
619 | | |
620 | 97 | String get_name() const override { return "percentile"; }Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE8get_nameB5cxx11Ev _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE8get_nameB5cxx11Ev Line | Count | Source | 620 | 97 | String get_name() const override { return "percentile"; } |
Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE8get_nameB5cxx11Ev |
621 | | |
622 | 21 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); }Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE15get_return_typeEv Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE15get_return_typeEv Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE15get_return_typeEv _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE15get_return_typeEv Line | Count | Source | 622 | 21 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE15get_return_typeEv Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE15get_return_typeEv Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE15get_return_typeEv |
623 | | |
624 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
625 | 122 | Arena&) const override { |
626 | 122 | const auto& sources = |
627 | 122 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
628 | 122 | const auto& quantile = |
629 | 122 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
630 | 122 | AggregateFunctionPercentile::data(place).add(sources.get_data()[row_num], |
631 | 122 | quantile.get_data(), NullMap(1, 0), 1); |
632 | 122 | } Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 625 | 122 | Arena&) const override { | 626 | 122 | const auto& sources = | 627 | 122 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 628 | 122 | const auto& quantile = | 629 | 122 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 630 | 122 | AggregateFunctionPercentile::data(place).add(sources.get_data()[row_num], | 631 | 122 | quantile.get_data(), NullMap(1, 0), 1); | 632 | 122 | } |
Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE3addEPcPPKNS_7IColumnElRNS_5ArenaE |
633 | | |
634 | | void add_batch_single_place(size_t batch_size, AggregateDataPtr place, const IColumn** columns, |
635 | 0 | Arena&) const override { |
636 | 0 | const auto& sources = |
637 | 0 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
638 | 0 | const auto& quantile = |
639 | 0 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
640 | 0 | DCHECK_EQ(sources.get_data().size(), batch_size); |
641 | 0 | AggregateFunctionPercentile::data(place).add_batch(sources.get_data(), |
642 | 0 | quantile.get_data()[0]); |
643 | 0 | } Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE |
644 | | |
645 | 81 | void reset(AggregateDataPtr __restrict place) const override { |
646 | 81 | AggregateFunctionPercentile::data(place).reset(); |
647 | 81 | } Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE5resetEPc Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE5resetEPc Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE5resetEPc _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE5resetEPc Line | Count | Source | 645 | 81 | void reset(AggregateDataPtr __restrict place) const override { | 646 | 81 | AggregateFunctionPercentile::data(place).reset(); | 647 | 81 | } |
Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE5resetEPc Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE5resetEPc Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE5resetEPc |
648 | | |
649 | | void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, |
650 | 233 | Arena&) const override { |
651 | 233 | AggregateFunctionPercentile::data(place).merge(AggregateFunctionPercentile::data(rhs)); |
652 | 233 | } Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE5mergeEPcPKcRNS_5ArenaE _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 650 | 233 | Arena&) const override { | 651 | 233 | AggregateFunctionPercentile::data(place).merge(AggregateFunctionPercentile::data(rhs)); | 652 | 233 | } |
Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE5mergeEPcPKcRNS_5ArenaE |
653 | | |
654 | 233 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { |
655 | 233 | AggregateFunctionPercentile::data(place).write(buf); |
656 | 233 | } Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE9serializeEPKcRNS_14BufferWritableE _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 654 | 233 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 655 | 233 | AggregateFunctionPercentile::data(place).write(buf); | 656 | 233 | } |
Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE9serializeEPKcRNS_14BufferWritableE |
657 | | |
658 | | void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf, |
659 | 233 | Arena&) const override { |
660 | 233 | AggregateFunctionPercentile::data(place).read(buf); |
661 | 233 | } Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 659 | 233 | Arena&) const override { | 660 | 233 | AggregateFunctionPercentile::data(place).read(buf); | 661 | 233 | } |
Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE |
662 | | |
663 | 24 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
664 | 24 | auto& col = assert_cast<ColumnFloat64&>(to); |
665 | 24 | col.insert_value(AggregateFunctionPercentile::data(place).get()); |
666 | 24 | } Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE18insert_result_intoEPKcRNS_7IColumnE _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 663 | 24 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 664 | 24 | auto& col = assert_cast<ColumnFloat64&>(to); | 665 | 24 | col.insert_value(AggregateFunctionPercentile::data(place).get()); | 666 | 24 | } |
Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE18insert_result_intoEPKcRNS_7IColumnE |
667 | | }; |
668 | | |
669 | | template <PrimitiveType T> |
670 | | class AggregateFunctionPercentileArray final |
671 | | : public IAggregateFunctionDataHelper<PercentileState<T>, |
672 | | AggregateFunctionPercentileArray<T>>, |
673 | | MultiExpression, |
674 | | NotNullableAggregateFunction { |
675 | | public: |
676 | | using ColVecType = typename PrimitiveTypeTraits<T>::ColumnType; |
677 | | using Base = |
678 | | IAggregateFunctionDataHelper<PercentileState<T>, AggregateFunctionPercentileArray<T>>; |
679 | 425 | AggregateFunctionPercentileArray(const DataTypes& argument_types_) : Base(argument_types_) {}Unexecuted instantiation: _ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Unexecuted instantiation: _ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE _ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 679 | 424 | AggregateFunctionPercentileArray(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 679 | 1 | AggregateFunctionPercentileArray(const DataTypes& argument_types_) : Base(argument_types_) {} |
Unexecuted instantiation: _ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Unexecuted instantiation: _ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Unexecuted instantiation: _ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE |
680 | | |
681 | 21 | String get_name() const override { return "percentile_array"; }Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE8get_nameB5cxx11Ev _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE8get_nameB5cxx11Ev Line | Count | Source | 681 | 20 | String get_name() const override { return "percentile_array"; } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE8get_nameB5cxx11Ev Line | Count | Source | 681 | 1 | String get_name() const override { return "percentile_array"; } |
Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE8get_nameB5cxx11Ev |
682 | | |
683 | 0 | DataTypePtr get_return_type() const override { |
684 | 0 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); |
685 | 0 | } Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE15get_return_typeEv Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE15get_return_typeEv Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE15get_return_typeEv Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE15get_return_typeEv Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE15get_return_typeEv Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE15get_return_typeEv Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE15get_return_typeEv |
686 | | |
687 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
688 | 100 | Arena&) const override { |
689 | 100 | const auto& sources = |
690 | 100 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
691 | 100 | const auto& quantile_array = |
692 | 100 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
693 | 100 | const auto& offset_column_data = quantile_array.get_offsets(); |
694 | 100 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( |
695 | 100 | quantile_array.get_data()) |
696 | 100 | .get_null_map_data(); |
697 | 100 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( |
698 | 100 | quantile_array.get_data()) |
699 | 100 | .get_nested_column(); |
700 | 100 | const auto& nested_column_data = |
701 | 100 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); |
702 | | |
703 | 100 | AggregateFunctionPercentileArray::data(place).add( |
704 | 100 | sources.get_element(row_num), nested_column_data.get_data(), null_maps, |
705 | 100 | offset_column_data.data()[row_num] - offset_column_data[(ssize_t)row_num - 1]); |
706 | 100 | } Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE3addEPcPPKNS_7IColumnElRNS_5ArenaE _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 688 | 100 | Arena&) const override { | 689 | 100 | const auto& sources = | 690 | 100 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 691 | 100 | const auto& quantile_array = | 692 | 100 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 693 | 100 | const auto& offset_column_data = quantile_array.get_offsets(); | 694 | 100 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 695 | 100 | quantile_array.get_data()) | 696 | 100 | .get_null_map_data(); | 697 | 100 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 698 | 100 | quantile_array.get_data()) | 699 | 100 | .get_nested_column(); | 700 | 100 | const auto& nested_column_data = | 701 | 100 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 702 | | | 703 | 100 | AggregateFunctionPercentileArray::data(place).add( | 704 | 100 | sources.get_element(row_num), nested_column_data.get_data(), null_maps, | 705 | 100 | offset_column_data.data()[row_num] - offset_column_data[(ssize_t)row_num - 1]); | 706 | 100 | } |
Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE3addEPcPPKNS_7IColumnElRNS_5ArenaE |
707 | | |
708 | 26 | void reset(AggregateDataPtr __restrict place) const override { |
709 | 26 | AggregateFunctionPercentileArray::data(place).reset(); |
710 | 26 | } Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE5resetEPc Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE5resetEPc _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE5resetEPc Line | Count | Source | 708 | 26 | void reset(AggregateDataPtr __restrict place) const override { | 709 | 26 | AggregateFunctionPercentileArray::data(place).reset(); | 710 | 26 | } |
Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE5resetEPc Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE5resetEPc Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE5resetEPc Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE5resetEPc |
711 | | |
712 | | void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, |
713 | 121 | Arena&) const override { |
714 | 121 | AggregateFunctionPercentileArray::data(place).merge( |
715 | 121 | AggregateFunctionPercentileArray::data(rhs)); |
716 | 121 | } Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE5mergeEPcPKcRNS_5ArenaE _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 713 | 121 | Arena&) const override { | 714 | 121 | AggregateFunctionPercentileArray::data(place).merge( | 715 | 121 | AggregateFunctionPercentileArray::data(rhs)); | 716 | 121 | } |
Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE5mergeEPcPKcRNS_5ArenaE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE5mergeEPcPKcRNS_5ArenaE |
717 | | |
718 | 160 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { |
719 | 160 | AggregateFunctionPercentileArray::data(place).write(buf); |
720 | 160 | } Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE9serializeEPKcRNS_14BufferWritableE _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 718 | 160 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 719 | 160 | AggregateFunctionPercentileArray::data(place).write(buf); | 720 | 160 | } |
Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE9serializeEPKcRNS_14BufferWritableE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE9serializeEPKcRNS_14BufferWritableE |
721 | | |
722 | | void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf, |
723 | 121 | Arena&) const override { |
724 | 121 | AggregateFunctionPercentileArray::data(place).read(buf); |
725 | 121 | } Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 723 | 121 | Arena&) const override { | 724 | 121 | AggregateFunctionPercentileArray::data(place).read(buf); | 725 | 121 | } |
Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE |
726 | | |
727 | 0 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
728 | 0 | auto& to_arr = assert_cast<ColumnArray&>(to); |
729 | 0 | auto& to_nested_col = to_arr.get_data(); |
730 | 0 | if (to_nested_col.is_nullable()) { |
731 | 0 | auto col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); |
732 | 0 | AggregateFunctionPercentileArray::data(place).insert_result_into( |
733 | 0 | col_null->get_nested_column()); |
734 | 0 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); |
735 | 0 | } else { |
736 | 0 | AggregateFunctionPercentileArray::data(place).insert_result_into(to_nested_col); |
737 | 0 | } |
738 | 0 | to_arr.get_offsets().push_back(to_nested_col.size()); |
739 | 0 | } Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE18insert_result_intoEPKcRNS_7IColumnE Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE18insert_result_intoEPKcRNS_7IColumnE |
740 | | }; |
741 | | |
742 | | template <PrimitiveType T> |
743 | | class AggregateFunctionPercentileV2 final |
744 | | : public IAggregateFunctionDataHelper<PercentileExactState<T>, |
745 | | AggregateFunctionPercentileV2<T>>, |
746 | | MultiExpression, |
747 | | NullableAggregateFunction { |
748 | | public: |
749 | | using ColVecType = typename PrimitiveTypeTraits<T>::ColumnType; |
750 | | using Base = |
751 | | IAggregateFunctionDataHelper<PercentileExactState<T>, AggregateFunctionPercentileV2<T>>; |
752 | 113 | AggregateFunctionPercentileV2(const DataTypes& argument_types_) : Base(argument_types_) {}_ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE3EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 752 | 8 | AggregateFunctionPercentileV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE4EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 752 | 14 | AggregateFunctionPercentileV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE5EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 752 | 28 | AggregateFunctionPercentileV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE6EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 752 | 42 | AggregateFunctionPercentileV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE7EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 752 | 2 | AggregateFunctionPercentileV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE8EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 752 | 4 | AggregateFunctionPercentileV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE9EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 752 | 15 | AggregateFunctionPercentileV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
|
753 | | |
754 | 35 | String get_name() const override { return "percentile_v2"; }_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE3EE8get_nameB5cxx11Ev Line | Count | Source | 754 | 4 | String get_name() const override { return "percentile_v2"; } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE4EE8get_nameB5cxx11Ev Line | Count | Source | 754 | 18 | String get_name() const override { return "percentile_v2"; } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE5EE8get_nameB5cxx11Ev Line | Count | Source | 754 | 1 | String get_name() const override { return "percentile_v2"; } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE6EE8get_nameB5cxx11Ev Line | Count | Source | 754 | 2 | String get_name() const override { return "percentile_v2"; } |
Unexecuted instantiation: _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE7EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE8EE8get_nameB5cxx11Ev _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE9EE8get_nameB5cxx11Ev Line | Count | Source | 754 | 10 | String get_name() const override { return "percentile_v2"; } |
|
755 | | |
756 | 226 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); }_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE3EE15get_return_typeEv Line | Count | Source | 756 | 16 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE4EE15get_return_typeEv Line | Count | Source | 756 | 34 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE5EE15get_return_typeEv Line | Count | Source | 756 | 53 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE6EE15get_return_typeEv Line | Count | Source | 756 | 72 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE7EE15get_return_typeEv Line | Count | Source | 756 | 4 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE8EE15get_return_typeEv Line | Count | Source | 756 | 8 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE9EE15get_return_typeEv Line | Count | Source | 756 | 39 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
|
757 | | |
758 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
759 | 821 | Arena&) const override { |
760 | 821 | const auto& sources = |
761 | 821 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
762 | 821 | const auto& quantile = |
763 | 821 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
764 | 821 | AggregateFunctionPercentileV2::data(place).add_single_range(&sources.get_data()[row_num], 1, |
765 | 821 | quantile.get_data()[0]); |
766 | 821 | } _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE3EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 759 | 31 | Arena&) const override { | 760 | 31 | const auto& sources = | 761 | 31 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 762 | 31 | const auto& quantile = | 763 | 31 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 764 | 31 | AggregateFunctionPercentileV2::data(place).add_single_range(&sources.get_data()[row_num], 1, | 765 | 31 | quantile.get_data()[0]); | 766 | 31 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE4EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 759 | 311 | Arena&) const override { | 760 | 311 | const auto& sources = | 761 | 311 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 762 | 311 | const auto& quantile = | 763 | 311 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 764 | 311 | AggregateFunctionPercentileV2::data(place).add_single_range(&sources.get_data()[row_num], 1, | 765 | 311 | quantile.get_data()[0]); | 766 | 311 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE5EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 759 | 229 | Arena&) const override { | 760 | 229 | const auto& sources = | 761 | 229 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 762 | 229 | const auto& quantile = | 763 | 229 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 764 | 229 | AggregateFunctionPercentileV2::data(place).add_single_range(&sources.get_data()[row_num], 1, | 765 | 229 | quantile.get_data()[0]); | 766 | 229 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE6EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 759 | 192 | Arena&) const override { | 760 | 192 | const auto& sources = | 761 | 192 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 762 | 192 | const auto& quantile = | 763 | 192 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 764 | 192 | AggregateFunctionPercentileV2::data(place).add_single_range(&sources.get_data()[row_num], 1, | 765 | 192 | quantile.get_data()[0]); | 766 | 192 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE7EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 759 | 3 | Arena&) const override { | 760 | 3 | const auto& sources = | 761 | 3 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 762 | 3 | const auto& quantile = | 763 | 3 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 764 | 3 | AggregateFunctionPercentileV2::data(place).add_single_range(&sources.get_data()[row_num], 1, | 765 | 3 | quantile.get_data()[0]); | 766 | 3 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE8EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 759 | 6 | Arena&) const override { | 760 | 6 | const auto& sources = | 761 | 6 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 762 | 6 | const auto& quantile = | 763 | 6 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 764 | 6 | AggregateFunctionPercentileV2::data(place).add_single_range(&sources.get_data()[row_num], 1, | 765 | 6 | quantile.get_data()[0]); | 766 | 6 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE9EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 759 | 49 | Arena&) const override { | 760 | 49 | const auto& sources = | 761 | 49 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 762 | 49 | const auto& quantile = | 763 | 49 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 764 | 49 | AggregateFunctionPercentileV2::data(place).add_single_range(&sources.get_data()[row_num], 1, | 765 | 49 | quantile.get_data()[0]); | 766 | 49 | } |
|
767 | | |
768 | | void add_batch_single_place(size_t batch_size, AggregateDataPtr place, const IColumn** columns, |
769 | 7 | Arena&) const override { |
770 | 7 | const auto& sources = |
771 | 7 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
772 | 7 | const auto& quantile = |
773 | 7 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
774 | 7 | DCHECK_EQ(sources.get_data().size(), batch_size); |
775 | 7 | AggregateFunctionPercentileV2::data(place).add_single_range( |
776 | 7 | sources.get_data().data(), batch_size, quantile.get_data()[0]); |
777 | 7 | } Unexecuted instantiation: _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE3EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE4EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE5EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Line | Count | Source | 769 | 2 | Arena&) const override { | 770 | 2 | const auto& sources = | 771 | 2 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 772 | 2 | const auto& quantile = | 773 | 2 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 774 | | DCHECK_EQ(sources.get_data().size(), batch_size); | 775 | 2 | AggregateFunctionPercentileV2::data(place).add_single_range( | 776 | 2 | sources.get_data().data(), batch_size, quantile.get_data()[0]); | 777 | 2 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE6EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Line | Count | Source | 769 | 5 | Arena&) const override { | 770 | 5 | const auto& sources = | 771 | 5 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 772 | 5 | const auto& quantile = | 773 | 5 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 774 | | DCHECK_EQ(sources.get_data().size(), batch_size); | 775 | 5 | AggregateFunctionPercentileV2::data(place).add_single_range( | 776 | 5 | sources.get_data().data(), batch_size, quantile.get_data()[0]); | 777 | 5 | } |
Unexecuted instantiation: _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE7EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE8EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE9EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE |
778 | | |
779 | | void add_batch_range(size_t batch_begin, size_t batch_end, AggregateDataPtr place, |
780 | 0 | const IColumn** columns, Arena&, bool has_null) override { |
781 | 0 | const auto& sources = |
782 | 0 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
783 | 0 | const auto& quantile = |
784 | 0 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
785 | 0 | DCHECK(!has_null); |
786 | 0 | AggregateFunctionPercentileV2::data(place).add_single_range( |
787 | 0 | sources.get_data().data() + batch_begin, batch_end - batch_begin + 1, |
788 | 0 | quantile.get_data()[0]); |
789 | 0 | } Unexecuted instantiation: _ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE3EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE4EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE5EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE6EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE7EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE8EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZN5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE9EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb |
790 | | |
791 | 117 | void reset(AggregateDataPtr __restrict place) const override { |
792 | 117 | AggregateFunctionPercentileV2::data(place).reset(); |
793 | 117 | } Unexecuted instantiation: _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE3EE5resetEPc _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE4EE5resetEPc Line | Count | Source | 791 | 105 | void reset(AggregateDataPtr __restrict place) const override { | 792 | 105 | AggregateFunctionPercentileV2::data(place).reset(); | 793 | 105 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE5EE5resetEPc Line | Count | Source | 791 | 9 | void reset(AggregateDataPtr __restrict place) const override { | 792 | 9 | AggregateFunctionPercentileV2::data(place).reset(); | 793 | 9 | } |
Unexecuted instantiation: _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE6EE5resetEPc Unexecuted instantiation: _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE7EE5resetEPc Unexecuted instantiation: _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE8EE5resetEPc _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE9EE5resetEPc Line | Count | Source | 791 | 3 | void reset(AggregateDataPtr __restrict place) const override { | 792 | 3 | AggregateFunctionPercentileV2::data(place).reset(); | 793 | 3 | } |
|
794 | | |
795 | | void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, |
796 | 142 | Arena&) const override { |
797 | 142 | AggregateFunctionPercentileV2::data(place).merge(AggregateFunctionPercentileV2::data(rhs)); |
798 | 142 | } _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE3EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 796 | 2 | Arena&) const override { | 797 | 2 | AggregateFunctionPercentileV2::data(place).merge(AggregateFunctionPercentileV2::data(rhs)); | 798 | 2 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE4EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 796 | 2 | Arena&) const override { | 797 | 2 | AggregateFunctionPercentileV2::data(place).merge(AggregateFunctionPercentileV2::data(rhs)); | 798 | 2 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE5EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 796 | 30 | Arena&) const override { | 797 | 30 | AggregateFunctionPercentileV2::data(place).merge(AggregateFunctionPercentileV2::data(rhs)); | 798 | 30 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE6EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 796 | 99 | Arena&) const override { | 797 | 99 | AggregateFunctionPercentileV2::data(place).merge(AggregateFunctionPercentileV2::data(rhs)); | 798 | 99 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE7EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 796 | 2 | Arena&) const override { | 797 | 2 | AggregateFunctionPercentileV2::data(place).merge(AggregateFunctionPercentileV2::data(rhs)); | 798 | 2 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE8EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 796 | 3 | Arena&) const override { | 797 | 3 | AggregateFunctionPercentileV2::data(place).merge(AggregateFunctionPercentileV2::data(rhs)); | 798 | 3 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE9EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 796 | 4 | Arena&) const override { | 797 | 4 | AggregateFunctionPercentileV2::data(place).merge(AggregateFunctionPercentileV2::data(rhs)); | 798 | 4 | } |
|
799 | | |
800 | 142 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { |
801 | 142 | AggregateFunctionPercentileV2::data(place).write(buf); |
802 | 142 | } _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE3EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 800 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 801 | 2 | AggregateFunctionPercentileV2::data(place).write(buf); | 802 | 2 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE4EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 800 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 801 | 2 | AggregateFunctionPercentileV2::data(place).write(buf); | 802 | 2 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE5EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 800 | 30 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 801 | 30 | AggregateFunctionPercentileV2::data(place).write(buf); | 802 | 30 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE6EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 800 | 99 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 801 | 99 | AggregateFunctionPercentileV2::data(place).write(buf); | 802 | 99 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE7EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 800 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 801 | 2 | AggregateFunctionPercentileV2::data(place).write(buf); | 802 | 2 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE8EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 800 | 3 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 801 | 3 | AggregateFunctionPercentileV2::data(place).write(buf); | 802 | 3 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE9EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 800 | 4 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 801 | 4 | AggregateFunctionPercentileV2::data(place).write(buf); | 802 | 4 | } |
|
803 | | |
804 | | void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf, |
805 | 142 | Arena&) const override { |
806 | 142 | AggregateFunctionPercentileV2::data(place).read(buf); |
807 | 142 | } _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE3EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 805 | 2 | Arena&) const override { | 806 | 2 | AggregateFunctionPercentileV2::data(place).read(buf); | 807 | 2 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE4EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 805 | 2 | Arena&) const override { | 806 | 2 | AggregateFunctionPercentileV2::data(place).read(buf); | 807 | 2 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE5EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 805 | 30 | Arena&) const override { | 806 | 30 | AggregateFunctionPercentileV2::data(place).read(buf); | 807 | 30 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE6EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 805 | 99 | Arena&) const override { | 806 | 99 | AggregateFunctionPercentileV2::data(place).read(buf); | 807 | 99 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE7EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 805 | 2 | Arena&) const override { | 806 | 2 | AggregateFunctionPercentileV2::data(place).read(buf); | 807 | 2 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE8EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 805 | 3 | Arena&) const override { | 806 | 3 | AggregateFunctionPercentileV2::data(place).read(buf); | 807 | 3 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE9EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 805 | 4 | Arena&) const override { | 806 | 4 | AggregateFunctionPercentileV2::data(place).read(buf); | 807 | 4 | } |
|
808 | | |
809 | 366 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
810 | 366 | auto& col = assert_cast<ColumnFloat64&>(to); |
811 | 366 | col.insert_value(AggregateFunctionPercentileV2::data(place).get()); |
812 | 366 | } _ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE3EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 809 | 30 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 810 | 30 | auto& col = assert_cast<ColumnFloat64&>(to); | 811 | 30 | col.insert_value(AggregateFunctionPercentileV2::data(place).get()); | 812 | 30 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE4EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 809 | 177 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 810 | 177 | auto& col = assert_cast<ColumnFloat64&>(to); | 811 | 177 | col.insert_value(AggregateFunctionPercentileV2::data(place).get()); | 812 | 177 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE5EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 809 | 54 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 810 | 54 | auto& col = assert_cast<ColumnFloat64&>(to); | 811 | 54 | col.insert_value(AggregateFunctionPercentileV2::data(place).get()); | 812 | 54 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE6EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 809 | 67 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 810 | 67 | auto& col = assert_cast<ColumnFloat64&>(to); | 811 | 67 | col.insert_value(AggregateFunctionPercentileV2::data(place).get()); | 812 | 67 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE7EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 809 | 1 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 810 | 1 | auto& col = assert_cast<ColumnFloat64&>(to); | 811 | 1 | col.insert_value(AggregateFunctionPercentileV2::data(place).get()); | 812 | 1 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE8EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 809 | 2 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 810 | 2 | auto& col = assert_cast<ColumnFloat64&>(to); | 811 | 2 | col.insert_value(AggregateFunctionPercentileV2::data(place).get()); | 812 | 2 | } |
_ZNK5doris29AggregateFunctionPercentileV2ILNS_13PrimitiveTypeE9EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 809 | 35 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 810 | 35 | auto& col = assert_cast<ColumnFloat64&>(to); | 811 | 35 | col.insert_value(AggregateFunctionPercentileV2::data(place).get()); | 812 | 35 | } |
|
813 | | }; |
814 | | |
815 | | template <PrimitiveType T> |
816 | | class AggregateFunctionPercentileArrayV2 final |
817 | | : public IAggregateFunctionDataHelper<PercentileExactState<T>, |
818 | | AggregateFunctionPercentileArrayV2<T>>, |
819 | | MultiExpression, |
820 | | NotNullableAggregateFunction { |
821 | | public: |
822 | | using ColVecType = typename PrimitiveTypeTraits<T>::ColumnType; |
823 | | using Base = IAggregateFunctionDataHelper<PercentileExactState<T>, |
824 | | AggregateFunctionPercentileArrayV2<T>>; |
825 | 91 | AggregateFunctionPercentileArrayV2(const DataTypes& argument_types_) : Base(argument_types_) {}_ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE3EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 825 | 4 | AggregateFunctionPercentileArrayV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE4EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 825 | 6 | AggregateFunctionPercentileArrayV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE5EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 825 | 45 | AggregateFunctionPercentileArrayV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE6EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 825 | 13 | AggregateFunctionPercentileArrayV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE7EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 825 | 4 | AggregateFunctionPercentileArrayV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE8EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 825 | 2 | AggregateFunctionPercentileArrayV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE9EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 825 | 17 | AggregateFunctionPercentileArrayV2(const DataTypes& argument_types_) : Base(argument_types_) {} |
|
826 | | |
827 | 11 | String get_name() const override { return "percentile_array_v2"; }Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE3EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE4EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE5EE8get_nameB5cxx11Ev _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE6EE8get_nameB5cxx11Ev Line | Count | Source | 827 | 1 | String get_name() const override { return "percentile_array_v2"; } |
Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE7EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE8EE8get_nameB5cxx11Ev _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE9EE8get_nameB5cxx11Ev Line | Count | Source | 827 | 10 | String get_name() const override { return "percentile_array_v2"; } |
|
828 | | |
829 | 174 | DataTypePtr get_return_type() const override { |
830 | 174 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); |
831 | 174 | } _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE3EE15get_return_typeEv Line | Count | Source | 829 | 8 | DataTypePtr get_return_type() const override { | 830 | 8 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 831 | 8 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE4EE15get_return_typeEv Line | Count | Source | 829 | 12 | DataTypePtr get_return_type() const override { | 830 | 12 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 831 | 12 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE5EE15get_return_typeEv Line | Count | Source | 829 | 81 | DataTypePtr get_return_type() const override { | 830 | 81 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 831 | 81 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE6EE15get_return_typeEv Line | Count | Source | 829 | 21 | DataTypePtr get_return_type() const override { | 830 | 21 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 831 | 21 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE7EE15get_return_typeEv Line | Count | Source | 829 | 8 | DataTypePtr get_return_type() const override { | 830 | 8 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 831 | 8 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE8EE15get_return_typeEv Line | Count | Source | 829 | 4 | DataTypePtr get_return_type() const override { | 830 | 4 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 831 | 4 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE9EE15get_return_typeEv Line | Count | Source | 829 | 40 | DataTypePtr get_return_type() const override { | 830 | 40 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 831 | 40 | } |
|
832 | | |
833 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
834 | 669 | Arena&) const override { |
835 | 669 | const auto& sources = |
836 | 669 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
837 | 669 | const auto& quantile_array = |
838 | 669 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
839 | 669 | const auto& offset_column_data = quantile_array.get_offsets(); |
840 | 669 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( |
841 | 669 | quantile_array.get_data()) |
842 | 669 | .get_null_map_data(); |
843 | 669 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( |
844 | 669 | quantile_array.get_data()) |
845 | 669 | .get_nested_column(); |
846 | 669 | const auto& nested_column_data = |
847 | 669 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); |
848 | 669 | size_t start = row_num == 0 ? 0 : offset_column_data[row_num - 1]; |
849 | 669 | AggregateFunctionPercentileArrayV2::data(place).add_many_range( |
850 | 669 | &sources.get_data()[row_num], 1, nested_column_data.get_data(), null_maps, start, |
851 | 669 | cast_set<int64_t>(offset_column_data[row_num] - start)); |
852 | 669 | } _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE3EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 834 | 15 | Arena&) const override { | 835 | 15 | const auto& sources = | 836 | 15 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 837 | 15 | const auto& quantile_array = | 838 | 15 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 839 | 15 | const auto& offset_column_data = quantile_array.get_offsets(); | 840 | 15 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 841 | 15 | quantile_array.get_data()) | 842 | 15 | .get_null_map_data(); | 843 | 15 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 844 | 15 | quantile_array.get_data()) | 845 | 15 | .get_nested_column(); | 846 | 15 | const auto& nested_column_data = | 847 | 15 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 848 | 15 | size_t start = row_num == 0 ? 0 : offset_column_data[row_num - 1]; | 849 | 15 | AggregateFunctionPercentileArrayV2::data(place).add_many_range( | 850 | 15 | &sources.get_data()[row_num], 1, nested_column_data.get_data(), null_maps, start, | 851 | 15 | cast_set<int64_t>(offset_column_data[row_num] - start)); | 852 | 15 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE4EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 834 | 30 | Arena&) const override { | 835 | 30 | const auto& sources = | 836 | 30 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 837 | 30 | const auto& quantile_array = | 838 | 30 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 839 | 30 | const auto& offset_column_data = quantile_array.get_offsets(); | 840 | 30 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 841 | 30 | quantile_array.get_data()) | 842 | 30 | .get_null_map_data(); | 843 | 30 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 844 | 30 | quantile_array.get_data()) | 845 | 30 | .get_nested_column(); | 846 | 30 | const auto& nested_column_data = | 847 | 30 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 848 | 30 | size_t start = row_num == 0 ? 0 : offset_column_data[row_num - 1]; | 849 | 30 | AggregateFunctionPercentileArrayV2::data(place).add_many_range( | 850 | 30 | &sources.get_data()[row_num], 1, nested_column_data.get_data(), null_maps, start, | 851 | 30 | cast_set<int64_t>(offset_column_data[row_num] - start)); | 852 | 30 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE5EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 834 | 484 | Arena&) const override { | 835 | 484 | const auto& sources = | 836 | 484 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 837 | 484 | const auto& quantile_array = | 838 | 484 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 839 | 484 | const auto& offset_column_data = quantile_array.get_offsets(); | 840 | 484 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 841 | 484 | quantile_array.get_data()) | 842 | 484 | .get_null_map_data(); | 843 | 484 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 844 | 484 | quantile_array.get_data()) | 845 | 484 | .get_nested_column(); | 846 | 484 | const auto& nested_column_data = | 847 | 484 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 848 | 484 | size_t start = row_num == 0 ? 0 : offset_column_data[row_num - 1]; | 849 | 484 | AggregateFunctionPercentileArrayV2::data(place).add_many_range( | 850 | 484 | &sources.get_data()[row_num], 1, nested_column_data.get_data(), null_maps, start, | 851 | 484 | cast_set<int64_t>(offset_column_data[row_num] - start)); | 852 | 484 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE6EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 834 | 33 | Arena&) const override { | 835 | 33 | const auto& sources = | 836 | 33 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 837 | 33 | const auto& quantile_array = | 838 | 33 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 839 | 33 | const auto& offset_column_data = quantile_array.get_offsets(); | 840 | 33 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 841 | 33 | quantile_array.get_data()) | 842 | 33 | .get_null_map_data(); | 843 | 33 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 844 | 33 | quantile_array.get_data()) | 845 | 33 | .get_nested_column(); | 846 | 33 | const auto& nested_column_data = | 847 | 33 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 848 | 33 | size_t start = row_num == 0 ? 0 : offset_column_data[row_num - 1]; | 849 | 33 | AggregateFunctionPercentileArrayV2::data(place).add_many_range( | 850 | 33 | &sources.get_data()[row_num], 1, nested_column_data.get_data(), null_maps, start, | 851 | 33 | cast_set<int64_t>(offset_column_data[row_num] - start)); | 852 | 33 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE7EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 834 | 15 | Arena&) const override { | 835 | 15 | const auto& sources = | 836 | 15 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 837 | 15 | const auto& quantile_array = | 838 | 15 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 839 | 15 | const auto& offset_column_data = quantile_array.get_offsets(); | 840 | 15 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 841 | 15 | quantile_array.get_data()) | 842 | 15 | .get_null_map_data(); | 843 | 15 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 844 | 15 | quantile_array.get_data()) | 845 | 15 | .get_nested_column(); | 846 | 15 | const auto& nested_column_data = | 847 | 15 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 848 | 15 | size_t start = row_num == 0 ? 0 : offset_column_data[row_num - 1]; | 849 | 15 | AggregateFunctionPercentileArrayV2::data(place).add_many_range( | 850 | 15 | &sources.get_data()[row_num], 1, nested_column_data.get_data(), null_maps, start, | 851 | 15 | cast_set<int64_t>(offset_column_data[row_num] - start)); | 852 | 15 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE8EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 834 | 3 | Arena&) const override { | 835 | 3 | const auto& sources = | 836 | 3 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 837 | 3 | const auto& quantile_array = | 838 | 3 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 839 | 3 | const auto& offset_column_data = quantile_array.get_offsets(); | 840 | 3 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 841 | 3 | quantile_array.get_data()) | 842 | 3 | .get_null_map_data(); | 843 | 3 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 844 | 3 | quantile_array.get_data()) | 845 | 3 | .get_nested_column(); | 846 | 3 | const auto& nested_column_data = | 847 | 3 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 848 | 3 | size_t start = row_num == 0 ? 0 : offset_column_data[row_num - 1]; | 849 | 3 | AggregateFunctionPercentileArrayV2::data(place).add_many_range( | 850 | 3 | &sources.get_data()[row_num], 1, nested_column_data.get_data(), null_maps, start, | 851 | 3 | cast_set<int64_t>(offset_column_data[row_num] - start)); | 852 | 3 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE9EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 834 | 89 | Arena&) const override { | 835 | 89 | const auto& sources = | 836 | 89 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 837 | 89 | const auto& quantile_array = | 838 | 89 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 839 | 89 | const auto& offset_column_data = quantile_array.get_offsets(); | 840 | 89 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 841 | 89 | quantile_array.get_data()) | 842 | 89 | .get_null_map_data(); | 843 | 89 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 844 | 89 | quantile_array.get_data()) | 845 | 89 | .get_nested_column(); | 846 | 89 | const auto& nested_column_data = | 847 | 89 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 848 | 89 | size_t start = row_num == 0 ? 0 : offset_column_data[row_num - 1]; | 849 | 89 | AggregateFunctionPercentileArrayV2::data(place).add_many_range( | 850 | 89 | &sources.get_data()[row_num], 1, nested_column_data.get_data(), null_maps, start, | 851 | 89 | cast_set<int64_t>(offset_column_data[row_num] - start)); | 852 | 89 | } |
|
853 | | |
854 | | void add_batch_single_place(size_t batch_size, AggregateDataPtr place, const IColumn** columns, |
855 | 1 | Arena&) const override { |
856 | 1 | const auto& sources = |
857 | 1 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
858 | 1 | const auto& quantile_array = |
859 | 1 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
860 | 1 | const auto& offset_column_data = quantile_array.get_offsets(); |
861 | 1 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( |
862 | 1 | quantile_array.get_data()) |
863 | 1 | .get_null_map_data(); |
864 | 1 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( |
865 | 1 | quantile_array.get_data()) |
866 | 1 | .get_nested_column(); |
867 | 1 | const auto& nested_column_data = |
868 | 1 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); |
869 | 1 | DCHECK_EQ(sources.get_data().size(), batch_size); |
870 | 1 | AggregateFunctionPercentileArrayV2::data(place).add_many_range( |
871 | 1 | sources.get_data().data(), batch_size, nested_column_data.get_data(), null_maps, 0, |
872 | 1 | cast_set<int64_t>(offset_column_data[0])); |
873 | 1 | } Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE3EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE4EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE5EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Line | Count | Source | 855 | 1 | Arena&) const override { | 856 | 1 | const auto& sources = | 857 | 1 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 858 | 1 | const auto& quantile_array = | 859 | 1 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 860 | 1 | const auto& offset_column_data = quantile_array.get_offsets(); | 861 | 1 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 862 | 1 | quantile_array.get_data()) | 863 | 1 | .get_null_map_data(); | 864 | 1 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 865 | 1 | quantile_array.get_data()) | 866 | 1 | .get_nested_column(); | 867 | 1 | const auto& nested_column_data = | 868 | 1 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 869 | | DCHECK_EQ(sources.get_data().size(), batch_size); | 870 | 1 | AggregateFunctionPercentileArrayV2::data(place).add_many_range( | 871 | 1 | sources.get_data().data(), batch_size, nested_column_data.get_data(), null_maps, 0, | 872 | 1 | cast_set<int64_t>(offset_column_data[0])); | 873 | 1 | } |
Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE6EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE7EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE8EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE9EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE |
874 | | |
875 | | void add_batch_range(size_t batch_begin, size_t batch_end, AggregateDataPtr place, |
876 | 0 | const IColumn** columns, Arena&, bool has_null) override { |
877 | 0 | const auto& sources = |
878 | 0 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
879 | 0 | const auto& quantile_array = |
880 | 0 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
881 | 0 | const auto& offset_column_data = quantile_array.get_offsets(); |
882 | 0 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( |
883 | 0 | quantile_array.get_data()) |
884 | 0 | .get_null_map_data(); |
885 | 0 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( |
886 | 0 | quantile_array.get_data()) |
887 | 0 | .get_nested_column(); |
888 | 0 | const auto& nested_column_data = |
889 | 0 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); |
890 | 0 | DCHECK(!has_null); |
891 | 0 | size_t start = batch_begin == 0 ? 0 : offset_column_data[batch_begin - 1]; |
892 | 0 | AggregateFunctionPercentileArrayV2::data(place).add_many_range( |
893 | 0 | sources.get_data().data() + batch_begin, batch_end - batch_begin + 1, |
894 | 0 | nested_column_data.get_data(), null_maps, start, |
895 | 0 | cast_set<int64_t>(offset_column_data[batch_begin] - start)); |
896 | 0 | } Unexecuted instantiation: _ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE3EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE4EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE5EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE6EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE7EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE8EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb Unexecuted instantiation: _ZN5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE9EE15add_batch_rangeEmmPcPPKNS_7IColumnERNS_5ArenaEb |
897 | | |
898 | 3 | void reset(AggregateDataPtr __restrict place) const override { |
899 | 3 | AggregateFunctionPercentileArrayV2::data(place).reset(); |
900 | 3 | } Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE3EE5resetEPc Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE4EE5resetEPc Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE5EE5resetEPc Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE6EE5resetEPc Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE7EE5resetEPc Unexecuted instantiation: _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE8EE5resetEPc _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE9EE5resetEPc Line | Count | Source | 898 | 3 | void reset(AggregateDataPtr __restrict place) const override { | 899 | 3 | AggregateFunctionPercentileArrayV2::data(place).reset(); | 900 | 3 | } |
|
901 | | |
902 | | void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, |
903 | 225 | Arena&) const override { |
904 | 225 | AggregateFunctionPercentileArrayV2::data(place).merge( |
905 | 225 | AggregateFunctionPercentileArrayV2::data(rhs)); |
906 | 225 | } _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE3EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 903 | 2 | Arena&) const override { | 904 | 2 | AggregateFunctionPercentileArrayV2::data(place).merge( | 905 | 2 | AggregateFunctionPercentileArrayV2::data(rhs)); | 906 | 2 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE4EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 903 | 6 | Arena&) const override { | 904 | 6 | AggregateFunctionPercentileArrayV2::data(place).merge( | 905 | 6 | AggregateFunctionPercentileArrayV2::data(rhs)); | 906 | 6 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE5EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 903 | 168 | Arena&) const override { | 904 | 168 | AggregateFunctionPercentileArrayV2::data(place).merge( | 905 | 168 | AggregateFunctionPercentileArrayV2::data(rhs)); | 906 | 168 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE6EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 903 | 3 | Arena&) const override { | 904 | 3 | AggregateFunctionPercentileArrayV2::data(place).merge( | 905 | 3 | AggregateFunctionPercentileArrayV2::data(rhs)); | 906 | 3 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE7EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 903 | 2 | Arena&) const override { | 904 | 2 | AggregateFunctionPercentileArrayV2::data(place).merge( | 905 | 2 | AggregateFunctionPercentileArrayV2::data(rhs)); | 906 | 2 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE8EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 903 | 2 | Arena&) const override { | 904 | 2 | AggregateFunctionPercentileArrayV2::data(place).merge( | 905 | 2 | AggregateFunctionPercentileArrayV2::data(rhs)); | 906 | 2 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE9EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 903 | 42 | Arena&) const override { | 904 | 42 | AggregateFunctionPercentileArrayV2::data(place).merge( | 905 | 42 | AggregateFunctionPercentileArrayV2::data(rhs)); | 906 | 42 | } |
|
907 | | |
908 | 225 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { |
909 | 225 | AggregateFunctionPercentileArrayV2::data(place).write(buf); |
910 | 225 | } _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE3EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 908 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 909 | 2 | AggregateFunctionPercentileArrayV2::data(place).write(buf); | 910 | 2 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE4EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 908 | 6 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 909 | 6 | AggregateFunctionPercentileArrayV2::data(place).write(buf); | 910 | 6 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE5EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 908 | 168 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 909 | 168 | AggregateFunctionPercentileArrayV2::data(place).write(buf); | 910 | 168 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE6EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 908 | 3 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 909 | 3 | AggregateFunctionPercentileArrayV2::data(place).write(buf); | 910 | 3 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE7EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 908 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 909 | 2 | AggregateFunctionPercentileArrayV2::data(place).write(buf); | 910 | 2 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE8EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 908 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 909 | 2 | AggregateFunctionPercentileArrayV2::data(place).write(buf); | 910 | 2 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE9EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 908 | 42 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 909 | 42 | AggregateFunctionPercentileArrayV2::data(place).write(buf); | 910 | 42 | } |
|
911 | | |
912 | | void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf, |
913 | 225 | Arena&) const override { |
914 | 225 | AggregateFunctionPercentileArrayV2::data(place).read(buf); |
915 | 225 | } _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE3EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 913 | 2 | Arena&) const override { | 914 | 2 | AggregateFunctionPercentileArrayV2::data(place).read(buf); | 915 | 2 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE4EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 913 | 6 | Arena&) const override { | 914 | 6 | AggregateFunctionPercentileArrayV2::data(place).read(buf); | 915 | 6 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE5EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 913 | 168 | Arena&) const override { | 914 | 168 | AggregateFunctionPercentileArrayV2::data(place).read(buf); | 915 | 168 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE6EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 913 | 3 | Arena&) const override { | 914 | 3 | AggregateFunctionPercentileArrayV2::data(place).read(buf); | 915 | 3 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE7EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 913 | 2 | Arena&) const override { | 914 | 2 | AggregateFunctionPercentileArrayV2::data(place).read(buf); | 915 | 2 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE8EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 913 | 2 | Arena&) const override { | 914 | 2 | AggregateFunctionPercentileArrayV2::data(place).read(buf); | 915 | 2 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE9EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 913 | 42 | Arena&) const override { | 914 | 42 | AggregateFunctionPercentileArrayV2::data(place).read(buf); | 915 | 42 | } |
|
916 | | |
917 | 260 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
918 | 260 | auto& to_arr = assert_cast<ColumnArray&>(to); |
919 | 260 | auto& to_nested_col = to_arr.get_data(); |
920 | 260 | if (to_nested_col.is_nullable()) { |
921 | 260 | auto* col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); |
922 | 260 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into( |
923 | 260 | col_null->get_nested_column()); |
924 | 260 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); |
925 | 260 | } else { |
926 | 0 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into(to_nested_col); |
927 | 0 | } |
928 | 260 | to_arr.get_offsets().push_back(to_nested_col.size()); |
929 | 260 | } _ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE3EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 917 | 11 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 918 | 11 | auto& to_arr = assert_cast<ColumnArray&>(to); | 919 | 11 | auto& to_nested_col = to_arr.get_data(); | 920 | 11 | if (to_nested_col.is_nullable()) { | 921 | 11 | auto* col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 922 | 11 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into( | 923 | 11 | col_null->get_nested_column()); | 924 | 11 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 925 | 11 | } else { | 926 | 0 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into(to_nested_col); | 927 | 0 | } | 928 | 11 | to_arr.get_offsets().push_back(to_nested_col.size()); | 929 | 11 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE4EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 917 | 12 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 918 | 12 | auto& to_arr = assert_cast<ColumnArray&>(to); | 919 | 12 | auto& to_nested_col = to_arr.get_data(); | 920 | 12 | if (to_nested_col.is_nullable()) { | 921 | 12 | auto* col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 922 | 12 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into( | 923 | 12 | col_null->get_nested_column()); | 924 | 12 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 925 | 12 | } else { | 926 | 0 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into(to_nested_col); | 927 | 0 | } | 928 | 12 | to_arr.get_offsets().push_back(to_nested_col.size()); | 929 | 12 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE5EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 917 | 170 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 918 | 170 | auto& to_arr = assert_cast<ColumnArray&>(to); | 919 | 170 | auto& to_nested_col = to_arr.get_data(); | 920 | 170 | if (to_nested_col.is_nullable()) { | 921 | 170 | auto* col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 922 | 170 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into( | 923 | 170 | col_null->get_nested_column()); | 924 | 170 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 925 | 170 | } else { | 926 | 0 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into(to_nested_col); | 927 | 0 | } | 928 | 170 | to_arr.get_offsets().push_back(to_nested_col.size()); | 929 | 170 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE6EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 917 | 12 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 918 | 12 | auto& to_arr = assert_cast<ColumnArray&>(to); | 919 | 12 | auto& to_nested_col = to_arr.get_data(); | 920 | 12 | if (to_nested_col.is_nullable()) { | 921 | 12 | auto* col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 922 | 12 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into( | 923 | 12 | col_null->get_nested_column()); | 924 | 12 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 925 | 12 | } else { | 926 | 0 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into(to_nested_col); | 927 | 0 | } | 928 | 12 | to_arr.get_offsets().push_back(to_nested_col.size()); | 929 | 12 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE7EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 917 | 11 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 918 | 11 | auto& to_arr = assert_cast<ColumnArray&>(to); | 919 | 11 | auto& to_nested_col = to_arr.get_data(); | 920 | 11 | if (to_nested_col.is_nullable()) { | 921 | 11 | auto* col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 922 | 11 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into( | 923 | 11 | col_null->get_nested_column()); | 924 | 11 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 925 | 11 | } else { | 926 | 0 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into(to_nested_col); | 927 | 0 | } | 928 | 11 | to_arr.get_offsets().push_back(to_nested_col.size()); | 929 | 11 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE8EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 917 | 1 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 918 | 1 | auto& to_arr = assert_cast<ColumnArray&>(to); | 919 | 1 | auto& to_nested_col = to_arr.get_data(); | 920 | 1 | if (to_nested_col.is_nullable()) { | 921 | 1 | auto* col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 922 | 1 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into( | 923 | 1 | col_null->get_nested_column()); | 924 | 1 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 925 | 1 | } else { | 926 | 0 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into(to_nested_col); | 927 | 0 | } | 928 | 1 | to_arr.get_offsets().push_back(to_nested_col.size()); | 929 | 1 | } |
_ZNK5doris34AggregateFunctionPercentileArrayV2ILNS_13PrimitiveTypeE9EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 917 | 43 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 918 | 43 | auto& to_arr = assert_cast<ColumnArray&>(to); | 919 | 43 | auto& to_nested_col = to_arr.get_data(); | 920 | 43 | if (to_nested_col.is_nullable()) { | 921 | 43 | auto* col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 922 | 43 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into( | 923 | 43 | col_null->get_nested_column()); | 924 | 43 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 925 | 43 | } else { | 926 | 0 | AggregateFunctionPercentileArrayV2::data(place).insert_result_into(to_nested_col); | 927 | 0 | } | 928 | 43 | to_arr.get_offsets().push_back(to_nested_col.size()); | 929 | 43 | } |
|
930 | | }; |
931 | | |
932 | | } // namespace doris |