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