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