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