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