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_fwd.h" |
40 | | #include "core/types.h" |
41 | | #include "exprs/aggregate/aggregate_function.h" |
42 | | #include "util/counts.h" |
43 | | #include "util/tdigest.h" |
44 | | |
45 | | namespace doris { |
46 | | |
47 | | class Arena; |
48 | | class BufferReadable; |
49 | | |
50 | 1.73k | inline void check_quantile(double quantile) { |
51 | 1.73k | if (quantile < 0 || quantile > 1) { |
52 | 13 | throw Exception(ErrorCode::INVALID_ARGUMENT, |
53 | 13 | "quantile in func percentile should in [0, 1], but real data is:" + |
54 | 13 | std::to_string(quantile)); |
55 | 13 | } |
56 | 1.73k | } |
57 | | |
58 | | struct PercentileApproxState { |
59 | | static constexpr double INIT_QUANTILE = -1.0; |
60 | 895 | PercentileApproxState() = default; |
61 | 896 | ~PercentileApproxState() = default; |
62 | | |
63 | 876 | void init(double quantile, float compression = 10000) { |
64 | 876 | if (!init_flag) { |
65 | | //https://doris.apache.org/zh-CN/sql-reference/sql-functions/aggregate-functions/percentile_approx.html#description |
66 | | //The compression parameter setting range is [2048, 10000]. |
67 | | //If the value of compression parameter is not specified set, or is outside the range of [2048, 10000], |
68 | | //will use the default value of 10000 |
69 | 431 | if (compression < 2048 || compression > 10000) { |
70 | 0 | compression = 10000; |
71 | 0 | } |
72 | 431 | digest = TDigest::create_unique(compression); |
73 | 431 | check_quantile(quantile); |
74 | 431 | target_quantile = quantile; |
75 | 431 | compressions = compression; |
76 | 431 | init_flag = true; |
77 | 431 | } |
78 | 876 | } |
79 | | |
80 | 321 | void write(BufferWritable& buf) const { |
81 | 321 | buf.write_binary(init_flag); |
82 | 321 | if (!init_flag) { |
83 | 0 | return; |
84 | 0 | } |
85 | | |
86 | 321 | buf.write_binary(target_quantile); |
87 | 321 | buf.write_binary(compressions); |
88 | 321 | uint32_t serialize_size = digest->serialized_size(); |
89 | 321 | std::string result(serialize_size, '0'); |
90 | 321 | DCHECK(digest.get() != nullptr); |
91 | 321 | digest->serialize((uint8_t*)result.c_str()); |
92 | | |
93 | 321 | buf.write_binary(result); |
94 | 321 | } |
95 | | |
96 | 282 | void read(BufferReadable& buf) { |
97 | 282 | buf.read_binary(init_flag); |
98 | 282 | if (!init_flag) { |
99 | 0 | return; |
100 | 0 | } |
101 | | |
102 | 282 | buf.read_binary(target_quantile); |
103 | 282 | buf.read_binary(compressions); |
104 | 282 | std::string str; |
105 | 282 | buf.read_binary(str); |
106 | 282 | digest = TDigest::create_unique(compressions); |
107 | 282 | digest->unserialize((uint8_t*)str.c_str()); |
108 | 282 | } |
109 | | |
110 | 364 | double get() const { |
111 | 364 | if (init_flag) { |
112 | 362 | return digest->quantile(static_cast<float>(target_quantile)); |
113 | 362 | } else { |
114 | 2 | return std::nan(""); |
115 | 2 | } |
116 | 364 | } |
117 | | |
118 | 282 | void merge(const PercentileApproxState& rhs) { |
119 | 282 | if (!rhs.init_flag) { |
120 | 0 | return; |
121 | 0 | } |
122 | 282 | if (init_flag) { |
123 | 131 | DCHECK(digest.get() != nullptr); |
124 | 131 | digest->merge(rhs.digest.get()); |
125 | 151 | } else { |
126 | 151 | digest = TDigest::create_unique(compressions); |
127 | 151 | digest->merge(rhs.digest.get()); |
128 | 151 | init_flag = true; |
129 | 151 | } |
130 | 282 | if (target_quantile == PercentileApproxState::INIT_QUANTILE) { |
131 | 151 | target_quantile = rhs.target_quantile; |
132 | 151 | } |
133 | 282 | } |
134 | | |
135 | 737 | void add(double source) { digest->add(static_cast<float>(source)); } |
136 | | |
137 | 134 | void add_with_weight(double source, double weight) { |
138 | | // the weight should be positive num, as have check the value valid use DCHECK_GT(c._weight, 0); |
139 | 134 | if (weight <= 0) { |
140 | 10 | return; |
141 | 10 | } |
142 | 124 | digest->add(static_cast<float>(source), static_cast<float>(weight)); |
143 | 124 | } |
144 | | |
145 | 155 | void reset() { |
146 | 155 | target_quantile = INIT_QUANTILE; |
147 | 155 | init_flag = false; |
148 | 155 | digest = TDigest::create_unique(compressions); |
149 | 155 | } |
150 | | |
151 | | bool init_flag = false; |
152 | | std::unique_ptr<TDigest> digest; |
153 | | double target_quantile = INIT_QUANTILE; |
154 | | float compressions = 10000; |
155 | | }; |
156 | | |
157 | | class AggregateFunctionPercentileApprox |
158 | | : public IAggregateFunctionDataHelper<PercentileApproxState, |
159 | | AggregateFunctionPercentileApprox> { |
160 | | public: |
161 | | AggregateFunctionPercentileApprox(const DataTypes& argument_types_) |
162 | 655 | : IAggregateFunctionDataHelper<PercentileApproxState, |
163 | 655 | AggregateFunctionPercentileApprox>(argument_types_) {} |
164 | | |
165 | 112 | String get_name() const override { return "percentile_approx"; } |
166 | | |
167 | 155 | void reset(AggregateDataPtr __restrict place) const override { |
168 | 155 | AggregateFunctionPercentileApprox::data(place).reset(); |
169 | 155 | } |
170 | | |
171 | | void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, |
172 | 282 | Arena&) const override { |
173 | 282 | AggregateFunctionPercentileApprox::data(place).merge( |
174 | 282 | AggregateFunctionPercentileApprox::data(rhs)); |
175 | 282 | } |
176 | | |
177 | 321 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { |
178 | 321 | AggregateFunctionPercentileApprox::data(place).write(buf); |
179 | 321 | } |
180 | | |
181 | | void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf, |
182 | 282 | Arena&) const override { |
183 | 282 | AggregateFunctionPercentileApprox::data(place).read(buf); |
184 | 282 | } |
185 | | }; |
186 | | |
187 | | class AggregateFunctionPercentileApproxTwoParams final : public AggregateFunctionPercentileApprox, |
188 | | public MultiExpression, |
189 | | public NullableAggregateFunction { |
190 | | public: |
191 | | AggregateFunctionPercentileApproxTwoParams(const DataTypes& argument_types_) |
192 | 573 | : AggregateFunctionPercentileApprox(argument_types_) {} |
193 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
194 | 304 | Arena&) const override { |
195 | 304 | const auto& sources = |
196 | 304 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
197 | 304 | const auto& quantile = |
198 | 304 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
199 | 304 | this->data(place).init(quantile.get_element(0)); |
200 | 304 | this->data(place).add(sources.get_element(row_num)); |
201 | 304 | } |
202 | | |
203 | 120 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
204 | | |
205 | 102 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
206 | 102 | auto& col = assert_cast<ColumnFloat64&>(to); |
207 | 102 | double result = AggregateFunctionPercentileApprox::data(place).get(); |
208 | | |
209 | 102 | if (std::isnan(result)) { |
210 | 1 | col.insert_default(); |
211 | 101 | } else { |
212 | 101 | col.get_data().push_back(result); |
213 | 101 | } |
214 | 102 | } |
215 | | }; |
216 | | |
217 | | class AggregateFunctionPercentileApproxThreeParams final : public AggregateFunctionPercentileApprox, |
218 | | public MultiExpression, |
219 | | public NullableAggregateFunction { |
220 | | public: |
221 | | AggregateFunctionPercentileApproxThreeParams(const DataTypes& argument_types_) |
222 | 37 | : AggregateFunctionPercentileApprox(argument_types_) {} |
223 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
224 | 438 | Arena&) const override { |
225 | 438 | const auto& sources = |
226 | 438 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
227 | 438 | const auto& quantile = |
228 | 438 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
229 | 438 | const auto& compression = |
230 | 438 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[2]); |
231 | | |
232 | 438 | this->data(place).init(quantile.get_element(0), |
233 | 438 | static_cast<float>(compression.get_element(0))); |
234 | 438 | this->data(place).add(sources.get_element(row_num)); |
235 | 438 | } |
236 | | |
237 | 104 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
238 | | |
239 | 225 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
240 | 225 | auto& col = assert_cast<ColumnFloat64&>(to); |
241 | 225 | double result = AggregateFunctionPercentileApprox::data(place).get(); |
242 | | |
243 | 225 | if (std::isnan(result)) { |
244 | 0 | col.insert_default(); |
245 | 225 | } else { |
246 | 225 | col.get_data().push_back(result); |
247 | 225 | } |
248 | 225 | } |
249 | | }; |
250 | | |
251 | | class AggregateFunctionPercentileApproxWeightedThreeParams final |
252 | | : public AggregateFunctionPercentileApprox, |
253 | | MultiExpression, |
254 | | NullableAggregateFunction { |
255 | | public: |
256 | | AggregateFunctionPercentileApproxWeightedThreeParams(const DataTypes& argument_types_) |
257 | 23 | : AggregateFunctionPercentileApprox(argument_types_) {} |
258 | | |
259 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
260 | 54 | Arena&) const override { |
261 | 54 | const auto& sources = |
262 | 54 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
263 | 54 | const auto& weight = |
264 | 54 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
265 | 54 | const auto& quantile = |
266 | 54 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[2]); |
267 | | |
268 | 54 | this->data(place).init(quantile.get_element(0)); |
269 | 54 | this->data(place).add_with_weight(sources.get_element(row_num), |
270 | 54 | weight.get_element(row_num)); |
271 | 54 | } |
272 | | |
273 | 55 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
274 | | |
275 | 27 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
276 | 27 | auto& col = assert_cast<ColumnFloat64&>(to); |
277 | 27 | double result = AggregateFunctionPercentileApprox::data(place).get(); |
278 | | |
279 | 27 | if (std::isnan(result)) { |
280 | 1 | col.insert_default(); |
281 | 26 | } else { |
282 | 26 | col.get_data().push_back(result); |
283 | 26 | } |
284 | 27 | } |
285 | | }; |
286 | | |
287 | | class AggregateFunctionPercentileApproxWeightedFourParams final |
288 | | : public AggregateFunctionPercentileApprox, |
289 | | MultiExpression, |
290 | | NullableAggregateFunction { |
291 | | public: |
292 | | AggregateFunctionPercentileApproxWeightedFourParams(const DataTypes& argument_types_) |
293 | 22 | : AggregateFunctionPercentileApprox(argument_types_) {} |
294 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
295 | 80 | Arena&) const override { |
296 | 80 | const auto& sources = |
297 | 80 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
298 | 80 | const auto& weight = |
299 | 80 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
300 | 80 | const auto& quantile = |
301 | 80 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[2]); |
302 | 80 | const auto& compression = |
303 | 80 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[3]); |
304 | | |
305 | 80 | this->data(place).init(quantile.get_element(0), |
306 | 80 | static_cast<float>(compression.get_element(0))); |
307 | 80 | this->data(place).add_with_weight(sources.get_element(row_num), |
308 | 80 | weight.get_element(row_num)); |
309 | 80 | } |
310 | | |
311 | 43 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
312 | | |
313 | 10 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
314 | 10 | auto& col = assert_cast<ColumnFloat64&>(to); |
315 | 10 | double result = AggregateFunctionPercentileApprox::data(place).get(); |
316 | | |
317 | 10 | if (std::isnan(result)) { |
318 | 0 | col.insert_default(); |
319 | 10 | } else { |
320 | 10 | col.get_data().push_back(result); |
321 | 10 | } |
322 | 10 | } |
323 | | }; |
324 | | |
325 | | template <PrimitiveType T> |
326 | | struct PercentileState { |
327 | | mutable std::vector<Counts<typename PrimitiveTypeTraits<T>::CppType>> vec_counts; |
328 | | std::vector<double> vec_quantile {-1}; |
329 | | bool inited_flag = false; |
330 | | |
331 | 699 | void write(BufferWritable& buf) const { |
332 | 699 | buf.write_binary(inited_flag); |
333 | 699 | if (!inited_flag) { |
334 | 9 | return; |
335 | 9 | } |
336 | 690 | int size_num = cast_set<int>(vec_quantile.size()); |
337 | 690 | buf.write_binary(size_num); |
338 | 1.19k | for (const auto& quantile : vec_quantile) { |
339 | 1.19k | buf.write_binary(quantile); |
340 | 1.19k | } |
341 | 1.19k | for (auto& counts : vec_counts) { |
342 | 1.19k | counts.serialize(buf); |
343 | 1.19k | } |
344 | 690 | } _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE3EE5writeERNS_14BufferWritableE Line | Count | Source | 331 | 4 | void write(BufferWritable& buf) const { | 332 | 4 | buf.write_binary(inited_flag); | 333 | 4 | if (!inited_flag) { | 334 | 0 | return; | 335 | 0 | } | 336 | 4 | int size_num = cast_set<int>(vec_quantile.size()); | 337 | 4 | buf.write_binary(size_num); | 338 | 6 | for (const auto& quantile : vec_quantile) { | 339 | 6 | buf.write_binary(quantile); | 340 | 6 | } | 341 | 6 | for (auto& counts : vec_counts) { | 342 | 6 | counts.serialize(buf); | 343 | 6 | } | 344 | 4 | } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE4EE5writeERNS_14BufferWritableE Line | Count | Source | 331 | 5 | void write(BufferWritable& buf) const { | 332 | 5 | buf.write_binary(inited_flag); | 333 | 5 | if (!inited_flag) { | 334 | 0 | return; | 335 | 0 | } | 336 | 5 | int size_num = cast_set<int>(vec_quantile.size()); | 337 | 5 | buf.write_binary(size_num); | 338 | 9 | for (const auto& quantile : vec_quantile) { | 339 | 9 | buf.write_binary(quantile); | 340 | 9 | } | 341 | 9 | for (auto& counts : vec_counts) { | 342 | 9 | counts.serialize(buf); | 343 | 9 | } | 344 | 5 | } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE5EE5writeERNS_14BufferWritableE Line | Count | Source | 331 | 329 | void write(BufferWritable& buf) const { | 332 | 329 | buf.write_binary(inited_flag); | 333 | 329 | if (!inited_flag) { | 334 | 9 | return; | 335 | 9 | } | 336 | 320 | int size_num = cast_set<int>(vec_quantile.size()); | 337 | 320 | buf.write_binary(size_num); | 338 | 785 | for (const auto& quantile : vec_quantile) { | 339 | 785 | buf.write_binary(quantile); | 340 | 785 | } | 341 | 785 | for (auto& counts : vec_counts) { | 342 | 785 | counts.serialize(buf); | 343 | 785 | } | 344 | 320 | } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE6EE5writeERNS_14BufferWritableE Line | Count | Source | 331 | 326 | void write(BufferWritable& buf) const { | 332 | 326 | buf.write_binary(inited_flag); | 333 | 326 | if (!inited_flag) { | 334 | 0 | return; | 335 | 0 | } | 336 | 326 | int size_num = cast_set<int>(vec_quantile.size()); | 337 | 326 | buf.write_binary(size_num); | 338 | 330 | for (const auto& quantile : vec_quantile) { | 339 | 330 | buf.write_binary(quantile); | 340 | 330 | } | 341 | 330 | for (auto& counts : vec_counts) { | 342 | 330 | counts.serialize(buf); | 343 | 330 | } | 344 | 326 | } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE7EE5writeERNS_14BufferWritableE Line | Count | Source | 331 | 4 | void write(BufferWritable& buf) const { | 332 | 4 | buf.write_binary(inited_flag); | 333 | 4 | if (!inited_flag) { | 334 | 0 | return; | 335 | 0 | } | 336 | 4 | int size_num = cast_set<int>(vec_quantile.size()); | 337 | 4 | buf.write_binary(size_num); | 338 | 6 | for (const auto& quantile : vec_quantile) { | 339 | 6 | buf.write_binary(quantile); | 340 | 6 | } | 341 | 6 | for (auto& counts : vec_counts) { | 342 | 6 | counts.serialize(buf); | 343 | 6 | } | 344 | 4 | } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE8EE5writeERNS_14BufferWritableE Line | Count | Source | 331 | 4 | void write(BufferWritable& buf) const { | 332 | 4 | buf.write_binary(inited_flag); | 333 | 4 | if (!inited_flag) { | 334 | 0 | return; | 335 | 0 | } | 336 | 4 | int size_num = cast_set<int>(vec_quantile.size()); | 337 | 4 | buf.write_binary(size_num); | 338 | 6 | for (const auto& quantile : vec_quantile) { | 339 | 6 | buf.write_binary(quantile); | 340 | 6 | } | 341 | 6 | for (auto& counts : vec_counts) { | 342 | 6 | counts.serialize(buf); | 343 | 6 | } | 344 | 4 | } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE9EE5writeERNS_14BufferWritableE Line | Count | Source | 331 | 27 | void write(BufferWritable& buf) const { | 332 | 27 | buf.write_binary(inited_flag); | 333 | 27 | if (!inited_flag) { | 334 | 0 | return; | 335 | 0 | } | 336 | 27 | int size_num = cast_set<int>(vec_quantile.size()); | 337 | 27 | buf.write_binary(size_num); | 338 | 56 | for (const auto& quantile : vec_quantile) { | 339 | 56 | buf.write_binary(quantile); | 340 | 56 | } | 341 | 56 | for (auto& counts : vec_counts) { | 342 | 56 | counts.serialize(buf); | 343 | 56 | } | 344 | 27 | } |
|
345 | | |
346 | 660 | void read(BufferReadable& buf) { |
347 | 660 | buf.read_binary(inited_flag); |
348 | 660 | if (!inited_flag) { |
349 | 9 | return; |
350 | 9 | } |
351 | 651 | int size_num = 0; |
352 | 651 | buf.read_binary(size_num); |
353 | 651 | double data = 0.0; |
354 | 651 | vec_quantile.clear(); |
355 | 1.73k | for (int i = 0; i < size_num; ++i) { |
356 | 1.08k | buf.read_binary(data); |
357 | 1.08k | vec_quantile.emplace_back(data); |
358 | 1.08k | } |
359 | 651 | vec_counts.clear(); |
360 | 651 | vec_counts.resize(size_num); |
361 | 1.73k | for (int i = 0; i < size_num; ++i) { |
362 | 1.08k | vec_counts[i].unserialize(buf); |
363 | 1.08k | } |
364 | 651 | } _ZN5doris15PercentileStateILNS_13PrimitiveTypeE3EE4readERNS_14BufferReadableE Line | Count | Source | 346 | 4 | void read(BufferReadable& buf) { | 347 | 4 | buf.read_binary(inited_flag); | 348 | 4 | if (!inited_flag) { | 349 | 0 | return; | 350 | 0 | } | 351 | 4 | int size_num = 0; | 352 | 4 | buf.read_binary(size_num); | 353 | 4 | double data = 0.0; | 354 | 4 | vec_quantile.clear(); | 355 | 10 | for (int i = 0; i < size_num; ++i) { | 356 | 6 | buf.read_binary(data); | 357 | 6 | vec_quantile.emplace_back(data); | 358 | 6 | } | 359 | 4 | vec_counts.clear(); | 360 | 4 | vec_counts.resize(size_num); | 361 | 10 | for (int i = 0; i < size_num; ++i) { | 362 | 6 | vec_counts[i].unserialize(buf); | 363 | 6 | } | 364 | 4 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE4EE4readERNS_14BufferReadableE Line | Count | Source | 346 | 5 | void read(BufferReadable& buf) { | 347 | 5 | buf.read_binary(inited_flag); | 348 | 5 | if (!inited_flag) { | 349 | 0 | return; | 350 | 0 | } | 351 | 5 | int size_num = 0; | 352 | 5 | buf.read_binary(size_num); | 353 | 5 | double data = 0.0; | 354 | 5 | vec_quantile.clear(); | 355 | 14 | for (int i = 0; i < size_num; ++i) { | 356 | 9 | buf.read_binary(data); | 357 | 9 | vec_quantile.emplace_back(data); | 358 | 9 | } | 359 | 5 | vec_counts.clear(); | 360 | 5 | vec_counts.resize(size_num); | 361 | 14 | for (int i = 0; i < size_num; ++i) { | 362 | 9 | vec_counts[i].unserialize(buf); | 363 | 9 | } | 364 | 5 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE5EE4readERNS_14BufferReadableE Line | Count | Source | 346 | 290 | void read(BufferReadable& buf) { | 347 | 290 | buf.read_binary(inited_flag); | 348 | 290 | if (!inited_flag) { | 349 | 9 | return; | 350 | 9 | } | 351 | 281 | int size_num = 0; | 352 | 281 | buf.read_binary(size_num); | 353 | 281 | double data = 0.0; | 354 | 281 | vec_quantile.clear(); | 355 | 949 | for (int i = 0; i < size_num; ++i) { | 356 | 668 | buf.read_binary(data); | 357 | 668 | vec_quantile.emplace_back(data); | 358 | 668 | } | 359 | 281 | vec_counts.clear(); | 360 | 281 | vec_counts.resize(size_num); | 361 | 949 | for (int i = 0; i < size_num; ++i) { | 362 | 668 | vec_counts[i].unserialize(buf); | 363 | 668 | } | 364 | 281 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE6EE4readERNS_14BufferReadableE Line | Count | Source | 346 | 326 | void read(BufferReadable& buf) { | 347 | 326 | buf.read_binary(inited_flag); | 348 | 326 | if (!inited_flag) { | 349 | 0 | return; | 350 | 0 | } | 351 | 326 | int size_num = 0; | 352 | 326 | buf.read_binary(size_num); | 353 | 326 | double data = 0.0; | 354 | 326 | vec_quantile.clear(); | 355 | 656 | for (int i = 0; i < size_num; ++i) { | 356 | 330 | buf.read_binary(data); | 357 | 330 | vec_quantile.emplace_back(data); | 358 | 330 | } | 359 | 326 | vec_counts.clear(); | 360 | 326 | vec_counts.resize(size_num); | 361 | 656 | for (int i = 0; i < size_num; ++i) { | 362 | 330 | vec_counts[i].unserialize(buf); | 363 | 330 | } | 364 | 326 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE7EE4readERNS_14BufferReadableE Line | Count | Source | 346 | 4 | void read(BufferReadable& buf) { | 347 | 4 | buf.read_binary(inited_flag); | 348 | 4 | if (!inited_flag) { | 349 | 0 | return; | 350 | 0 | } | 351 | 4 | int size_num = 0; | 352 | 4 | buf.read_binary(size_num); | 353 | 4 | double data = 0.0; | 354 | 4 | vec_quantile.clear(); | 355 | 10 | for (int i = 0; i < size_num; ++i) { | 356 | 6 | buf.read_binary(data); | 357 | 6 | vec_quantile.emplace_back(data); | 358 | 6 | } | 359 | 4 | vec_counts.clear(); | 360 | 4 | vec_counts.resize(size_num); | 361 | 10 | for (int i = 0; i < size_num; ++i) { | 362 | 6 | vec_counts[i].unserialize(buf); | 363 | 6 | } | 364 | 4 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE8EE4readERNS_14BufferReadableE Line | Count | Source | 346 | 4 | void read(BufferReadable& buf) { | 347 | 4 | buf.read_binary(inited_flag); | 348 | 4 | if (!inited_flag) { | 349 | 0 | return; | 350 | 0 | } | 351 | 4 | int size_num = 0; | 352 | 4 | buf.read_binary(size_num); | 353 | 4 | double data = 0.0; | 354 | 4 | vec_quantile.clear(); | 355 | 10 | for (int i = 0; i < size_num; ++i) { | 356 | 6 | buf.read_binary(data); | 357 | 6 | vec_quantile.emplace_back(data); | 358 | 6 | } | 359 | 4 | vec_counts.clear(); | 360 | 4 | vec_counts.resize(size_num); | 361 | 10 | for (int i = 0; i < size_num; ++i) { | 362 | 6 | vec_counts[i].unserialize(buf); | 363 | 6 | } | 364 | 4 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE9EE4readERNS_14BufferReadableE Line | Count | Source | 346 | 27 | void read(BufferReadable& buf) { | 347 | 27 | buf.read_binary(inited_flag); | 348 | 27 | if (!inited_flag) { | 349 | 0 | return; | 350 | 0 | } | 351 | 27 | int size_num = 0; | 352 | 27 | buf.read_binary(size_num); | 353 | 27 | double data = 0.0; | 354 | 27 | vec_quantile.clear(); | 355 | 83 | for (int i = 0; i < size_num; ++i) { | 356 | 56 | buf.read_binary(data); | 357 | 56 | vec_quantile.emplace_back(data); | 358 | 56 | } | 359 | 27 | vec_counts.clear(); | 360 | 27 | vec_counts.resize(size_num); | 361 | 83 | for (int i = 0; i < size_num; ++i) { | 362 | 56 | vec_counts[i].unserialize(buf); | 363 | 56 | } | 364 | 27 | } |
|
365 | | |
366 | | void add(typename PrimitiveTypeTraits<T>::CppType source, |
367 | 1.69k | const PaddedPODArray<Float64>& quantiles, const NullMap& null_maps, int64_t arg_size) { |
368 | 1.69k | if (!inited_flag) { |
369 | 759 | vec_counts.resize(arg_size); |
370 | 759 | vec_quantile.resize(arg_size, -1); |
371 | 759 | inited_flag = true; |
372 | 2.05k | for (int i = 0; i < arg_size; ++i) { |
373 | | // throw Exception func call percentile_array(id, [1,0,null]) |
374 | 1.30k | if (null_maps[i]) { |
375 | 1 | throw Exception(ErrorCode::INVALID_ARGUMENT, |
376 | 1 | "quantiles in func percentile_array should not have null"); |
377 | 1 | } |
378 | 1.30k | check_quantile(quantiles[i]); |
379 | 1.30k | vec_quantile[i] = quantiles[i]; |
380 | 1.30k | } |
381 | 759 | } |
382 | 4.45k | for (int i = 0; i < arg_size; ++i) { |
383 | 2.75k | vec_counts[i].increment(source); |
384 | 2.75k | } |
385 | 1.69k | } _ZN5doris15PercentileStateILNS_13PrimitiveTypeE3EE3addEaRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl Line | Count | Source | 367 | 46 | const PaddedPODArray<Float64>& quantiles, const NullMap& null_maps, int64_t arg_size) { | 368 | 46 | if (!inited_flag) { | 369 | 18 | vec_counts.resize(arg_size); | 370 | 18 | vec_quantile.resize(arg_size, -1); | 371 | 18 | inited_flag = true; | 372 | 58 | for (int i = 0; i < arg_size; ++i) { | 373 | | // throw Exception func call percentile_array(id, [1,0,null]) | 374 | 40 | if (null_maps[i]) { | 375 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 376 | 0 | "quantiles in func percentile_array should not have null"); | 377 | 0 | } | 378 | 40 | check_quantile(quantiles[i]); | 379 | 40 | vec_quantile[i] = quantiles[i]; | 380 | 40 | } | 381 | 18 | } | 382 | 119 | for (int i = 0; i < arg_size; ++i) { | 383 | 73 | vec_counts[i].increment(source); | 384 | 73 | } | 385 | 46 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE4EE3addEsRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl Line | Count | Source | 367 | 341 | const PaddedPODArray<Float64>& quantiles, const NullMap& null_maps, int64_t arg_size) { | 368 | 341 | if (!inited_flag) { | 369 | 113 | vec_counts.resize(arg_size); | 370 | 113 | vec_quantile.resize(arg_size, -1); | 371 | 113 | inited_flag = true; | 372 | 250 | for (int i = 0; i < arg_size; ++i) { | 373 | | // throw Exception func call percentile_array(id, [1,0,null]) | 374 | 137 | if (null_maps[i]) { | 375 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 376 | 0 | "quantiles in func percentile_array should not have null"); | 377 | 0 | } | 378 | 137 | check_quantile(quantiles[i]); | 379 | 137 | vec_quantile[i] = quantiles[i]; | 380 | 137 | } | 381 | 113 | } | 382 | 739 | for (int i = 0; i < arg_size; ++i) { | 383 | 398 | vec_counts[i].increment(source); | 384 | 398 | } | 385 | 341 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE5EE3addEiRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl Line | Count | Source | 367 | 814 | const PaddedPODArray<Float64>& quantiles, const NullMap& null_maps, int64_t arg_size) { | 368 | 814 | if (!inited_flag) { | 369 | 323 | vec_counts.resize(arg_size); | 370 | 323 | vec_quantile.resize(arg_size, -1); | 371 | 323 | inited_flag = true; | 372 | 1.05k | for (int i = 0; i < arg_size; ++i) { | 373 | | // throw Exception func call percentile_array(id, [1,0,null]) | 374 | 732 | if (null_maps[i]) { | 375 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 376 | 0 | "quantiles in func percentile_array should not have null"); | 377 | 0 | } | 378 | 732 | check_quantile(quantiles[i]); | 379 | 732 | vec_quantile[i] = quantiles[i]; | 380 | 732 | } | 381 | 323 | } | 382 | 2.38k | for (int i = 0; i < arg_size; ++i) { | 383 | 1.57k | vec_counts[i].increment(source); | 384 | 1.57k | } | 385 | 814 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE6EE3addElRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl Line | Count | Source | 367 | 347 | const PaddedPODArray<Float64>& quantiles, const NullMap& null_maps, int64_t arg_size) { | 368 | 347 | if (!inited_flag) { | 369 | 235 | vec_counts.resize(arg_size); | 370 | 235 | vec_quantile.resize(arg_size, -1); | 371 | 235 | inited_flag = true; | 372 | 497 | for (int i = 0; i < arg_size; ++i) { | 373 | | // throw Exception func call percentile_array(id, [1,0,null]) | 374 | 263 | if (null_maps[i]) { | 375 | 1 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 376 | 1 | "quantiles in func percentile_array should not have null"); | 377 | 1 | } | 378 | 262 | check_quantile(quantiles[i]); | 379 | 262 | vec_quantile[i] = quantiles[i]; | 380 | 262 | } | 381 | 235 | } | 382 | 746 | for (int i = 0; i < arg_size; ++i) { | 383 | 400 | vec_counts[i].increment(source); | 384 | 400 | } | 385 | 346 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE7EE3addEnRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl Line | Count | Source | 367 | 18 | const PaddedPODArray<Float64>& quantiles, const NullMap& null_maps, int64_t arg_size) { | 368 | 18 | if (!inited_flag) { | 369 | 14 | vec_counts.resize(arg_size); | 370 | 14 | vec_quantile.resize(arg_size, -1); | 371 | 14 | inited_flag = true; | 372 | 50 | for (int i = 0; i < arg_size; ++i) { | 373 | | // throw Exception func call percentile_array(id, [1,0,null]) | 374 | 36 | if (null_maps[i]) { | 375 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 376 | 0 | "quantiles in func percentile_array should not have null"); | 377 | 0 | } | 378 | 36 | check_quantile(quantiles[i]); | 379 | 36 | vec_quantile[i] = quantiles[i]; | 380 | 36 | } | 381 | 14 | } | 382 | 63 | for (int i = 0; i < arg_size; ++i) { | 383 | 45 | vec_counts[i].increment(source); | 384 | 45 | } | 385 | 18 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE8EE3addEfRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl Line | Count | Source | 367 | 6 | const PaddedPODArray<Float64>& quantiles, const NullMap& null_maps, int64_t arg_size) { | 368 | 6 | if (!inited_flag) { | 369 | 4 | vec_counts.resize(arg_size); | 370 | 4 | vec_quantile.resize(arg_size, -1); | 371 | 4 | inited_flag = true; | 372 | 10 | for (int i = 0; i < arg_size; ++i) { | 373 | | // throw Exception func call percentile_array(id, [1,0,null]) | 374 | 6 | if (null_maps[i]) { | 375 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 376 | 0 | "quantiles in func percentile_array should not have null"); | 377 | 0 | } | 378 | 6 | check_quantile(quantiles[i]); | 379 | 6 | vec_quantile[i] = quantiles[i]; | 380 | 6 | } | 381 | 4 | } | 382 | 15 | for (int i = 0; i < arg_size; ++i) { | 383 | 9 | vec_counts[i].increment(source); | 384 | 9 | } | 385 | 6 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE9EE3addEdRKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKNS3_IhLm4096ES6_Lm16ELm15EEEl Line | Count | Source | 367 | 126 | const PaddedPODArray<Float64>& quantiles, const NullMap& null_maps, int64_t arg_size) { | 368 | 126 | if (!inited_flag) { | 369 | 52 | vec_counts.resize(arg_size); | 370 | 52 | vec_quantile.resize(arg_size, -1); | 371 | 52 | inited_flag = true; | 372 | 139 | for (int i = 0; i < arg_size; ++i) { | 373 | | // throw Exception func call percentile_array(id, [1,0,null]) | 374 | 87 | if (null_maps[i]) { | 375 | 0 | throw Exception(ErrorCode::INVALID_ARGUMENT, | 376 | 0 | "quantiles in func percentile_array should not have null"); | 377 | 0 | } | 378 | 87 | check_quantile(quantiles[i]); | 379 | 87 | vec_quantile[i] = quantiles[i]; | 380 | 87 | } | 381 | 52 | } | 382 | 385 | for (int i = 0; i < arg_size; ++i) { | 383 | 259 | vec_counts[i].increment(source); | 384 | 259 | } | 385 | 126 | } |
|
386 | | |
387 | | void add_batch(const PaddedPODArray<typename PrimitiveTypeTraits<T>::CppType>& source, |
388 | 7 | const Float64& q) { |
389 | 7 | if (!inited_flag) { |
390 | 4 | inited_flag = true; |
391 | 4 | vec_counts.resize(1); |
392 | 4 | vec_quantile.resize(1); |
393 | 4 | check_quantile(q); |
394 | 4 | vec_quantile[0] = q; |
395 | 4 | } |
396 | 7 | vec_counts[0].increment_batch(source); |
397 | 7 | } Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE3EE9add_batchERKNS_8PODArrayIaLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE4EE9add_batchERKNS_8PODArrayIsLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd _ZN5doris15PercentileStateILNS_13PrimitiveTypeE5EE9add_batchERKNS_8PODArrayIiLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd Line | Count | Source | 388 | 2 | const Float64& q) { | 389 | 2 | if (!inited_flag) { | 390 | 2 | inited_flag = true; | 391 | 2 | vec_counts.resize(1); | 392 | 2 | vec_quantile.resize(1); | 393 | 2 | check_quantile(q); | 394 | 2 | vec_quantile[0] = q; | 395 | 2 | } | 396 | 2 | vec_counts[0].increment_batch(source); | 397 | 2 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE6EE9add_batchERKNS_8PODArrayIlLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd Line | Count | Source | 388 | 5 | const Float64& q) { | 389 | 5 | if (!inited_flag) { | 390 | 2 | inited_flag = true; | 391 | 2 | vec_counts.resize(1); | 392 | 2 | vec_quantile.resize(1); | 393 | 2 | check_quantile(q); | 394 | 2 | vec_quantile[0] = q; | 395 | 2 | } | 396 | 5 | vec_counts[0].increment_batch(source); | 397 | 5 | } |
Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE7EE9add_batchERKNS_8PODArrayInLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE8EE9add_batchERKNS_8PODArrayIfLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE9EE9add_batchERKNS_8PODArrayIdLm4096ENS_9AllocatorILb0ELb0ELb0ENS_22DefaultMemoryAllocatorELb1EEELm16ELm15EEERKd |
398 | | |
399 | 660 | void merge(const PercentileState& rhs) { |
400 | 660 | if (!rhs.inited_flag) { |
401 | 9 | return; |
402 | 9 | } |
403 | 651 | int size_num = cast_set<int>(rhs.vec_quantile.size()); |
404 | 651 | if (!inited_flag) { |
405 | 446 | vec_counts.resize(size_num); |
406 | 446 | vec_quantile.resize(size_num, -1); |
407 | 446 | inited_flag = true; |
408 | 446 | } |
409 | | |
410 | 1.73k | for (int i = 0; i < size_num; ++i) { |
411 | 1.08k | if (vec_quantile[i] == -1.0) { |
412 | 747 | vec_quantile[i] = rhs.vec_quantile[i]; |
413 | 747 | } |
414 | 1.08k | vec_counts[i].merge(&(rhs.vec_counts[i])); |
415 | 1.08k | } |
416 | 651 | } _ZN5doris15PercentileStateILNS_13PrimitiveTypeE3EE5mergeERKS2_ Line | Count | Source | 399 | 4 | void merge(const PercentileState& rhs) { | 400 | 4 | if (!rhs.inited_flag) { | 401 | 0 | return; | 402 | 0 | } | 403 | 4 | int size_num = cast_set<int>(rhs.vec_quantile.size()); | 404 | 4 | if (!inited_flag) { | 405 | 2 | vec_counts.resize(size_num); | 406 | 2 | vec_quantile.resize(size_num, -1); | 407 | 2 | inited_flag = true; | 408 | 2 | } | 409 | | | 410 | 10 | for (int i = 0; i < size_num; ++i) { | 411 | 6 | if (vec_quantile[i] == -1.0) { | 412 | 3 | vec_quantile[i] = rhs.vec_quantile[i]; | 413 | 3 | } | 414 | 6 | vec_counts[i].merge(&(rhs.vec_counts[i])); | 415 | 6 | } | 416 | 4 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE4EE5mergeERKS2_ Line | Count | Source | 399 | 5 | void merge(const PercentileState& rhs) { | 400 | 5 | if (!rhs.inited_flag) { | 401 | 0 | return; | 402 | 0 | } | 403 | 5 | int size_num = cast_set<int>(rhs.vec_quantile.size()); | 404 | 5 | if (!inited_flag) { | 405 | 3 | vec_counts.resize(size_num); | 406 | 3 | vec_quantile.resize(size_num, -1); | 407 | 3 | inited_flag = true; | 408 | 3 | } | 409 | | | 410 | 14 | for (int i = 0; i < size_num; ++i) { | 411 | 9 | if (vec_quantile[i] == -1.0) { | 412 | 6 | vec_quantile[i] = rhs.vec_quantile[i]; | 413 | 6 | } | 414 | 9 | vec_counts[i].merge(&(rhs.vec_counts[i])); | 415 | 9 | } | 416 | 5 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE5EE5mergeERKS2_ Line | Count | Source | 399 | 290 | void merge(const PercentileState& rhs) { | 400 | 290 | if (!rhs.inited_flag) { | 401 | 9 | return; | 402 | 9 | } | 403 | 281 | int size_num = cast_set<int>(rhs.vec_quantile.size()); | 404 | 281 | if (!inited_flag) { | 405 | 218 | vec_counts.resize(size_num); | 406 | 218 | vec_quantile.resize(size_num, -1); | 407 | 218 | inited_flag = true; | 408 | 218 | } | 409 | | | 410 | 949 | for (int i = 0; i < size_num; ++i) { | 411 | 668 | if (vec_quantile[i] == -1.0) { | 412 | 482 | vec_quantile[i] = rhs.vec_quantile[i]; | 413 | 482 | } | 414 | 668 | vec_counts[i].merge(&(rhs.vec_counts[i])); | 415 | 668 | } | 416 | 281 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE6EE5mergeERKS2_ Line | Count | Source | 399 | 326 | void merge(const PercentileState& rhs) { | 400 | 326 | if (!rhs.inited_flag) { | 401 | 0 | return; | 402 | 0 | } | 403 | 326 | int size_num = cast_set<int>(rhs.vec_quantile.size()); | 404 | 326 | if (!inited_flag) { | 405 | 194 | vec_counts.resize(size_num); | 406 | 194 | vec_quantile.resize(size_num, -1); | 407 | 194 | inited_flag = true; | 408 | 194 | } | 409 | | | 410 | 656 | for (int i = 0; i < size_num; ++i) { | 411 | 330 | if (vec_quantile[i] == -1.0) { | 412 | 197 | vec_quantile[i] = rhs.vec_quantile[i]; | 413 | 197 | } | 414 | 330 | vec_counts[i].merge(&(rhs.vec_counts[i])); | 415 | 330 | } | 416 | 326 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE7EE5mergeERKS2_ Line | Count | Source | 399 | 4 | void merge(const PercentileState& rhs) { | 400 | 4 | if (!rhs.inited_flag) { | 401 | 0 | return; | 402 | 0 | } | 403 | 4 | int size_num = cast_set<int>(rhs.vec_quantile.size()); | 404 | 4 | if (!inited_flag) { | 405 | 2 | vec_counts.resize(size_num); | 406 | 2 | vec_quantile.resize(size_num, -1); | 407 | 2 | inited_flag = true; | 408 | 2 | } | 409 | | | 410 | 10 | for (int i = 0; i < size_num; ++i) { | 411 | 6 | if (vec_quantile[i] == -1.0) { | 412 | 3 | vec_quantile[i] = rhs.vec_quantile[i]; | 413 | 3 | } | 414 | 6 | vec_counts[i].merge(&(rhs.vec_counts[i])); | 415 | 6 | } | 416 | 4 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE8EE5mergeERKS2_ Line | Count | Source | 399 | 4 | void merge(const PercentileState& rhs) { | 400 | 4 | if (!rhs.inited_flag) { | 401 | 0 | return; | 402 | 0 | } | 403 | 4 | int size_num = cast_set<int>(rhs.vec_quantile.size()); | 404 | 4 | if (!inited_flag) { | 405 | 2 | vec_counts.resize(size_num); | 406 | 2 | vec_quantile.resize(size_num, -1); | 407 | 2 | inited_flag = true; | 408 | 2 | } | 409 | | | 410 | 10 | for (int i = 0; i < size_num; ++i) { | 411 | 6 | if (vec_quantile[i] == -1.0) { | 412 | 3 | vec_quantile[i] = rhs.vec_quantile[i]; | 413 | 3 | } | 414 | 6 | vec_counts[i].merge(&(rhs.vec_counts[i])); | 415 | 6 | } | 416 | 4 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE9EE5mergeERKS2_ Line | Count | Source | 399 | 27 | void merge(const PercentileState& rhs) { | 400 | 27 | if (!rhs.inited_flag) { | 401 | 0 | return; | 402 | 0 | } | 403 | 27 | int size_num = cast_set<int>(rhs.vec_quantile.size()); | 404 | 27 | if (!inited_flag) { | 405 | 25 | vec_counts.resize(size_num); | 406 | 25 | vec_quantile.resize(size_num, -1); | 407 | 25 | inited_flag = true; | 408 | 25 | } | 409 | | | 410 | 83 | for (int i = 0; i < size_num; ++i) { | 411 | 56 | if (vec_quantile[i] == -1.0) { | 412 | 53 | vec_quantile[i] = rhs.vec_quantile[i]; | 413 | 53 | } | 414 | 56 | vec_counts[i].merge(&(rhs.vec_counts[i])); | 415 | 56 | } | 416 | 27 | } |
|
417 | | |
418 | 244 | void reset() { |
419 | 244 | vec_counts.clear(); |
420 | 244 | vec_quantile.clear(); |
421 | 244 | inited_flag = false; |
422 | 244 | } Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE3EE5resetEv _ZN5doris15PercentileStateILNS_13PrimitiveTypeE4EE5resetEv Line | Count | Source | 418 | 102 | void reset() { | 419 | 102 | vec_counts.clear(); | 420 | 102 | vec_quantile.clear(); | 421 | 102 | inited_flag = false; | 422 | 102 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE5EE5resetEv Line | Count | Source | 418 | 35 | void reset() { | 419 | 35 | vec_counts.clear(); | 420 | 35 | vec_quantile.clear(); | 421 | 35 | inited_flag = false; | 422 | 35 | } |
_ZN5doris15PercentileStateILNS_13PrimitiveTypeE6EE5resetEv Line | Count | Source | 418 | 101 | void reset() { | 419 | 101 | vec_counts.clear(); | 420 | 101 | vec_quantile.clear(); | 421 | 101 | inited_flag = false; | 422 | 101 | } |
Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE7EE5resetEv Unexecuted instantiation: _ZN5doris15PercentileStateILNS_13PrimitiveTypeE8EE5resetEv _ZN5doris15PercentileStateILNS_13PrimitiveTypeE9EE5resetEv Line | Count | Source | 418 | 6 | void reset() { | 419 | 6 | vec_counts.clear(); | 420 | 6 | vec_quantile.clear(); | 421 | 6 | inited_flag = false; | 422 | 6 | } |
|
423 | | |
424 | 387 | double get() const { return vec_counts.empty() ? 0 : vec_counts[0].terminate(vec_quantile[0]); }_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE3EE3getEv Line | Count | Source | 424 | 30 | double get() const { return vec_counts.empty() ? 0 : vec_counts[0].terminate(vec_quantile[0]); } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE4EE3getEv Line | Count | Source | 424 | 177 | double get() const { return vec_counts.empty() ? 0 : vec_counts[0].terminate(vec_quantile[0]); } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE5EE3getEv Line | Count | Source | 424 | 54 | double get() const { return vec_counts.empty() ? 0 : vec_counts[0].terminate(vec_quantile[0]); } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE6EE3getEv Line | Count | Source | 424 | 91 | double get() const { return vec_counts.empty() ? 0 : vec_counts[0].terminate(vec_quantile[0]); } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE7EE3getEv Line | Count | Source | 424 | 1 | double get() const { return vec_counts.empty() ? 0 : vec_counts[0].terminate(vec_quantile[0]); } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE8EE3getEv Line | Count | Source | 424 | 1 | double get() const { return vec_counts.empty() ? 0 : vec_counts[0].terminate(vec_quantile[0]); } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE9EE3getEv Line | Count | Source | 424 | 33 | double get() const { return vec_counts.empty() ? 0 : vec_counts[0].terminate(vec_quantile[0]); } |
|
425 | | |
426 | 258 | void insert_result_into(IColumn& to) const { |
427 | 258 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); |
428 | 872 | for (int i = 0; i < vec_counts.size(); ++i) { |
429 | 614 | column_data.push_back(vec_counts[i].terminate(vec_quantile[i])); |
430 | 614 | } |
431 | 258 | } _ZNK5doris15PercentileStateILNS_13PrimitiveTypeE3EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 426 | 11 | void insert_result_into(IColumn& to) const { | 427 | 11 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 428 | 43 | for (int i = 0; i < vec_counts.size(); ++i) { | 429 | 32 | column_data.push_back(vec_counts[i].terminate(vec_quantile[i])); | 430 | 32 | } | 431 | 11 | } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE4EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 426 | 12 | void insert_result_into(IColumn& to) const { | 427 | 12 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 428 | 47 | for (int i = 0; i < vec_counts.size(); ++i) { | 429 | 35 | column_data.push_back(vec_counts[i].terminate(vec_quantile[i])); | 430 | 35 | } | 431 | 12 | } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE5EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 426 | 170 | void insert_result_into(IColumn& to) const { | 427 | 170 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 428 | 545 | for (int i = 0; i < vec_counts.size(); ++i) { | 429 | 375 | column_data.push_back(vec_counts[i].terminate(vec_quantile[i])); | 430 | 375 | } | 431 | 170 | } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE6EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 426 | 12 | void insert_result_into(IColumn& to) const { | 427 | 12 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 428 | 47 | for (int i = 0; i < vec_counts.size(); ++i) { | 429 | 35 | column_data.push_back(vec_counts[i].terminate(vec_quantile[i])); | 430 | 35 | } | 431 | 12 | } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE7EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 426 | 11 | void insert_result_into(IColumn& to) const { | 427 | 11 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 428 | 43 | for (int i = 0; i < vec_counts.size(); ++i) { | 429 | 32 | column_data.push_back(vec_counts[i].terminate(vec_quantile[i])); | 430 | 32 | } | 431 | 11 | } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE8EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 426 | 1 | void insert_result_into(IColumn& to) const { | 427 | 1 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 428 | 3 | for (int i = 0; i < vec_counts.size(); ++i) { | 429 | 2 | column_data.push_back(vec_counts[i].terminate(vec_quantile[i])); | 430 | 2 | } | 431 | 1 | } |
_ZNK5doris15PercentileStateILNS_13PrimitiveTypeE9EE18insert_result_intoERNS_7IColumnE Line | Count | Source | 426 | 41 | void insert_result_into(IColumn& to) const { | 427 | 41 | auto& column_data = assert_cast<ColumnFloat64&>(to).get_data(); | 428 | 144 | for (int i = 0; i < vec_counts.size(); ++i) { | 429 | 103 | column_data.push_back(vec_counts[i].terminate(vec_quantile[i])); | 430 | 103 | } | 431 | 41 | } |
|
432 | | }; |
433 | | |
434 | | template <PrimitiveType T> |
435 | | class AggregateFunctionPercentile final |
436 | | : public IAggregateFunctionDataHelper<PercentileState<T>, AggregateFunctionPercentile<T>>, |
437 | | MultiExpression, |
438 | | NullableAggregateFunction { |
439 | | public: |
440 | | using ColVecType = typename PrimitiveTypeTraits<T>::ColumnType; |
441 | | using Base = IAggregateFunctionDataHelper<PercentileState<T>, AggregateFunctionPercentile<T>>; |
442 | 1.54k | AggregateFunctionPercentile(const DataTypes& argument_types_) : Base(argument_types_) {}_ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 442 | 8 | AggregateFunctionPercentile(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 442 | 14 | AggregateFunctionPercentile(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 442 | 28 | AggregateFunctionPercentile(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 442 | 1.47k | AggregateFunctionPercentile(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 442 | 2 | AggregateFunctionPercentile(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 442 | 2 | AggregateFunctionPercentile(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 442 | 11 | AggregateFunctionPercentile(const DataTypes& argument_types_) : Base(argument_types_) {} |
|
443 | | |
444 | 203 | String get_name() const override { return "percentile"; }_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE8get_nameB5cxx11Ev Line | Count | Source | 444 | 4 | String get_name() const override { return "percentile"; } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE8get_nameB5cxx11Ev Line | Count | Source | 444 | 48 | String get_name() const override { return "percentile"; } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE8get_nameB5cxx11Ev Line | Count | Source | 444 | 1 | String get_name() const override { return "percentile"; } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE8get_nameB5cxx11Ev Line | Count | Source | 444 | 140 | String get_name() const override { return "percentile"; } |
Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE8get_nameB5cxx11Ev _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE8get_nameB5cxx11Ev Line | Count | Source | 444 | 10 | String get_name() const override { return "percentile"; } |
|
445 | | |
446 | 265 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); }_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE15get_return_typeEv Line | Count | Source | 446 | 16 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE15get_return_typeEv Line | Count | Source | 446 | 64 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE15get_return_typeEv Line | Count | Source | 446 | 53 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE15get_return_typeEv Line | Count | Source | 446 | 93 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE15get_return_typeEv Line | Count | Source | 446 | 4 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE15get_return_typeEv Line | Count | Source | 446 | 4 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE15get_return_typeEv Line | Count | Source | 446 | 31 | DataTypePtr get_return_type() const override { return std::make_shared<DataTypeFloat64>(); } |
|
447 | | |
448 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
449 | 933 | Arena&) const override { |
450 | 933 | const auto& sources = |
451 | 933 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
452 | 933 | const auto& quantile = |
453 | 933 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
454 | 933 | AggregateFunctionPercentile::data(place).add(sources.get_data()[row_num], |
455 | 933 | quantile.get_data(), NullMap(1, 0), 1); |
456 | 933 | } _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 449 | 31 | Arena&) const override { | 450 | 31 | const auto& sources = | 451 | 31 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 452 | 31 | const auto& quantile = | 453 | 31 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 454 | 31 | AggregateFunctionPercentile::data(place).add(sources.get_data()[row_num], | 455 | 31 | quantile.get_data(), NullMap(1, 0), 1); | 456 | 31 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 449 | 311 | Arena&) const override { | 450 | 311 | const auto& sources = | 451 | 311 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 452 | 311 | const auto& quantile = | 453 | 311 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 454 | 311 | AggregateFunctionPercentile::data(place).add(sources.get_data()[row_num], | 455 | 311 | quantile.get_data(), NullMap(1, 0), 1); | 456 | 311 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 449 | 229 | Arena&) const override { | 450 | 229 | const auto& sources = | 451 | 229 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 452 | 229 | const auto& quantile = | 453 | 229 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 454 | 229 | AggregateFunctionPercentile::data(place).add(sources.get_data()[row_num], | 455 | 229 | quantile.get_data(), NullMap(1, 0), 1); | 456 | 229 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 449 | 314 | Arena&) const override { | 450 | 314 | const auto& sources = | 451 | 314 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 452 | 314 | const auto& quantile = | 453 | 314 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 454 | 314 | AggregateFunctionPercentile::data(place).add(sources.get_data()[row_num], | 455 | 314 | quantile.get_data(), NullMap(1, 0), 1); | 456 | 314 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 449 | 3 | Arena&) const override { | 450 | 3 | const auto& sources = | 451 | 3 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 452 | 3 | const auto& quantile = | 453 | 3 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 454 | 3 | AggregateFunctionPercentile::data(place).add(sources.get_data()[row_num], | 455 | 3 | quantile.get_data(), NullMap(1, 0), 1); | 456 | 3 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 449 | 3 | Arena&) const override { | 450 | 3 | const auto& sources = | 451 | 3 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 452 | 3 | const auto& quantile = | 453 | 3 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 454 | 3 | AggregateFunctionPercentile::data(place).add(sources.get_data()[row_num], | 455 | 3 | quantile.get_data(), NullMap(1, 0), 1); | 456 | 3 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 449 | 42 | Arena&) const override { | 450 | 42 | const auto& sources = | 451 | 42 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 452 | 42 | const auto& quantile = | 453 | 42 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 454 | 42 | AggregateFunctionPercentile::data(place).add(sources.get_data()[row_num], | 455 | 42 | quantile.get_data(), NullMap(1, 0), 1); | 456 | 42 | } |
|
457 | | |
458 | | void add_batch_single_place(size_t batch_size, AggregateDataPtr place, const IColumn** columns, |
459 | 7 | Arena&) const override { |
460 | 7 | const auto& sources = |
461 | 7 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
462 | 7 | const auto& quantile = |
463 | 7 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
464 | 7 | DCHECK_EQ(sources.get_data().size(), batch_size); |
465 | 7 | AggregateFunctionPercentile::data(place).add_batch(sources.get_data(), |
466 | 7 | quantile.get_data()[0]); |
467 | 7 | } Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Line | Count | Source | 459 | 2 | Arena&) const override { | 460 | 2 | const auto& sources = | 461 | 2 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 462 | 2 | const auto& quantile = | 463 | 2 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 464 | | DCHECK_EQ(sources.get_data().size(), batch_size); | 465 | 2 | AggregateFunctionPercentile::data(place).add_batch(sources.get_data(), | 466 | 2 | quantile.get_data()[0]); | 467 | 2 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE22add_batch_single_placeEmPcPPKNS_7IColumnERNS_5ArenaE Line | Count | Source | 459 | 5 | Arena&) const override { | 460 | 5 | const auto& sources = | 461 | 5 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 462 | 5 | const auto& quantile = | 463 | 5 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 464 | | DCHECK_EQ(sources.get_data().size(), batch_size); | 465 | 5 | AggregateFunctionPercentile::data(place).add_batch(sources.get_data(), | 466 | 5 | quantile.get_data()[0]); | 467 | 5 | } |
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 |
468 | | |
469 | 215 | void reset(AggregateDataPtr __restrict place) const override { |
470 | 215 | AggregateFunctionPercentile::data(place).reset(); |
471 | 215 | } Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE5resetEPc _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE5resetEPc Line | Count | Source | 469 | 102 | void reset(AggregateDataPtr __restrict place) const override { | 470 | 102 | AggregateFunctionPercentile::data(place).reset(); | 471 | 102 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE5resetEPc Line | Count | Source | 469 | 9 | void reset(AggregateDataPtr __restrict place) const override { | 470 | 9 | AggregateFunctionPercentile::data(place).reset(); | 471 | 9 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE5resetEPc Line | Count | Source | 469 | 101 | void reset(AggregateDataPtr __restrict place) const override { | 470 | 101 | AggregateFunctionPercentile::data(place).reset(); | 471 | 101 | } |
Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE5resetEPc Unexecuted instantiation: _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE5resetEPc _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE5resetEPc Line | Count | Source | 469 | 3 | void reset(AggregateDataPtr __restrict place) const override { | 470 | 3 | AggregateFunctionPercentile::data(place).reset(); | 471 | 3 | } |
|
472 | | |
473 | | void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, |
474 | 357 | Arena&) const override { |
475 | 357 | AggregateFunctionPercentile::data(place).merge(AggregateFunctionPercentile::data(rhs)); |
476 | 357 | } _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 474 | 2 | Arena&) const override { | 475 | 2 | AggregateFunctionPercentile::data(place).merge(AggregateFunctionPercentile::data(rhs)); | 476 | 2 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 474 | 2 | Arena&) const override { | 475 | 2 | AggregateFunctionPercentile::data(place).merge(AggregateFunctionPercentile::data(rhs)); | 476 | 2 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 474 | 24 | Arena&) const override { | 475 | 24 | AggregateFunctionPercentile::data(place).merge(AggregateFunctionPercentile::data(rhs)); | 476 | 24 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 474 | 323 | Arena&) const override { | 475 | 323 | AggregateFunctionPercentile::data(place).merge(AggregateFunctionPercentile::data(rhs)); | 476 | 323 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 474 | 2 | Arena&) const override { | 475 | 2 | AggregateFunctionPercentile::data(place).merge(AggregateFunctionPercentile::data(rhs)); | 476 | 2 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 474 | 2 | Arena&) const override { | 475 | 2 | AggregateFunctionPercentile::data(place).merge(AggregateFunctionPercentile::data(rhs)); | 476 | 2 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 474 | 2 | Arena&) const override { | 475 | 2 | AggregateFunctionPercentile::data(place).merge(AggregateFunctionPercentile::data(rhs)); | 476 | 2 | } |
|
477 | | |
478 | 357 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { |
479 | 357 | AggregateFunctionPercentile::data(place).write(buf); |
480 | 357 | } _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 478 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 479 | 2 | AggregateFunctionPercentile::data(place).write(buf); | 480 | 2 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 478 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 479 | 2 | AggregateFunctionPercentile::data(place).write(buf); | 480 | 2 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 478 | 24 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 479 | 24 | AggregateFunctionPercentile::data(place).write(buf); | 480 | 24 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 478 | 323 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 479 | 323 | AggregateFunctionPercentile::data(place).write(buf); | 480 | 323 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 478 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 479 | 2 | AggregateFunctionPercentile::data(place).write(buf); | 480 | 2 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 478 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 479 | 2 | AggregateFunctionPercentile::data(place).write(buf); | 480 | 2 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 478 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 479 | 2 | AggregateFunctionPercentile::data(place).write(buf); | 480 | 2 | } |
|
481 | | |
482 | | void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf, |
483 | 357 | Arena&) const override { |
484 | 357 | AggregateFunctionPercentile::data(place).read(buf); |
485 | 357 | } _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 483 | 2 | Arena&) const override { | 484 | 2 | AggregateFunctionPercentile::data(place).read(buf); | 485 | 2 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 483 | 2 | Arena&) const override { | 484 | 2 | AggregateFunctionPercentile::data(place).read(buf); | 485 | 2 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 483 | 24 | Arena&) const override { | 484 | 24 | AggregateFunctionPercentile::data(place).read(buf); | 485 | 24 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 483 | 323 | Arena&) const override { | 484 | 323 | AggregateFunctionPercentile::data(place).read(buf); | 485 | 323 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 483 | 2 | Arena&) const override { | 484 | 2 | AggregateFunctionPercentile::data(place).read(buf); | 485 | 2 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 483 | 2 | Arena&) const override { | 484 | 2 | AggregateFunctionPercentile::data(place).read(buf); | 485 | 2 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 483 | 2 | Arena&) const override { | 484 | 2 | AggregateFunctionPercentile::data(place).read(buf); | 485 | 2 | } |
|
486 | | |
487 | 387 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
488 | 387 | auto& col = assert_cast<ColumnFloat64&>(to); |
489 | 387 | col.insert_value(AggregateFunctionPercentile::data(place).get()); |
490 | 387 | } _ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE3EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 487 | 30 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 488 | 30 | auto& col = assert_cast<ColumnFloat64&>(to); | 489 | 30 | col.insert_value(AggregateFunctionPercentile::data(place).get()); | 490 | 30 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE4EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 487 | 177 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 488 | 177 | auto& col = assert_cast<ColumnFloat64&>(to); | 489 | 177 | col.insert_value(AggregateFunctionPercentile::data(place).get()); | 490 | 177 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE5EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 487 | 54 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 488 | 54 | auto& col = assert_cast<ColumnFloat64&>(to); | 489 | 54 | col.insert_value(AggregateFunctionPercentile::data(place).get()); | 490 | 54 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE6EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 487 | 91 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 488 | 91 | auto& col = assert_cast<ColumnFloat64&>(to); | 489 | 91 | col.insert_value(AggregateFunctionPercentile::data(place).get()); | 490 | 91 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE7EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 487 | 1 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 488 | 1 | auto& col = assert_cast<ColumnFloat64&>(to); | 489 | 1 | col.insert_value(AggregateFunctionPercentile::data(place).get()); | 490 | 1 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE8EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 487 | 1 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 488 | 1 | auto& col = assert_cast<ColumnFloat64&>(to); | 489 | 1 | col.insert_value(AggregateFunctionPercentile::data(place).get()); | 490 | 1 | } |
_ZNK5doris27AggregateFunctionPercentileILNS_13PrimitiveTypeE9EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 487 | 33 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 488 | 33 | auto& col = assert_cast<ColumnFloat64&>(to); | 489 | 33 | col.insert_value(AggregateFunctionPercentile::data(place).get()); | 490 | 33 | } |
|
491 | | }; |
492 | | |
493 | | template <PrimitiveType T> |
494 | | class AggregateFunctionPercentileArray final |
495 | | : public IAggregateFunctionDataHelper<PercentileState<T>, |
496 | | AggregateFunctionPercentileArray<T>>, |
497 | | MultiExpression, |
498 | | NotNullableAggregateFunction { |
499 | | public: |
500 | | using ColVecType = typename PrimitiveTypeTraits<T>::ColumnType; |
501 | | using Base = |
502 | | IAggregateFunctionDataHelper<PercentileState<T>, AggregateFunctionPercentileArray<T>>; |
503 | 332 | AggregateFunctionPercentileArray(const DataTypes& argument_types_) : Base(argument_types_) {}_ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 503 | 4 | AggregateFunctionPercentileArray(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 503 | 6 | AggregateFunctionPercentileArray(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 503 | 291 | AggregateFunctionPercentileArray(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 503 | 12 | AggregateFunctionPercentileArray(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 503 | 4 | AggregateFunctionPercentileArray(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 503 | 2 | AggregateFunctionPercentileArray(const DataTypes& argument_types_) : Base(argument_types_) {} |
_ZN5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EEC2ERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE Line | Count | Source | 503 | 13 | AggregateFunctionPercentileArray(const DataTypes& argument_types_) : Base(argument_types_) {} |
|
504 | | |
505 | 30 | String get_name() const override { return "percentile_array"; }Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE8get_nameB5cxx11Ev _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE8get_nameB5cxx11Ev Line | Count | Source | 505 | 20 | String get_name() const override { return "percentile_array"; } |
Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE8get_nameB5cxx11Ev Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE8get_nameB5cxx11Ev _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE8get_nameB5cxx11Ev Line | Count | Source | 505 | 10 | String get_name() const override { return "percentile_array"; } |
|
506 | | |
507 | 166 | DataTypePtr get_return_type() const override { |
508 | 166 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); |
509 | 166 | } _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE15get_return_typeEv Line | Count | Source | 507 | 8 | DataTypePtr get_return_type() const override { | 508 | 8 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 509 | 8 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE15get_return_typeEv Line | Count | Source | 507 | 12 | DataTypePtr get_return_type() const override { | 508 | 12 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 509 | 12 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE15get_return_typeEv Line | Count | Source | 507 | 81 | DataTypePtr get_return_type() const override { | 508 | 81 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 509 | 81 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE15get_return_typeEv Line | Count | Source | 507 | 21 | DataTypePtr get_return_type() const override { | 508 | 21 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 509 | 21 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE15get_return_typeEv Line | Count | Source | 507 | 8 | DataTypePtr get_return_type() const override { | 508 | 8 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 509 | 8 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE15get_return_typeEv Line | Count | Source | 507 | 4 | DataTypePtr get_return_type() const override { | 508 | 4 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 509 | 4 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE15get_return_typeEv Line | Count | Source | 507 | 32 | DataTypePtr get_return_type() const override { | 508 | 32 | return std::make_shared<DataTypeArray>(make_nullable(std::make_shared<DataTypeFloat64>())); | 509 | 32 | } |
|
510 | | |
511 | | void add(AggregateDataPtr __restrict place, const IColumn** columns, ssize_t row_num, |
512 | 765 | Arena&) const override { |
513 | 765 | const auto& sources = |
514 | 765 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); |
515 | 765 | const auto& quantile_array = |
516 | 765 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); |
517 | 765 | const auto& offset_column_data = quantile_array.get_offsets(); |
518 | 765 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( |
519 | 765 | quantile_array.get_data()) |
520 | 765 | .get_null_map_data(); |
521 | 765 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( |
522 | 765 | quantile_array.get_data()) |
523 | 765 | .get_nested_column(); |
524 | 765 | const auto& nested_column_data = |
525 | 765 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); |
526 | | |
527 | 765 | AggregateFunctionPercentileArray::data(place).add( |
528 | 765 | sources.get_element(row_num), nested_column_data.get_data(), null_maps, |
529 | 765 | offset_column_data.data()[row_num] - offset_column_data[(ssize_t)row_num - 1]); |
530 | 765 | } _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 512 | 15 | Arena&) const override { | 513 | 15 | const auto& sources = | 514 | 15 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 515 | 15 | const auto& quantile_array = | 516 | 15 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 517 | 15 | const auto& offset_column_data = quantile_array.get_offsets(); | 518 | 15 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 519 | 15 | quantile_array.get_data()) | 520 | 15 | .get_null_map_data(); | 521 | 15 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 522 | 15 | quantile_array.get_data()) | 523 | 15 | .get_nested_column(); | 524 | 15 | const auto& nested_column_data = | 525 | 15 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 526 | | | 527 | 15 | AggregateFunctionPercentileArray::data(place).add( | 528 | 15 | sources.get_element(row_num), nested_column_data.get_data(), null_maps, | 529 | 15 | offset_column_data.data()[row_num] - offset_column_data[(ssize_t)row_num - 1]); | 530 | 15 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 512 | 30 | Arena&) const override { | 513 | 30 | const auto& sources = | 514 | 30 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 515 | 30 | const auto& quantile_array = | 516 | 30 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 517 | 30 | const auto& offset_column_data = quantile_array.get_offsets(); | 518 | 30 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 519 | 30 | quantile_array.get_data()) | 520 | 30 | .get_null_map_data(); | 521 | 30 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 522 | 30 | quantile_array.get_data()) | 523 | 30 | .get_nested_column(); | 524 | 30 | const auto& nested_column_data = | 525 | 30 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 526 | | | 527 | 30 | AggregateFunctionPercentileArray::data(place).add( | 528 | 30 | sources.get_element(row_num), nested_column_data.get_data(), null_maps, | 529 | 30 | offset_column_data.data()[row_num] - offset_column_data[(ssize_t)row_num - 1]); | 530 | 30 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 512 | 585 | Arena&) const override { | 513 | 585 | const auto& sources = | 514 | 585 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 515 | 585 | const auto& quantile_array = | 516 | 585 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 517 | 585 | const auto& offset_column_data = quantile_array.get_offsets(); | 518 | 585 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 519 | 585 | quantile_array.get_data()) | 520 | 585 | .get_null_map_data(); | 521 | 585 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 522 | 585 | quantile_array.get_data()) | 523 | 585 | .get_nested_column(); | 524 | 585 | const auto& nested_column_data = | 525 | 585 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 526 | | | 527 | 585 | AggregateFunctionPercentileArray::data(place).add( | 528 | 585 | sources.get_element(row_num), nested_column_data.get_data(), null_maps, | 529 | 585 | offset_column_data.data()[row_num] - offset_column_data[(ssize_t)row_num - 1]); | 530 | 585 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 512 | 33 | Arena&) const override { | 513 | 33 | const auto& sources = | 514 | 33 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 515 | 33 | const auto& quantile_array = | 516 | 33 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 517 | 33 | const auto& offset_column_data = quantile_array.get_offsets(); | 518 | 33 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 519 | 33 | quantile_array.get_data()) | 520 | 33 | .get_null_map_data(); | 521 | 33 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 522 | 33 | quantile_array.get_data()) | 523 | 33 | .get_nested_column(); | 524 | 33 | const auto& nested_column_data = | 525 | 33 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 526 | | | 527 | 33 | AggregateFunctionPercentileArray::data(place).add( | 528 | 33 | sources.get_element(row_num), nested_column_data.get_data(), null_maps, | 529 | 33 | offset_column_data.data()[row_num] - offset_column_data[(ssize_t)row_num - 1]); | 530 | 33 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 512 | 15 | Arena&) const override { | 513 | 15 | const auto& sources = | 514 | 15 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 515 | 15 | const auto& quantile_array = | 516 | 15 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 517 | 15 | const auto& offset_column_data = quantile_array.get_offsets(); | 518 | 15 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 519 | 15 | quantile_array.get_data()) | 520 | 15 | .get_null_map_data(); | 521 | 15 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 522 | 15 | quantile_array.get_data()) | 523 | 15 | .get_nested_column(); | 524 | 15 | const auto& nested_column_data = | 525 | 15 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 526 | | | 527 | 15 | AggregateFunctionPercentileArray::data(place).add( | 528 | 15 | sources.get_element(row_num), nested_column_data.get_data(), null_maps, | 529 | 15 | offset_column_data.data()[row_num] - offset_column_data[(ssize_t)row_num - 1]); | 530 | 15 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 512 | 3 | Arena&) const override { | 513 | 3 | const auto& sources = | 514 | 3 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 515 | 3 | const auto& quantile_array = | 516 | 3 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 517 | 3 | const auto& offset_column_data = quantile_array.get_offsets(); | 518 | 3 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 519 | 3 | quantile_array.get_data()) | 520 | 3 | .get_null_map_data(); | 521 | 3 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 522 | 3 | quantile_array.get_data()) | 523 | 3 | .get_nested_column(); | 524 | 3 | const auto& nested_column_data = | 525 | 3 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 526 | | | 527 | 3 | AggregateFunctionPercentileArray::data(place).add( | 528 | 3 | sources.get_element(row_num), nested_column_data.get_data(), null_maps, | 529 | 3 | offset_column_data.data()[row_num] - offset_column_data[(ssize_t)row_num - 1]); | 530 | 3 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE3addEPcPPKNS_7IColumnElRNS_5ArenaE Line | Count | Source | 512 | 84 | Arena&) const override { | 513 | 84 | const auto& sources = | 514 | 84 | assert_cast<const ColVecType&, TypeCheckOnRelease::DISABLE>(*columns[0]); | 515 | 84 | const auto& quantile_array = | 516 | 84 | assert_cast<const ColumnArray&, TypeCheckOnRelease::DISABLE>(*columns[1]); | 517 | 84 | const auto& offset_column_data = quantile_array.get_offsets(); | 518 | 84 | const auto& null_maps = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 519 | 84 | quantile_array.get_data()) | 520 | 84 | .get_null_map_data(); | 521 | 84 | const auto& nested_column = assert_cast<const ColumnNullable&, TypeCheckOnRelease::DISABLE>( | 522 | 84 | quantile_array.get_data()) | 523 | 84 | .get_nested_column(); | 524 | 84 | const auto& nested_column_data = | 525 | 84 | assert_cast<const ColumnFloat64&, TypeCheckOnRelease::DISABLE>(nested_column); | 526 | | | 527 | 84 | AggregateFunctionPercentileArray::data(place).add( | 528 | 84 | sources.get_element(row_num), nested_column_data.get_data(), null_maps, | 529 | 84 | offset_column_data.data()[row_num] - offset_column_data[(ssize_t)row_num - 1]); | 530 | 84 | } |
|
531 | | |
532 | 29 | void reset(AggregateDataPtr __restrict place) const override { |
533 | 29 | AggregateFunctionPercentileArray::data(place).reset(); |
534 | 29 | } Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE5resetEPc Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE5resetEPc _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE5resetEPc Line | Count | Source | 532 | 26 | void reset(AggregateDataPtr __restrict place) const override { | 533 | 26 | AggregateFunctionPercentileArray::data(place).reset(); | 534 | 26 | } |
Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE5resetEPc Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE5resetEPc Unexecuted instantiation: _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE5resetEPc _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE5resetEPc Line | Count | Source | 532 | 3 | void reset(AggregateDataPtr __restrict place) const override { | 533 | 3 | AggregateFunctionPercentileArray::data(place).reset(); | 534 | 3 | } |
|
535 | | |
536 | | void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, |
537 | 303 | Arena&) const override { |
538 | 303 | AggregateFunctionPercentileArray::data(place).merge( |
539 | 303 | AggregateFunctionPercentileArray::data(rhs)); |
540 | 303 | } _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 537 | 2 | Arena&) const override { | 538 | 2 | AggregateFunctionPercentileArray::data(place).merge( | 539 | 2 | AggregateFunctionPercentileArray::data(rhs)); | 540 | 2 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 537 | 3 | Arena&) const override { | 538 | 3 | AggregateFunctionPercentileArray::data(place).merge( | 539 | 3 | AggregateFunctionPercentileArray::data(rhs)); | 540 | 3 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 537 | 266 | Arena&) const override { | 538 | 266 | AggregateFunctionPercentileArray::data(place).merge( | 539 | 266 | AggregateFunctionPercentileArray::data(rhs)); | 540 | 266 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 537 | 3 | Arena&) const override { | 538 | 3 | AggregateFunctionPercentileArray::data(place).merge( | 539 | 3 | AggregateFunctionPercentileArray::data(rhs)); | 540 | 3 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 537 | 2 | Arena&) const override { | 538 | 2 | AggregateFunctionPercentileArray::data(place).merge( | 539 | 2 | AggregateFunctionPercentileArray::data(rhs)); | 540 | 2 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 537 | 2 | Arena&) const override { | 538 | 2 | AggregateFunctionPercentileArray::data(place).merge( | 539 | 2 | AggregateFunctionPercentileArray::data(rhs)); | 540 | 2 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE5mergeEPcPKcRNS_5ArenaE Line | Count | Source | 537 | 25 | Arena&) const override { | 538 | 25 | AggregateFunctionPercentileArray::data(place).merge( | 539 | 25 | AggregateFunctionPercentileArray::data(rhs)); | 540 | 25 | } |
|
541 | | |
542 | 342 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { |
543 | 342 | AggregateFunctionPercentileArray::data(place).write(buf); |
544 | 342 | } _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 542 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 543 | 2 | AggregateFunctionPercentileArray::data(place).write(buf); | 544 | 2 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 542 | 3 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 543 | 3 | AggregateFunctionPercentileArray::data(place).write(buf); | 544 | 3 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 542 | 305 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 543 | 305 | AggregateFunctionPercentileArray::data(place).write(buf); | 544 | 305 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 542 | 3 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 543 | 3 | AggregateFunctionPercentileArray::data(place).write(buf); | 544 | 3 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 542 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 543 | 2 | AggregateFunctionPercentileArray::data(place).write(buf); | 544 | 2 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 542 | 2 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 543 | 2 | AggregateFunctionPercentileArray::data(place).write(buf); | 544 | 2 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE9serializeEPKcRNS_14BufferWritableE Line | Count | Source | 542 | 25 | void serialize(ConstAggregateDataPtr __restrict place, BufferWritable& buf) const override { | 543 | 25 | AggregateFunctionPercentileArray::data(place).write(buf); | 544 | 25 | } |
|
545 | | |
546 | | void deserialize(AggregateDataPtr __restrict place, BufferReadable& buf, |
547 | 303 | Arena&) const override { |
548 | 303 | AggregateFunctionPercentileArray::data(place).read(buf); |
549 | 303 | } _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 547 | 2 | Arena&) const override { | 548 | 2 | AggregateFunctionPercentileArray::data(place).read(buf); | 549 | 2 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 547 | 3 | Arena&) const override { | 548 | 3 | AggregateFunctionPercentileArray::data(place).read(buf); | 549 | 3 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 547 | 266 | Arena&) const override { | 548 | 266 | AggregateFunctionPercentileArray::data(place).read(buf); | 549 | 266 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 547 | 3 | Arena&) const override { | 548 | 3 | AggregateFunctionPercentileArray::data(place).read(buf); | 549 | 3 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 547 | 2 | Arena&) const override { | 548 | 2 | AggregateFunctionPercentileArray::data(place).read(buf); | 549 | 2 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 547 | 2 | Arena&) const override { | 548 | 2 | AggregateFunctionPercentileArray::data(place).read(buf); | 549 | 2 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE11deserializeEPcRNS_14BufferReadableERNS_5ArenaE Line | Count | Source | 547 | 25 | Arena&) const override { | 548 | 25 | AggregateFunctionPercentileArray::data(place).read(buf); | 549 | 25 | } |
|
550 | | |
551 | 258 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { |
552 | 258 | auto& to_arr = assert_cast<ColumnArray&>(to); |
553 | 258 | auto& to_nested_col = to_arr.get_data(); |
554 | 258 | if (to_nested_col.is_nullable()) { |
555 | 258 | auto col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); |
556 | 258 | AggregateFunctionPercentileArray::data(place).insert_result_into( |
557 | 258 | col_null->get_nested_column()); |
558 | 258 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); |
559 | 258 | } else { |
560 | 0 | AggregateFunctionPercentileArray::data(place).insert_result_into(to_nested_col); |
561 | 0 | } |
562 | 258 | to_arr.get_offsets().push_back(to_nested_col.size()); |
563 | 258 | } _ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE3EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 551 | 11 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 552 | 11 | auto& to_arr = assert_cast<ColumnArray&>(to); | 553 | 11 | auto& to_nested_col = to_arr.get_data(); | 554 | 11 | if (to_nested_col.is_nullable()) { | 555 | 11 | auto col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 556 | 11 | AggregateFunctionPercentileArray::data(place).insert_result_into( | 557 | 11 | col_null->get_nested_column()); | 558 | 11 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 559 | 11 | } else { | 560 | 0 | AggregateFunctionPercentileArray::data(place).insert_result_into(to_nested_col); | 561 | 0 | } | 562 | 11 | to_arr.get_offsets().push_back(to_nested_col.size()); | 563 | 11 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE4EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 551 | 12 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 552 | 12 | auto& to_arr = assert_cast<ColumnArray&>(to); | 553 | 12 | auto& to_nested_col = to_arr.get_data(); | 554 | 12 | if (to_nested_col.is_nullable()) { | 555 | 12 | auto col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 556 | 12 | AggregateFunctionPercentileArray::data(place).insert_result_into( | 557 | 12 | col_null->get_nested_column()); | 558 | 12 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 559 | 12 | } else { | 560 | 0 | AggregateFunctionPercentileArray::data(place).insert_result_into(to_nested_col); | 561 | 0 | } | 562 | 12 | to_arr.get_offsets().push_back(to_nested_col.size()); | 563 | 12 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE5EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 551 | 170 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 552 | 170 | auto& to_arr = assert_cast<ColumnArray&>(to); | 553 | 170 | auto& to_nested_col = to_arr.get_data(); | 554 | 170 | if (to_nested_col.is_nullable()) { | 555 | 170 | auto col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 556 | 170 | AggregateFunctionPercentileArray::data(place).insert_result_into( | 557 | 170 | col_null->get_nested_column()); | 558 | 170 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 559 | 170 | } else { | 560 | 0 | AggregateFunctionPercentileArray::data(place).insert_result_into(to_nested_col); | 561 | 0 | } | 562 | 170 | to_arr.get_offsets().push_back(to_nested_col.size()); | 563 | 170 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE6EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 551 | 12 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 552 | 12 | auto& to_arr = assert_cast<ColumnArray&>(to); | 553 | 12 | auto& to_nested_col = to_arr.get_data(); | 554 | 12 | if (to_nested_col.is_nullable()) { | 555 | 12 | auto col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 556 | 12 | AggregateFunctionPercentileArray::data(place).insert_result_into( | 557 | 12 | col_null->get_nested_column()); | 558 | 12 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 559 | 12 | } else { | 560 | 0 | AggregateFunctionPercentileArray::data(place).insert_result_into(to_nested_col); | 561 | 0 | } | 562 | 12 | to_arr.get_offsets().push_back(to_nested_col.size()); | 563 | 12 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE7EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 551 | 11 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 552 | 11 | auto& to_arr = assert_cast<ColumnArray&>(to); | 553 | 11 | auto& to_nested_col = to_arr.get_data(); | 554 | 11 | if (to_nested_col.is_nullable()) { | 555 | 11 | auto col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 556 | 11 | AggregateFunctionPercentileArray::data(place).insert_result_into( | 557 | 11 | col_null->get_nested_column()); | 558 | 11 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 559 | 11 | } else { | 560 | 0 | AggregateFunctionPercentileArray::data(place).insert_result_into(to_nested_col); | 561 | 0 | } | 562 | 11 | to_arr.get_offsets().push_back(to_nested_col.size()); | 563 | 11 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE8EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 551 | 1 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 552 | 1 | auto& to_arr = assert_cast<ColumnArray&>(to); | 553 | 1 | auto& to_nested_col = to_arr.get_data(); | 554 | 1 | if (to_nested_col.is_nullable()) { | 555 | 1 | auto col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 556 | 1 | AggregateFunctionPercentileArray::data(place).insert_result_into( | 557 | 1 | col_null->get_nested_column()); | 558 | 1 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 559 | 1 | } else { | 560 | 0 | AggregateFunctionPercentileArray::data(place).insert_result_into(to_nested_col); | 561 | 0 | } | 562 | 1 | to_arr.get_offsets().push_back(to_nested_col.size()); | 563 | 1 | } |
_ZNK5doris32AggregateFunctionPercentileArrayILNS_13PrimitiveTypeE9EE18insert_result_intoEPKcRNS_7IColumnE Line | Count | Source | 551 | 41 | void insert_result_into(ConstAggregateDataPtr __restrict place, IColumn& to) const override { | 552 | 41 | auto& to_arr = assert_cast<ColumnArray&>(to); | 553 | 41 | auto& to_nested_col = to_arr.get_data(); | 554 | 41 | if (to_nested_col.is_nullable()) { | 555 | 41 | auto col_null = reinterpret_cast<ColumnNullable*>(&to_nested_col); | 556 | 41 | AggregateFunctionPercentileArray::data(place).insert_result_into( | 557 | 41 | col_null->get_nested_column()); | 558 | 41 | col_null->get_null_map_data().resize_fill(col_null->get_nested_column().size(), 0); | 559 | 41 | } else { | 560 | 0 | AggregateFunctionPercentileArray::data(place).insert_result_into(to_nested_col); | 561 | 0 | } | 562 | 41 | to_arr.get_offsets().push_back(to_nested_col.size()); | 563 | 41 | } |
|
564 | | }; |
565 | | |
566 | | } // namespace doris |