/root/doris/be/src/vec/columns/column.h
Line | Count | Source (jump to first uncovered line) |
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 | | // This file is copied from |
18 | | // https://github.com/ClickHouse/ClickHouse/blob/master/src/Columns/IColumn.h |
19 | | // and modified by Doris |
20 | | |
21 | | #pragma once |
22 | | |
23 | | #include <cstdint> |
24 | | #include <functional> |
25 | | #include <string> |
26 | | #include <type_traits> |
27 | | #include <utility> |
28 | | #include <vector> |
29 | | |
30 | | #include "common/status.h" |
31 | | #include "olap/olap_common.h" |
32 | | #include "runtime/define_primitive_type.h" |
33 | | #include "vec/common/cow.h" |
34 | | #include "vec/common/pod_array_fwd.h" |
35 | | #include "vec/common/string_ref.h" |
36 | | #include "vec/common/typeid_cast.h" |
37 | | #include "vec/core/field.h" |
38 | | #include "vec/core/types.h" |
39 | | |
40 | | class SipHash; |
41 | | |
42 | | #define DO_CRC_HASHES_FUNCTION_COLUMN_IMPL() \ |
43 | 88 | if (null_data == nullptr) { \ |
44 | 3.14M | for (size_t i = 0; i < s; i++) { \ |
45 | 3.14M | hashes[i] = HashUtil::zlib_crc_hash(&data[i], sizeof(T), hashes[i]); \ |
46 | 3.14M | } \ |
47 | 66 | } else { \ |
48 | 1.21k | for (size_t i = 0; i < s; i++) { \ |
49 | 1.19k | if (null_data[i] == 0) \ |
50 | 1.19k | hashes[i] = HashUtil::zlib_crc_hash(&data[i], sizeof(T), hashes[i]); \ |
51 | 1.19k | } \ |
52 | 22 | } |
53 | | |
54 | | namespace doris::vectorized { |
55 | | |
56 | | class Arena; |
57 | | class ColumnSorter; |
58 | | |
59 | | using EqualFlags = std::vector<uint8_t>; |
60 | | using EqualRange = std::pair<int, int>; |
61 | | |
62 | | /// Declares interface to store columns in memory. |
63 | | class IColumn : public COW<IColumn> { |
64 | | private: |
65 | | friend class COW<IColumn>; |
66 | | |
67 | | /// Creates the same column with the same data. |
68 | | /// This is internal method to use from COW. |
69 | | /// It performs shallow copy with copy-ctor and not useful from outside. |
70 | | /// If you want to copy column for modification, look at 'mutate' method. |
71 | | virtual MutablePtr clone() const = 0; |
72 | | |
73 | | public: |
74 | | // 64bit offsets now only Array type used, so we make it protected |
75 | | // to avoid use IColumn::Offset64 directly. |
76 | | // please use ColumnArray::Offset64 instead if we need. |
77 | | using Offset64 = UInt64; |
78 | | using Offsets64 = PaddedPODArray<Offset64>; |
79 | | |
80 | | // 32bit offsets for string |
81 | | using Offset = UInt32; |
82 | | using Offsets = PaddedPODArray<Offset>; |
83 | | |
84 | | /// Name of a Column. It is used in info messages. |
85 | | virtual std::string get_name() const = 0; |
86 | | |
87 | | /** If column isn't constant, returns nullptr (or itself). |
88 | | * If column is constant, transforms constant to full column (if column type allows such transform) and return it. |
89 | | */ |
90 | 775k | virtual Ptr convert_to_full_column_if_const() const { return get_ptr(); } |
91 | | |
92 | | /** If in join. the StringColumn size may overflow uint32_t, we need convert to uint64_t to ColumnString64 |
93 | | * The Column: ColumnString, ColumnNullable, ColumnArray, ColumnStruct need impl the code |
94 | | */ |
95 | 86.0k | virtual Ptr convert_column_if_overflow() { return get_ptr(); } |
96 | | |
97 | | /// If column isn't ColumnDictionary, return itself. |
98 | | /// If column is ColumnDictionary, transforms is to predicate column. |
99 | 43 | virtual MutablePtr convert_to_predicate_column_if_dictionary() { return get_ptr(); } |
100 | | |
101 | | /// If column is ColumnDictionary, and is a range comparison predicate, convert dict encoding |
102 | 4.10k | virtual void convert_dict_codes_if_necessary() {} |
103 | | |
104 | | /// If column is ColumnDictionary, and is a bloom filter predicate, generate_hash_values |
105 | 0 | virtual void initialize_hash_values_for_runtime_filter() {} |
106 | | |
107 | | /// Creates empty column with the same type. |
108 | 148k | virtual MutablePtr clone_empty() const { return clone_resized(0); } |
109 | | |
110 | | /// Creates column with the same type and specified size. |
111 | | /// If size is less current size, then data is cut. |
112 | | /// If size is greater, than default values are appended. |
113 | 0 | virtual MutablePtr clone_resized(size_t s) const { |
114 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
115 | 0 | "Method clone_resized is not supported for " + get_name()); |
116 | 0 | return nullptr; |
117 | 0 | } |
118 | | |
119 | | // shrink the end zeros for ColumnStr(also for who has it nested). so nest column will call it for all nested. |
120 | | // for non-str col, will reach here(do nothing). only ColumnStr will really shrink itself. |
121 | 48 | virtual void shrink_padding_chars() {} |
122 | | |
123 | | // Only used in ColumnObject to handle lifecycle of variant. Other columns would do nothing. |
124 | 0 | virtual void finalize() {} |
125 | | |
126 | | // Only used on ColumnDictionary |
127 | 467 | virtual void set_rowset_segment_id(std::pair<RowsetId, uint32_t> rowset_segment_id) {} |
128 | | |
129 | 0 | virtual std::pair<RowsetId, uint32_t> get_rowset_segment_id() const { return {}; } |
130 | | |
131 | | /// Returns number of values in column. |
132 | | virtual size_t size() const = 0; |
133 | | |
134 | | /// There are no values in columns. |
135 | 31.8k | bool empty() const { return size() == 0; } |
136 | | |
137 | | /// Returns value of n-th element in universal Field representation. |
138 | | /// Is used in rare cases, since creation of Field instance is expensive usually. |
139 | | virtual Field operator[](size_t n) const = 0; |
140 | | |
141 | | /// Like the previous one, but avoids extra copying if Field is in a container, for example. |
142 | | virtual void get(size_t n, Field& res) const = 0; |
143 | | |
144 | | /// If possible, returns pointer to memory chunk which contains n-th element (if it isn't possible, throws an exception) |
145 | | /// Is used to optimize some computations (in aggregation, for example). |
146 | | /// this function is used in ColumnString, ColumnFixedString, ColumnVector, not support in ColumnArray|ColumnMap... |
147 | | /// and should be pair with insert_data |
148 | 3 | virtual StringRef get_data_at(size_t n) const { |
149 | 3 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
150 | 3 | "Method get_data_at is not supported for " + get_name()); |
151 | 3 | } |
152 | | |
153 | 1 | virtual Int64 get_int(size_t /*n*/) const { |
154 | 1 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
155 | 1 | "Method get_int is not supported for " + get_name()); |
156 | 0 | return 0; |
157 | 1 | } |
158 | | |
159 | 1.79k | virtual bool is_null_at(size_t /*n*/) const { return false; } |
160 | | |
161 | | /** If column is numeric, return value of n-th element, casted to bool. |
162 | | * For NULL values of Nullable column returns false. |
163 | | * Otherwise throw an exception. |
164 | | */ |
165 | 1 | virtual bool get_bool(size_t /*n*/) const { |
166 | 1 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
167 | 1 | "Method get_bool is not supported for " + get_name()); |
168 | 0 | return false; |
169 | 1 | } |
170 | | |
171 | | /// Removes all elements outside of specified range. |
172 | | /// Is used in LIMIT operation, for example. |
173 | 334 | virtual Ptr cut(size_t start, size_t length) const final { |
174 | 334 | MutablePtr res = clone_empty(); |
175 | 334 | res->insert_range_from(*this, start, length); |
176 | 334 | return res; |
177 | 334 | } |
178 | | |
179 | | /** |
180 | | * erase data from 'start' and length elements from the column. |
181 | | * @param length The number of elements to remove from the start position of the column |
182 | | * @throws doris::Exception with NOT_IMPLEMENTED_ERROR if the operation is not supported |
183 | | * for this column type |
184 | | * eg: erase(3, 2) means remove the idx 3 and 4 elements (0-based) |
185 | | */ |
186 | 0 | virtual void erase(size_t start, size_t length) { |
187 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
188 | 0 | "Method erase is not supported for " + get_name()); |
189 | 0 | } |
190 | | |
191 | | /// cut or expand inplace. `this` would be moved, only the return value is avaliable. |
192 | 360 | virtual Ptr shrink(size_t length) const final { |
193 | | // NOLINTBEGIN(performance-move-const-arg) |
194 | 360 | MutablePtr res = std::move(*this).mutate(); |
195 | 360 | res->resize(length); |
196 | | // NOLINTEND(performance-move-const-arg) |
197 | 360 | return res->get_ptr(); |
198 | 360 | } |
199 | | |
200 | | /// Appends new value at the end of column (column's size is increased by 1). |
201 | | /// Is used to transform raw strings to Blocks (for example, inside input format parsers) |
202 | | virtual void insert(const Field& x) = 0; |
203 | | |
204 | | /// Appends n-th element from other column with the same type. |
205 | | /// Is used in merge-sort and merges. It could be implemented in inherited classes more optimally than default implementation. |
206 | | virtual void insert_from(const IColumn& src, size_t n); |
207 | | |
208 | | /// Appends range of elements from other column with the same type. |
209 | | /// Could be used to concatenate columns. |
210 | | virtual void insert_range_from(const IColumn& src, size_t start, size_t length) = 0; |
211 | | |
212 | | /// Appends range of elements from other column with the same type. |
213 | | /// Do not need throw execption in ColumnString overflow uint32, only |
214 | | /// use in join |
215 | | virtual void insert_range_from_ignore_overflow(const IColumn& src, size_t start, |
216 | 85.8k | size_t length) { |
217 | 85.8k | insert_range_from(src, start, length); |
218 | 85.8k | } |
219 | | |
220 | | /// Appends one element from other column with the same type multiple times. |
221 | 0 | virtual void insert_many_from(const IColumn& src, size_t position, size_t length) { |
222 | 0 | for (size_t i = 0; i < length; ++i) { |
223 | 0 | insert_from(src, position); |
224 | 0 | } |
225 | 0 | } |
226 | | |
227 | | // insert the data of target columns into self column according to positions |
228 | | // positions[i] means index of srcs whitch need to insert_from |
229 | | // the virtual function overhead of multiple calls to insert_from can be reduced to once |
230 | | virtual void insert_from_multi_column(const std::vector<const IColumn*>& srcs, |
231 | | const std::vector<size_t>& positions) = 0; |
232 | | |
233 | | /// Appends a batch elements from other column with the same type |
234 | | /// Also here should make sure indices_end is bigger than indices_begin |
235 | | /// indices_begin + indices_end represent the row indices of column src |
236 | | virtual void insert_indices_from(const IColumn& src, const uint32_t* indices_begin, |
237 | | const uint32_t* indices_end) = 0; |
238 | | |
239 | | /// Appends data located in specified memory chunk if it is possible (throws an exception if it cannot be implemented). |
240 | | /// used in ColumnString, ColumnFixedString, ColumnVector, not support in ColumnArray|ColumnMap... |
241 | | /// Is used to optimize some computations (in aggregation, for example). |
242 | | /// Parameter length could be ignored if column values have fixed size. |
243 | | /// All data will be inserted as single element |
244 | 0 | virtual void insert_data(const char* pos, size_t length) { |
245 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
246 | 0 | "Method insert_data is not supported for " + get_name()); |
247 | 0 | } |
248 | | |
249 | 43 | virtual void insert_many_fix_len_data(const char* pos, size_t num) { |
250 | 43 | throw doris::Exception( |
251 | 43 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
252 | 43 | "Method insert_many_fix_len_data is not supported for " + get_name()); |
253 | 43 | } |
254 | | |
255 | | // todo(zeno) Use dict_args temp object to cover all arguments |
256 | | virtual void insert_many_dict_data(const int32_t* data_array, size_t start_index, |
257 | | const StringRef* dict, size_t data_num, |
258 | 43 | uint32_t dict_num = 0) { |
259 | 43 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
260 | 43 | "Method insert_many_dict_data is not supported for " + get_name()); |
261 | 43 | } |
262 | | |
263 | | /// Insert binary data into column from a continuous buffer, the implementation maybe copy all binary data |
264 | | /// in one single time. |
265 | | virtual void insert_many_continuous_binary_data(const char* data, const uint32_t* offsets, |
266 | 43 | const size_t num) { |
267 | 43 | throw doris::Exception( |
268 | 43 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
269 | 43 | "Method insert_many_continuous_binary_data is not supported for " + get_name()); |
270 | 43 | } |
271 | | |
272 | 43 | virtual void insert_many_strings(const StringRef* strings, size_t num) { |
273 | 43 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
274 | 43 | "Method insert_many_strings is not supported for " + get_name()); |
275 | 43 | } |
276 | | |
277 | | virtual void insert_many_strings_overflow(const StringRef* strings, size_t num, |
278 | 43 | size_t max_length) { |
279 | 43 | throw doris::Exception( |
280 | 43 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
281 | 43 | "Method insert_many_strings_overflow is not supported for " + get_name()); |
282 | 43 | } |
283 | | |
284 | | // Here `pos` points to the memory data type is the same as the data type of the column. |
285 | | // This function is used by `insert_keys_into_columns` in AggregationNode. |
286 | 0 | virtual void insert_many_raw_data(const char* pos, size_t num) { |
287 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
288 | 0 | "Method insert_many_raw_data is not supported for " + get_name()); |
289 | 0 | } |
290 | | |
291 | 12 | void insert_data_repeatedly(const char* pos, size_t length, size_t data_num) { |
292 | 24 | for (size_t i = 0; i < data_num; ++i) { |
293 | 12 | insert_data(pos, length); |
294 | 12 | } |
295 | 12 | } |
296 | | |
297 | | /// Appends "default value". |
298 | | /// Is used when there are need to increase column size, but inserting value doesn't make sense. |
299 | | /// For example, ColumnNullable(Nested) absolutely ignores values of nested column if it is marked as NULL. |
300 | | virtual void insert_default() = 0; |
301 | | |
302 | | /// Appends "default value" multiple times. |
303 | 454 | virtual void insert_many_defaults(size_t length) { |
304 | 47.7M | for (size_t i = 0; i < length; ++i) { |
305 | 47.7M | insert_default(); |
306 | 47.7M | } |
307 | 454 | } |
308 | | |
309 | | /** Removes last n elements. |
310 | | * Is used to support exception-safety of several operations. |
311 | | * For example, sometimes insertion should be reverted if we catch an exception during operation processing. |
312 | | * If column has less than n elements or n == 0 - undefined behavior. |
313 | | */ |
314 | | virtual void pop_back(size_t n) = 0; |
315 | | |
316 | | /** Serializes n-th element. Serialized element should be placed continuously inside Arena's memory. |
317 | | * Serialized value can be deserialized to reconstruct original object. Is used in aggregation. |
318 | | * The method is similar to get_data_at(), but can work when element's value cannot be mapped to existing continuous memory chunk, |
319 | | * For example, to obtain unambiguous representation of Array of strings, strings data should be interleaved with their sizes. |
320 | | * Parameter begin should be used with Arena::alloc_continue. |
321 | | */ |
322 | | virtual StringRef serialize_value_into_arena(size_t n, Arena& arena, |
323 | | char const*& begin) const = 0; |
324 | | |
325 | | /// Deserializes a value that was serialized using IColumn::serialize_value_into_arena method. |
326 | | /// Returns pointer to the position after the read data. |
327 | | virtual const char* deserialize_and_insert_from_arena(const char* pos) = 0; |
328 | | |
329 | | /// Return the size of largest row. |
330 | | /// This is for calculating the memory size for vectorized serialization of aggregation keys. |
331 | 1 | virtual size_t get_max_row_byte_size() const { |
332 | 1 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
333 | 1 | "Method get_max_row_byte_size is not supported for " + get_name()); |
334 | 0 | return 0; |
335 | 1 | } |
336 | | |
337 | 0 | virtual void serialize_vec(StringRef* keys, size_t num_rows, size_t max_row_byte_size) const { |
338 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
339 | 0 | "Method serialize_vec is not supported for " + get_name()); |
340 | 0 | } |
341 | | |
342 | | virtual void serialize_vec_with_null_map(StringRef* keys, size_t num_rows, |
343 | 0 | const uint8_t* null_map) const { |
344 | 0 | throw doris::Exception( |
345 | 0 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
346 | 0 | "Method serialize_vec_with_null_map is not supported for " + get_name()); |
347 | 0 | } |
348 | | |
349 | | // This function deserializes group-by keys into column in the vectorized way. |
350 | 0 | virtual void deserialize_vec(StringRef* keys, const size_t num_rows) { |
351 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
352 | 0 | "Method deserialize_vec is not supported for " + get_name()); |
353 | 0 | } |
354 | | |
355 | | // Used in ColumnNullable::deserialize_vec |
356 | | virtual void deserialize_vec_with_null_map(StringRef* keys, const size_t num_rows, |
357 | 0 | const uint8_t* null_map) { |
358 | 0 | throw doris::Exception( |
359 | 0 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
360 | 0 | "Method deserialize_vec_with_null_map is not supported for " + get_name()); |
361 | 0 | } |
362 | | |
363 | | /// TODO: SipHash is slower than city or xx hash, rethink we should have a new interface |
364 | | /// Update state of hash function with value of n-th element. |
365 | | /// On subsequent calls of this method for sequence of column values of arbitrary types, |
366 | | /// passed bytes to hash must identify sequence of values unambiguously. |
367 | 0 | virtual void update_hash_with_value(size_t n, SipHash& hash) const { |
368 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
369 | 0 | "Method update_hash_with_value is not supported for " + get_name()); |
370 | 0 | } |
371 | | |
372 | | /// Update state of hash function with value of n elements to avoid the virtual function call |
373 | | /// null_data to mark whether need to do hash compute, null_data == nullptr |
374 | | /// means all element need to do hash function, else only *null_data != 0 need to do hash func |
375 | | /// do xxHash here, faster than other sip hash |
376 | | virtual void update_hashes_with_value(uint64_t* __restrict hashes, |
377 | 0 | const uint8_t* __restrict null_data = nullptr) const { |
378 | 0 | throw doris::Exception( |
379 | 0 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
380 | 0 | "Method update_hashes_with_value is not supported for " + get_name()); |
381 | 0 | } |
382 | | |
383 | | // use range for one hash value to avoid virtual function call in loop |
384 | | virtual void update_xxHash_with_value(size_t start, size_t end, uint64_t& hash, |
385 | 0 | const uint8_t* __restrict null_data) const { |
386 | 0 | throw doris::Exception( |
387 | 0 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
388 | 0 | "Method update_xxHash_with_value is not supported for " + get_name()); |
389 | 0 | } |
390 | | |
391 | | /// Update state of crc32 hash function with value of n elements to avoid the virtual function call |
392 | | /// null_data to mark whether need to do hash compute, null_data == nullptr |
393 | | /// means all element need to do hash function, else only *null_data != 0 need to do hash func |
394 | | virtual void update_crcs_with_value(uint32_t* __restrict hash, PrimitiveType type, |
395 | | uint32_t rows, uint32_t offset = 0, |
396 | 0 | const uint8_t* __restrict null_data = nullptr) const { |
397 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
398 | 0 | "Method update_crcs_with_value is not supported for " + get_name()); |
399 | 0 | } |
400 | | |
401 | | // use range for one hash value to avoid virtual function call in loop |
402 | | virtual void update_crc_with_value(size_t start, size_t end, uint32_t& hash, |
403 | 0 | const uint8_t* __restrict null_data) const { |
404 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
405 | 0 | "Method update_crc_with_value is not supported for " + get_name()); |
406 | 0 | } |
407 | | |
408 | | /** Removes elements that don't match the filter. |
409 | | * Is used in WHERE and HAVING operations. |
410 | | * If result_size_hint > 0, then makes advance reserve(result_size_hint) for the result column; |
411 | | * if 0, then don't makes reserve(), |
412 | | * otherwise (i.e. < 0), makes reserve() using size of source column. |
413 | | */ |
414 | | using Filter = PaddedPODArray<UInt8>; |
415 | | virtual Ptr filter(const Filter& filt, ssize_t result_size_hint) const = 0; |
416 | | |
417 | | /// This function will modify the original table. |
418 | | /// Return rows number after filtered. |
419 | | virtual size_t filter(const Filter& filter) = 0; |
420 | | |
421 | | /** |
422 | | * used by lazy materialization to filter column by selected rowids |
423 | | * Q: Why use IColumn* as args type instead of MutablePtr or ImmutablePtr ? |
424 | | * A: If use MutablePtr/ImmutablePtr as col_ptr's type, which means there could be many |
425 | | * convert(convert MutablePtr to ImmutablePtr or convert ImmutablePtr to MutablePtr) |
426 | | * happends in filter_by_selector because of mem-reuse logic or ColumnNullable, I think this is meaningless; |
427 | | * So using raw ptr directly here. |
428 | | * NOTICE: only column_nullable and predict_column, column_dictionary now support filter_by_selector |
429 | | * // nullable -> predict_column |
430 | | * // string (dictionary) -> column_dictionary |
431 | | */ |
432 | 0 | virtual Status filter_by_selector(const uint16_t* sel, size_t sel_size, IColumn* col_ptr) { |
433 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
434 | 0 | "Method filter_by_selector is not supported for {}, only " |
435 | 0 | "column_nullable, column_dictionary and predict_column support", |
436 | 0 | get_name()); |
437 | 0 | } |
438 | | |
439 | | /// Permutes elements using specified permutation. Is used in sortings. |
440 | | /// limit - if it isn't 0, puts only first limit elements in the result. |
441 | | using Permutation = PaddedPODArray<size_t>; |
442 | | virtual Ptr permute(const Permutation& perm, size_t limit) const = 0; |
443 | | |
444 | | /** Compares (*this)[n] and rhs[m]. Column rhs should have the same type. |
445 | | * Returns negative number, 0, or positive number (*this)[n] is less, equal, greater than rhs[m] respectively. |
446 | | * Is used in sortings. |
447 | | * |
448 | | * If one of element's value is NaN or NULLs, then: |
449 | | * - if nan_direction_hint == -1, NaN and NULLs are considered as least than everything other; |
450 | | * - if nan_direction_hint == 1, NaN and NULLs are considered as greatest than everything other. |
451 | | * For example, if nan_direction_hint == -1 is used by descending sorting, NaNs will be at the end. |
452 | | * |
453 | | * For non Nullable and non floating point types, nan_direction_hint is ignored. |
454 | | * For array/map/struct types, we compare with nested column element and offsets size |
455 | | */ |
456 | 0 | virtual int compare_at(size_t n, size_t m, const IColumn& rhs, int nan_direction_hint) const { |
457 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, "compare_at for " + get_name()); |
458 | 0 | } |
459 | | |
460 | | /** |
461 | | * To compare all rows in this column with another row (with row_id = rhs_row_id in column rhs) |
462 | | * @param nan_direction_hint and direction indicates the ordering. |
463 | | * @param cmp_res if we already has a comparison result for row i, e.g. cmp_res[i] = 1, we can skip row i |
464 | | * @param filter this stores comparison results for all rows. filter[i] = 1 means row i is less than row rhs_row_id in rhs |
465 | | */ |
466 | | virtual void compare_internal(size_t rhs_row_id, const IColumn& rhs, int nan_direction_hint, |
467 | | int direction, std::vector<uint8>& cmp_res, |
468 | | uint8* __restrict filter) const; |
469 | | |
470 | | /** Returns a permutation that sorts elements of this column, |
471 | | * i.e. perm[i]-th element of source column should be i-th element of sorted column. |
472 | | * reverse - true: descending order, false: ascending order. |
473 | | * limit - if isn't 0, then only first limit elements of the result column could be sorted. |
474 | | * nan_direction_hint - see above. |
475 | | */ |
476 | | virtual void get_permutation(bool reverse, size_t limit, int nan_direction_hint, |
477 | 43 | Permutation& res) const { |
478 | 43 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
479 | 43 | "get_permutation for " + get_name()); |
480 | 43 | } |
481 | | |
482 | | /** Copies each element according offsets parameter. |
483 | | * (i-th element should be copied offsets[i] - offsets[i - 1] times.) |
484 | | * It is necessary in ARRAY JOIN operation. |
485 | | */ |
486 | | virtual Ptr replicate(const Offsets& offsets) const = 0; |
487 | | |
488 | | /** Split column to smaller columns. Each value goes to column index, selected by corresponding element of 'selector'. |
489 | | * Selector must contain values from 0 to num_columns - 1. |
490 | | * For default implementation, see column_impl.h |
491 | | */ |
492 | | using ColumnIndex = UInt64; |
493 | | using Selector = PaddedPODArray<ColumnIndex>; |
494 | | |
495 | | // The append_data_by_selector function requires the column to implement the insert_from function. |
496 | | // In fact, this function is just calling insert_from but without the overhead of a virtual function. |
497 | | |
498 | | virtual void append_data_by_selector(MutablePtr& res, const Selector& selector) const = 0; |
499 | | |
500 | | // Here, begin and end represent the range of the Selector. |
501 | | virtual void append_data_by_selector(MutablePtr& res, const Selector& selector, size_t begin, |
502 | | size_t end) const = 0; |
503 | | |
504 | | /// Insert data from several other columns according to source mask (used in vertical merge). |
505 | | /// For now it is a helper to de-virtualize calls to insert*() functions inside gather loop |
506 | | /// (descendants should call gatherer_stream.gather(*this) to implement this function.) |
507 | | /// TODO: interface decoupled from ColumnGathererStream that allows non-generic specializations. |
508 | | // virtual void gather(ColumnGathererStream & gatherer_stream) = 0; |
509 | | |
510 | | /// Reserves memory for specified amount of elements. If reservation isn't possible, does nothing. |
511 | | /// It affects performance only (not correctness). |
512 | 2 | virtual void reserve(size_t /*n*/) {} |
513 | | |
514 | | /// Resize memory for specified amount of elements. If reservation isn't possible, does nothing. |
515 | | /// It affects performance only (not correctness). |
516 | | /// Note. resize means not only change column self but also sub-columns if have. |
517 | 0 | virtual void resize(size_t /*n*/) {} |
518 | | |
519 | | /// Size of column data in memory (may be approximate) - for profiling. Zero, if could not be determined. |
520 | | virtual size_t byte_size() const = 0; |
521 | | |
522 | | /** |
523 | | * @brief Checks whether the current column has enough capacity to accommodate the given source column. |
524 | | * |
525 | | * This pure virtual function should be implemented by derived classes to determine whether the |
526 | | * current column has enough reserved memory to hold the data of the specified `src` column. |
527 | | * |
528 | | * @param src The source column whose data needs to be checked for fitting into the current column. |
529 | | * @return true if the current column has enough capacity to hold the `src` data, false otherwise. |
530 | | */ |
531 | | virtual bool has_enough_capacity(const IColumn& src) const = 0; |
532 | | |
533 | | /// Size of memory, allocated for column. |
534 | | /// This is greater or equals to byte_size due to memory reservation in containers. |
535 | | /// Zero, if could not be determined. |
536 | | virtual size_t allocated_bytes() const = 0; |
537 | | |
538 | | /// If the column contains subcolumns (such as Array, Nullable, etc), do callback on them. |
539 | | /// Shallow: doesn't do recursive calls; don't do call for itself. |
540 | | using ColumnCallback = std::function<void(WrappedPtr&)>; |
541 | | using ImutableColumnCallback = std::function<void(const IColumn&)>; |
542 | 674k | virtual void for_each_subcolumn(ColumnCallback) {} |
543 | | |
544 | | /// Columns have equal structure. |
545 | | /// If true - you can use "compare_at", "insert_from", etc. methods. |
546 | 0 | virtual bool structure_equals(const IColumn&) const { |
547 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
548 | 0 | "Method structure_equals is not supported for " + get_name()); |
549 | 0 | return false; |
550 | 0 | } |
551 | | |
552 | 886k | MutablePtr mutate() const&& { |
553 | 886k | MutablePtr res = shallow_mutate(); |
554 | 886k | res->for_each_subcolumn( |
555 | 886k | [](WrappedPtr& subcolumn) { subcolumn = std::move(*subcolumn).mutate(); }); |
556 | 886k | return res; |
557 | 886k | } |
558 | | |
559 | 0 | static MutablePtr mutate(Ptr ptr) { |
560 | 0 | MutablePtr res = ptr->shallow_mutate(); /// Now use_count is 2. |
561 | 0 | ptr.reset(); /// Reset use_count to 1. |
562 | 0 | res->for_each_subcolumn( |
563 | 0 | [](WrappedPtr& subcolumn) { subcolumn = std::move(*subcolumn).mutate(); }); |
564 | 0 | return res; |
565 | 0 | } |
566 | | |
567 | | /** Some columns can contain another columns inside. |
568 | | * So, we have a tree of columns. But not all combinations are possible. |
569 | | * There are the following rules: |
570 | | * |
571 | | * ColumnConst may be only at top. It cannot be inside any column. |
572 | | * ColumnNullable can contain only simple columns. |
573 | | */ |
574 | | |
575 | | /// Various properties on behaviour of column type. |
576 | | |
577 | | /// It's true for ColumnNullable only. |
578 | 7.78M | virtual bool is_nullable() const { return false; } |
579 | | /// It's true for ColumnNullable, can be true or false for ColumnConst, etc. |
580 | 0 | virtual bool is_concrete_nullable() const { return false; } |
581 | | |
582 | | // true if column has null element |
583 | 0 | virtual bool has_null() const { return false; } |
584 | | |
585 | | // true if column has null element [0,size) |
586 | 1.65k | virtual bool has_null(size_t size) const { return false; } |
587 | | |
588 | 564 | virtual bool is_exclusive() const { return use_count() == 1; } |
589 | | |
590 | | /// Clear data of column, just like vector clear |
591 | | virtual void clear() = 0; |
592 | | |
593 | | /** Memory layout properties. |
594 | | * |
595 | | * Each value of a column can be placed in memory contiguously or not. |
596 | | * |
597 | | * Example: simple columns like UInt64 or FixedString store their values contiguously in single memory buffer. |
598 | | * |
599 | | * Example: Tuple store values of each component in separate subcolumn, so the values of Tuples with at least two components are not contiguous. |
600 | | * Another example is Nullable. Each value have null flag, that is stored separately, so the value is not contiguous in memory. |
601 | | * |
602 | | * There are some important cases, when values are not stored contiguously, but for each value, you can get contiguous memory segment, |
603 | | * that will unambiguously identify the value. In this case, methods get_data_at and insert_data are implemented. |
604 | | * Example: String column: bytes of strings are stored concatenated in one memory buffer |
605 | | * and offsets to that buffer are stored in another buffer. The same is for Array of fixed-size contiguous elements. |
606 | | * |
607 | | * To avoid confusion between these cases, we don't have isContiguous method. |
608 | | */ |
609 | | |
610 | 1 | virtual StringRef get_raw_data() const { |
611 | 1 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
612 | 1 | "Column {} is not a contiguous block of memory", get_name()); |
613 | 0 | return StringRef {}; |
614 | 1 | } |
615 | | |
616 | | /// Returns ratio of values in column, that are equal to default value of column. |
617 | | /// Checks only @sample_ratio ratio of rows. |
618 | 0 | virtual double get_ratio_of_default_rows(double sample_ratio = 1.0) const { return 0.0; } |
619 | | |
620 | | // Column is ColumnString/ColumnArray/ColumnMap or other variable length column at every row |
621 | 15 | virtual bool is_variable_length() const { return false; } |
622 | | |
623 | 2.48k | virtual bool is_column_string() const { return false; } |
624 | | |
625 | 43 | virtual bool is_column_string64() const { return false; } |
626 | | |
627 | 4.35k | virtual bool is_column_dictionary() const { return false; } |
628 | | |
629 | | /// If the only value column can contain is NULL. |
630 | 21.6k | virtual bool only_null() const { return false; } |
631 | | |
632 | | /** |
633 | | * ColumnSorter is used to sort each columns in a Block. In this sorting pattern, sorting a |
634 | | * column will produce a list of EqualRange which has the same elements respectively. And for |
635 | | * next column in this block, we only need to sort rows in those `range`. |
636 | | * |
637 | | * Besides, we do not materialize sorted data eagerly. Instead, the intermediate sorting results |
638 | | * are represendted by permutation and data will be materialized after all of columns are sorted. |
639 | | * |
640 | | * @sorter: ColumnSorter is used to do sorting. |
641 | | * @flags : indicates if current item equals to the previous one. |
642 | | * @perms : permutation after sorting |
643 | | * @range : EqualRange which has the same elements respectively. |
644 | | * @last_column : indicates if this column is the last in this block. |
645 | | */ |
646 | | virtual void sort_column(const ColumnSorter* sorter, EqualFlags& flags, |
647 | | IColumn::Permutation& perms, EqualRange& range, |
648 | | bool last_column) const; |
649 | | |
650 | 1.49M | virtual ~IColumn() = default; |
651 | 1.49M | IColumn() = default; |
652 | 641 | IColumn(const IColumn&) = default; |
653 | | |
654 | | /** Print column name, size, and recursively print all subcolumns. |
655 | | */ |
656 | | String dump_structure() const; |
657 | | |
658 | | // only used in agg value replace for column which is not variable length, eg.BlockReader::_copy_value_data |
659 | | // usage: self_column.replace_column_data(other_column, other_column's row index, self_column's row index) |
660 | | virtual void replace_column_data(const IColumn&, size_t row, size_t self_row = 0) = 0; |
661 | | // replace data to default value if null, used to avoid null data output decimal check failure |
662 | | // usage: nested_column.replace_column_null_data(nested_null_map.data()) |
663 | | // only wrok on column_vector and column column decimal, there will be no behavior when other columns type call this method |
664 | 238 | virtual void replace_column_null_data(const uint8_t* __restrict null_map) {} |
665 | | |
666 | 520k | virtual bool is_date_type() const { return is_date; } |
667 | 520k | virtual bool is_datetime_type() const { return is_date_time; } |
668 | | |
669 | 17.2k | virtual void set_date_type() { is_date = true; } |
670 | 17.4k | virtual void set_datetime_type() { is_date_time = true; } |
671 | | |
672 | 18.8k | void copy_date_types(const IColumn& col) { |
673 | 18.8k | if (col.is_date_type()) { |
674 | 5.83k | set_date_type(); |
675 | 5.83k | } |
676 | 18.8k | if (col.is_datetime_type()) { |
677 | 5.82k | set_datetime_type(); |
678 | 5.82k | } |
679 | 18.8k | } |
680 | | |
681 | | // todo(wb): a temporary implemention, need re-abstract here |
682 | | bool is_date = false; |
683 | | bool is_date_time = false; |
684 | | |
685 | | protected: |
686 | | template <typename Derived> |
687 | | void append_data_by_selector_impl(MutablePtr& res, const Selector& selector) const; |
688 | | template <typename Derived> |
689 | | void append_data_by_selector_impl(MutablePtr& res, const Selector& selector, size_t begin, |
690 | | size_t end) const; |
691 | | template <typename Derived> |
692 | | void insert_from_multi_column_impl(const std::vector<const IColumn*>& srcs, |
693 | | const std::vector<size_t>& positions); |
694 | | }; |
695 | | |
696 | | using ColumnPtr = IColumn::Ptr; |
697 | | using MutableColumnPtr = IColumn::MutablePtr; |
698 | | using Columns = std::vector<ColumnPtr>; |
699 | | using MutableColumns = std::vector<MutableColumnPtr>; |
700 | | using ColumnPtrs = std::vector<ColumnPtr>; |
701 | | using ColumnRawPtrs = std::vector<const IColumn*>; |
702 | | |
703 | | template <typename... Args> |
704 | | struct IsMutableColumns; |
705 | | |
706 | | template <typename Arg, typename... Args> |
707 | | struct IsMutableColumns<Arg, Args...> { |
708 | | static const bool value = |
709 | | std::is_assignable<MutableColumnPtr&&, Arg>::value && IsMutableColumns<Args...>::value; |
710 | | }; |
711 | | |
712 | | template <> |
713 | | struct IsMutableColumns<> { |
714 | | static const bool value = true; |
715 | | }; |
716 | | |
717 | | // prefer assert_cast than check_and_get |
718 | | template <typename Type> |
719 | 284k | const Type* check_and_get_column(const IColumn& column) { |
720 | 284k | return typeid_cast<const Type*>(&column); |
721 | 284k | } _ZN5doris10vectorized20check_and_get_columnINS0_11ColumnArrayEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 60 | const Type* check_and_get_column(const IColumn& column) { | 720 | 60 | return typeid_cast<const Type*>(&column); | 721 | 60 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIjEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 350 | const Type* check_and_get_column(const IColumn& column) { | 720 | 350 | return typeid_cast<const Type*>(&column); | 721 | 350 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIoEEEEPKT_RKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIhEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 3.84k | const Type* check_and_get_column(const IColumn& column) { | 720 | 3.84k | return typeid_cast<const Type*>(&column); | 721 | 3.84k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_14ColumnNullableEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 257k | const Type* check_and_get_column(const IColumn& column) { | 720 | 257k | return typeid_cast<const Type*>(&column); | 721 | 257k | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE5EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE5EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE11EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE11EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE12EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE12EEEEEPKT_RKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIiEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 450 | const Type* check_and_get_column(const IColumn& column) { | 720 | 450 | return typeid_cast<const Type*>(&column); | 721 | 450 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIdEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 216 | const Type* check_and_get_column(const IColumn& column) { | 720 | 216 | return typeid_cast<const Type*>(&column); | 721 | 216 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIlEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 1.14k | const Type* check_and_get_column(const IColumn& column) { | 720 | 1.14k | return typeid_cast<const Type*>(&column); | 721 | 1.14k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_23ColumnFixedLengthObjectEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 2 | const Type* check_and_get_column(const IColumn& column) { | 720 | 2 | return typeid_cast<const Type*>(&column); | 721 | 2 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIaEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 283 | const Type* check_and_get_column(const IColumn& column) { | 720 | 283 | return typeid_cast<const Type*>(&column); | 721 | 283 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIsEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 317 | const Type* check_and_get_column(const IColumn& column) { | 720 | 317 | return typeid_cast<const Type*>(&column); | 721 | 317 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorInEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 221 | const Type* check_and_get_column(const IColumn& column) { | 720 | 221 | return typeid_cast<const Type*>(&column); | 721 | 221 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalInEEEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 23 | const Type* check_and_get_column(const IColumn& column) { | 720 | 23 | return typeid_cast<const Type*>(&column); | 721 | 23 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIfEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 201 | const Type* check_and_get_column(const IColumn& column) { | 720 | 201 | return typeid_cast<const Type*>(&column); | 721 | 201 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorImEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 538 | const Type* check_and_get_column(const IColumn& column) { | 720 | 538 | return typeid_cast<const Type*>(&column); | 721 | 538 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalIiEEEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 102 | const Type* check_and_get_column(const IColumn& column) { | 720 | 102 | return typeid_cast<const Type*>(&column); | 721 | 102 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalIlEEEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 118 | const Type* check_and_get_column(const IColumn& column) { | 720 | 118 | return typeid_cast<const Type*>(&column); | 721 | 118 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_12Decimal128V3EEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 85 | const Type* check_and_get_column(const IColumn& column) { | 720 | 85 | return typeid_cast<const Type*>(&column); | 721 | 85 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalIN4wide7integerILm256EiEEEEEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 99 | const Type* check_and_get_column(const IColumn& column) { | 720 | 99 | return typeid_cast<const Type*>(&column); | 721 | 99 | } |
_ZN5doris10vectorized20check_and_get_columnIKNS0_14ColumnNullableEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 1.35k | const Type* check_and_get_column(const IColumn& column) { | 720 | 1.35k | return typeid_cast<const Type*>(&column); | 721 | 1.35k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_11ColumnConstEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 17.6k | const Type* check_and_get_column(const IColumn& column) { | 720 | 17.6k | return typeid_cast<const Type*>(&column); | 721 | 17.6k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_9ColumnStrIjEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 221 | const Type* check_and_get_column(const IColumn& column) { | 720 | 221 | return typeid_cast<const Type*>(&column); | 721 | 221 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_11ColumnConstEEEPKT_RKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorItEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 1 | const Type* check_and_get_column(const IColumn& column) { | 720 | 1 | return typeid_cast<const Type*>(&column); | 721 | 1 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIN4wide7integerILm128EjEEEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE3EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE3EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE4EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE4EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE6EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE6EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE7EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE7EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE8EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE8EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE9EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE9EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE20EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE20EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE28EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE28EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE29EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE29EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE30EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE30EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE35EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE35EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_16ColumnDictionaryIiEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE15EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE15EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE23EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE23EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE25EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE25EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE26EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE26EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE2EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE2EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE36EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE36EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_19PredicateColumnTypeILNS_13PrimitiveTypeE37EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE37EEEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_9ColumnMapEEEPKT_RKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnStructEEEPKT_RKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnObjectEEEPKT_RKNS0_7IColumnE Line | Count | Source | 719 | 3 | const Type* check_and_get_column(const IColumn& column) { | 720 | 3 | return typeid_cast<const Type*>(&column); | 721 | 3 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorIhEEEEPKT_RKNS0_7IColumnE |
722 | | |
723 | | template <typename Type> |
724 | 273M | const Type* check_and_get_column(const IColumn* column) { |
725 | 273M | return typeid_cast<const Type*>(column); |
726 | 273M | } _ZN5doris10vectorized20check_and_get_columnINS0_14ColumnNullableEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 96.5k | const Type* check_and_get_column(const IColumn* column) { | 725 | 96.5k | return typeid_cast<const Type*>(column); | 726 | 96.5k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE5EEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 4.07k | const Type* check_and_get_column(const IColumn* column) { | 725 | 4.07k | return typeid_cast<const Type*>(column); | 726 | 4.07k | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE11EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE12EEEEEPKT_PKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnINS0_11ColumnConstEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 272M | const Type* check_and_get_column(const IColumn* column) { | 725 | 272M | return typeid_cast<const Type*>(column); | 726 | 272M | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIiEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 73 | const Type* check_and_get_column(const IColumn* column) { | 725 | 73 | return typeid_cast<const Type*>(column); | 726 | 73 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIlEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 77 | const Type* check_and_get_column(const IColumn* column) { | 725 | 77 | return typeid_cast<const Type*>(column); | 726 | 77 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_9ColumnStrIjEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 217k | const Type* check_and_get_column(const IColumn* column) { | 725 | 217k | return typeid_cast<const Type*>(column); | 726 | 217k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_9ColumnStrImEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 43 | const Type* check_and_get_column(const IColumn* column) { | 725 | 43 | return typeid_cast<const Type*>(column); | 726 | 43 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_11ColumnArrayEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 2.06k | const Type* check_and_get_column(const IColumn* column) { | 725 | 2.06k | return typeid_cast<const Type*>(column); | 726 | 2.06k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIaEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 51 | const Type* check_and_get_column(const IColumn* column) { | 725 | 51 | return typeid_cast<const Type*>(column); | 726 | 51 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIsEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 45 | const Type* check_and_get_column(const IColumn* column) { | 725 | 45 | return typeid_cast<const Type*>(column); | 726 | 45 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorInEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 15 | const Type* check_and_get_column(const IColumn* column) { | 725 | 15 | return typeid_cast<const Type*>(column); | 726 | 15 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIfEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 15 | const Type* check_and_get_column(const IColumn* column) { | 725 | 15 | return typeid_cast<const Type*>(column); | 726 | 15 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIdEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 79 | const Type* check_and_get_column(const IColumn* column) { | 725 | 79 | return typeid_cast<const Type*>(column); | 726 | 79 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIhEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 36 | const Type* check_and_get_column(const IColumn* column) { | 725 | 36 | return typeid_cast<const Type*>(column); | 726 | 36 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorItEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 33 | const Type* check_and_get_column(const IColumn* column) { | 725 | 33 | return typeid_cast<const Type*>(column); | 726 | 33 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIjEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 69 | const Type* check_and_get_column(const IColumn* column) { | 725 | 69 | return typeid_cast<const Type*>(column); | 726 | 69 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorImEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 70 | const Type* check_and_get_column(const IColumn* column) { | 725 | 70 | return typeid_cast<const Type*>(column); | 726 | 70 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalIiEEEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 1 | const Type* check_and_get_column(const IColumn* column) { | 725 | 1 | return typeid_cast<const Type*>(column); | 726 | 1 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalIlEEEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 3 | const Type* check_and_get_column(const IColumn* column) { | 725 | 3 | return typeid_cast<const Type*>(column); | 726 | 3 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalInEEEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 2 | const Type* check_and_get_column(const IColumn* column) { | 725 | 2 | return typeid_cast<const Type*>(column); | 726 | 2 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_12Decimal128V3EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalIN4wide7integerILm256EiEEEEEEEEPKT_PKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorIhEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 4 | const Type* check_and_get_column(const IColumn* column) { | 725 | 4 | return typeid_cast<const Type*>(column); | 726 | 4 | } |
_ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorIaEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 2 | const Type* check_and_get_column(const IColumn* column) { | 725 | 2 | return typeid_cast<const Type*>(column); | 726 | 2 | } |
_ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorIsEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 2 | const Type* check_and_get_column(const IColumn* column) { | 725 | 2 | return typeid_cast<const Type*>(column); | 726 | 2 | } |
_ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorIiEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 2 | const Type* check_and_get_column(const IColumn* column) { | 725 | 2 | return typeid_cast<const Type*>(column); | 726 | 2 | } |
_ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorIlEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 2 | const Type* check_and_get_column(const IColumn* column) { | 725 | 2 | return typeid_cast<const Type*>(column); | 726 | 2 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorInEEEEPKT_PKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorIdEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 2 | const Type* check_and_get_column(const IColumn* column) { | 725 | 2 | return typeid_cast<const Type*>(column); | 726 | 2 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_9ColumnMapEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 8 | const Type* check_and_get_column(const IColumn* column) { | 725 | 8 | return typeid_cast<const Type*>(column); | 726 | 8 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnStructEEEPKT_PKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIoEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 2 | const Type* check_and_get_column(const IColumn* column) { | 725 | 2 | return typeid_cast<const Type*>(column); | 726 | 2 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE3EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE4EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE6EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE7EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE8EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE9EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE20EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE28EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE29EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE30EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE35EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_16ColumnDictionaryIiEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE15EEEEEPKT_PKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE23EEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 128 | const Type* check_and_get_column(const IColumn* column) { | 725 | 128 | return typeid_cast<const Type*>(column); | 726 | 128 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE25EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE26EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE2EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE36EEEEEPKT_PKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE37EEEEEPKT_PKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnIKNS0_11ColumnArrayEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 70 | const Type* check_and_get_column(const IColumn* column) { | 725 | 70 | return typeid_cast<const Type*>(column); | 726 | 70 | } |
_ZN5doris10vectorized20check_and_get_columnIKNS0_14ColumnNullableEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 12 | const Type* check_and_get_column(const IColumn* column) { | 725 | 12 | return typeid_cast<const Type*>(column); | 726 | 12 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_17ColumnComplexTypeINS_11BitmapValueEEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 8 | const Type* check_and_get_column(const IColumn* column) { | 725 | 8 | return typeid_cast<const Type*>(column); | 726 | 8 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_17ColumnComplexTypeINS_11HyperLogLogEEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 724 | 2 | const Type* check_and_get_column(const IColumn* column) { | 725 | 2 | return typeid_cast<const Type*>(column); | 726 | 2 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnObjectEEEPKT_PKNS0_7IColumnE |
727 | | |
728 | | template <typename Type> |
729 | 272M | bool is_column(const IColumn& column) { |
730 | 272M | return check_and_get_column<Type>(&column); |
731 | 272M | } _ZN5doris10vectorized9is_columnINS0_9ColumnStrIjEEEEbRKNS0_7IColumnE Line | Count | Source | 729 | 129 | bool is_column(const IColumn& column) { | 730 | 129 | return check_and_get_column<Type>(&column); | 731 | 129 | } |
_ZN5doris10vectorized9is_columnINS0_11ColumnConstEEEbRKNS0_7IColumnE Line | Count | Source | 729 | 272M | bool is_column(const IColumn& column) { | 730 | 272M | return check_and_get_column<Type>(&column); | 731 | 272M | } |
_ZN5doris10vectorized9is_columnINS0_9ColumnStrImEEEEbRKNS0_7IColumnE Line | Count | Source | 729 | 43 | bool is_column(const IColumn& column) { | 730 | 43 | return check_and_get_column<Type>(&column); | 731 | 43 | } |
_ZN5doris10vectorized9is_columnINS0_14ColumnNullableEEEbRKNS0_7IColumnE Line | Count | Source | 729 | 32.0k | bool is_column(const IColumn& column) { | 730 | 32.0k | return check_and_get_column<Type>(&column); | 731 | 32.0k | } |
Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIhEEEEbRKNS0_7IColumnE _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIaEEEEbRKNS0_7IColumnE Line | Count | Source | 729 | 2 | bool is_column(const IColumn& column) { | 730 | 2 | return check_and_get_column<Type>(&column); | 731 | 2 | } |
Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIsEEEEbRKNS0_7IColumnE _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIiEEEEbRKNS0_7IColumnE Line | Count | Source | 729 | 3 | bool is_column(const IColumn& column) { | 730 | 3 | return check_and_get_column<Type>(&column); | 731 | 3 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIlEEEEbRKNS0_7IColumnE Line | Count | Source | 729 | 5 | bool is_column(const IColumn& column) { | 730 | 5 | return check_and_get_column<Type>(&column); | 731 | 5 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorInEEEEbRKNS0_7IColumnE Line | Count | Source | 729 | 1 | bool is_column(const IColumn& column) { | 730 | 1 | return check_and_get_column<Type>(&column); | 731 | 1 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIfEEEEbRKNS0_7IColumnE Line | Count | Source | 729 | 1 | bool is_column(const IColumn& column) { | 730 | 1 | return check_and_get_column<Type>(&column); | 731 | 1 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIdEEEEbRKNS0_7IColumnE Line | Count | Source | 729 | 1 | bool is_column(const IColumn& column) { | 730 | 1 | return check_and_get_column<Type>(&column); | 731 | 1 | } |
Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_13ColumnDecimalINS0_7DecimalIiEEEEEEbRKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_13ColumnDecimalINS0_7DecimalIlEEEEEEbRKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_13ColumnDecimalINS0_12Decimal128V3EEEEEbRKNS0_7IColumnE _ZN5doris10vectorized9is_columnINS0_13ColumnDecimalINS0_7DecimalInEEEEEEbRKNS0_7IColumnE Line | Count | Source | 729 | 2 | bool is_column(const IColumn& column) { | 730 | 2 | return check_and_get_column<Type>(&column); | 731 | 2 | } |
Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_13ColumnDecimalINS0_7DecimalIN4wide7integerILm256EiEEEEEEEEbRKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIjEEEEbRKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_12ColumnVectorImEEEEbRKNS0_7IColumnE |
732 | | |
733 | | template <typename Type> |
734 | 1.64k | bool is_column(const IColumn* column) { |
735 | 1.64k | return check_and_get_column<Type>(column); |
736 | 1.64k | } _ZN5doris10vectorized9is_columnINS0_11ColumnArrayEEEbPKNS0_7IColumnE Line | Count | Source | 734 | 1.58k | bool is_column(const IColumn* column) { | 735 | 1.58k | return check_and_get_column<Type>(column); | 736 | 1.58k | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIiEEEEbPKNS0_7IColumnE Line | Count | Source | 734 | 7 | bool is_column(const IColumn* column) { | 735 | 7 | return check_and_get_column<Type>(column); | 736 | 7 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIaEEEEbPKNS0_7IColumnE Line | Count | Source | 734 | 7 | bool is_column(const IColumn* column) { | 735 | 7 | return check_and_get_column<Type>(column); | 736 | 7 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIsEEEEbPKNS0_7IColumnE Line | Count | Source | 734 | 7 | bool is_column(const IColumn* column) { | 735 | 7 | return check_and_get_column<Type>(column); | 736 | 7 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIlEEEEbPKNS0_7IColumnE Line | Count | Source | 734 | 4 | bool is_column(const IColumn* column) { | 735 | 4 | return check_and_get_column<Type>(column); | 736 | 4 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorInEEEEbPKNS0_7IColumnE Line | Count | Source | 734 | 4 | bool is_column(const IColumn* column) { | 735 | 4 | return check_and_get_column<Type>(column); | 736 | 4 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIfEEEEbPKNS0_7IColumnE Line | Count | Source | 734 | 4 | bool is_column(const IColumn* column) { | 735 | 4 | return check_and_get_column<Type>(column); | 736 | 4 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIdEEEEbPKNS0_7IColumnE Line | Count | Source | 734 | 4 | bool is_column(const IColumn* column) { | 735 | 4 | return check_and_get_column<Type>(column); | 736 | 4 | } |
_ZN5doris10vectorized9is_columnINS0_9ColumnMapEEEbPKNS0_7IColumnE Line | Count | Source | 734 | 8 | bool is_column(const IColumn* column) { | 735 | 8 | return check_and_get_column<Type>(column); | 736 | 8 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorItEEEEbPKNS0_7IColumnE Line | Count | Source | 734 | 3 | bool is_column(const IColumn* column) { | 735 | 3 | return check_and_get_column<Type>(column); | 736 | 3 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIjEEEEbPKNS0_7IColumnE Line | Count | Source | 734 | 3 | bool is_column(const IColumn* column) { | 735 | 3 | return check_and_get_column<Type>(column); | 736 | 3 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorImEEEEbPKNS0_7IColumnE Line | Count | Source | 734 | 3 | bool is_column(const IColumn* column) { | 735 | 3 | return check_and_get_column<Type>(column); | 736 | 3 | } |
Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIoEEEEbPKNS0_7IColumnE _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIhEEEEbPKNS0_7IColumnE Line | Count | Source | 734 | 3 | bool is_column(const IColumn* column) { | 735 | 3 | return check_and_get_column<Type>(column); | 736 | 3 | } |
Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_13ColumnDecimalINS0_7DecimalIiEEEEEEbPKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_13ColumnDecimalINS0_7DecimalIlEEEEEEbPKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_13ColumnDecimalINS0_7DecimalInEEEEEEbPKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_13ColumnDecimalINS0_12Decimal128V3EEEEEbPKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_13ColumnDecimalINS0_7DecimalIN4wide7integerILm256EiEEEEEEEEbPKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_9ColumnStrIjEEEEbPKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_12ColumnStructEEEbPKNS0_7IColumnE |
737 | | |
738 | | // check_and_get_column_ptr is used to return a ColumnPtr of a specific column type, |
739 | | // which will hold ownership. This prevents the occurrence of dangling pointers due to certain situations. |
740 | | template <typename ColumnType> |
741 | 4 | ColumnType::Ptr check_and_get_column_ptr(const ColumnPtr& column) { |
742 | 4 | const ColumnType* raw_type_ptr = check_and_get_column<ColumnType>(column.get()); |
743 | 4 | if (raw_type_ptr == nullptr) { |
744 | 1 | return nullptr; |
745 | 1 | } |
746 | 3 | return typename ColumnType::Ptr(const_cast<ColumnType*>(raw_type_ptr)); |
747 | 4 | } _ZN5doris10vectorized24check_and_get_column_ptrINS0_12ColumnVectorIiEEEENT_3PtrERKNS_3COWINS0_7IColumnEE13immutable_ptrIS7_EE Line | Count | Source | 741 | 2 | ColumnType::Ptr check_and_get_column_ptr(const ColumnPtr& column) { | 742 | 2 | const ColumnType* raw_type_ptr = check_and_get_column<ColumnType>(column.get()); | 743 | 2 | if (raw_type_ptr == nullptr) { | 744 | 0 | return nullptr; | 745 | 0 | } | 746 | 2 | return typename ColumnType::Ptr(const_cast<ColumnType*>(raw_type_ptr)); | 747 | 2 | } |
_ZN5doris10vectorized24check_and_get_column_ptrINS0_12ColumnVectorIlEEEENT_3PtrERKNS_3COWINS0_7IColumnEE13immutable_ptrIS7_EE Line | Count | Source | 741 | 1 | ColumnType::Ptr check_and_get_column_ptr(const ColumnPtr& column) { | 742 | 1 | const ColumnType* raw_type_ptr = check_and_get_column<ColumnType>(column.get()); | 743 | 1 | if (raw_type_ptr == nullptr) { | 744 | 1 | return nullptr; | 745 | 1 | } | 746 | 0 | return typename ColumnType::Ptr(const_cast<ColumnType*>(raw_type_ptr)); | 747 | 1 | } |
_ZN5doris10vectorized24check_and_get_column_ptrINS0_14ColumnNullableEEENT_3PtrERKNS_3COWINS0_7IColumnEE13immutable_ptrIS6_EE Line | Count | Source | 741 | 1 | ColumnType::Ptr check_and_get_column_ptr(const ColumnPtr& column) { | 742 | 1 | const ColumnType* raw_type_ptr = check_and_get_column<ColumnType>(column.get()); | 743 | 1 | if (raw_type_ptr == nullptr) { | 744 | 0 | return nullptr; | 745 | 0 | } | 746 | 1 | return typename ColumnType::Ptr(const_cast<ColumnType*>(raw_type_ptr)); | 747 | 1 | } |
|
748 | | |
749 | | /// True if column's an ColumnConst instance. It's just a syntax sugar for type check. |
750 | | bool is_column_const(const IColumn& column); |
751 | | |
752 | | /// True if column's an ColumnNullable instance. It's just a syntax sugar for type check. |
753 | | bool is_column_nullable(const IColumn& column); |
754 | | } // namespace doris::vectorized |
755 | | |
756 | | // Wrap `ColumnPtr` because `ColumnPtr` can't be used in forward declaration. |
757 | | namespace doris { |
758 | | struct ColumnPtrWrapper { |
759 | | vectorized::ColumnPtr column_ptr; |
760 | | |
761 | 17.7k | ColumnPtrWrapper(vectorized::ColumnPtr col) : column_ptr(std::move(col)) {} |
762 | | }; |
763 | | } // namespace doris |