/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 | 216k | 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 | 347 | 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 | 6.31k | 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.1k | 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 | | /// cut or expand inplace. `this` would be moved, only the return value is avaliable. |
180 | 360 | virtual Ptr shrink(size_t length) const final { |
181 | | // NOLINTBEGIN(performance-move-const-arg) |
182 | 360 | MutablePtr res = std::move(*this).mutate(); |
183 | 360 | res->resize(length); |
184 | | // NOLINTEND(performance-move-const-arg) |
185 | 360 | return res->get_ptr(); |
186 | 360 | } |
187 | | |
188 | | /// Appends new value at the end of column (column's size is increased by 1). |
189 | | /// Is used to transform raw strings to Blocks (for example, inside input format parsers) |
190 | | virtual void insert(const Field& x) = 0; |
191 | | |
192 | | /// Appends n-th element from other column with the same type. |
193 | | /// Is used in merge-sort and merges. It could be implemented in inherited classes more optimally than default implementation. |
194 | | virtual void insert_from(const IColumn& src, size_t n); |
195 | | |
196 | | /// Appends range of elements from other column with the same type. |
197 | | /// Could be used to concatenate columns. |
198 | | virtual void insert_range_from(const IColumn& src, size_t start, size_t length) = 0; |
199 | | |
200 | | /// Appends range of elements from other column with the same type. |
201 | | /// Do not need throw execption in ColumnString overflow uint32, only |
202 | | /// use in join |
203 | | virtual void insert_range_from_ignore_overflow(const IColumn& src, size_t start, |
204 | 98 | size_t length) { |
205 | 98 | insert_range_from(src, start, length); |
206 | 98 | } |
207 | | |
208 | | /// Appends one element from other column with the same type multiple times. |
209 | 0 | virtual void insert_many_from(const IColumn& src, size_t position, size_t length) { |
210 | 0 | for (size_t i = 0; i < length; ++i) { |
211 | 0 | insert_from(src, position); |
212 | 0 | } |
213 | 0 | } |
214 | | |
215 | | // insert the data of target columns into self column according to positions |
216 | | // positions[i] means index of srcs whitch need to insert_from |
217 | | // the virtual function overhead of multiple calls to insert_from can be reduced to once |
218 | | virtual void insert_from_multi_column(const std::vector<const IColumn*>& srcs, |
219 | | const std::vector<size_t>& positions) = 0; |
220 | | |
221 | | /// Appends a batch elements from other column with the same type |
222 | | /// Also here should make sure indices_end is bigger than indices_begin |
223 | | /// indices_begin + indices_end represent the row indices of column src |
224 | | virtual void insert_indices_from(const IColumn& src, const uint32_t* indices_begin, |
225 | | const uint32_t* indices_end) = 0; |
226 | | |
227 | | /// Appends data located in specified memory chunk if it is possible (throws an exception if it cannot be implemented). |
228 | | /// used in ColumnString, ColumnFixedString, ColumnVector, not support in ColumnArray|ColumnMap... |
229 | | /// Is used to optimize some computations (in aggregation, for example). |
230 | | /// Parameter length could be ignored if column values have fixed size. |
231 | | /// All data will be inserted as single element |
232 | 0 | virtual void insert_data(const char* pos, size_t length) { |
233 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
234 | 0 | "Method insert_data is not supported for " + get_name()); |
235 | 0 | } |
236 | | |
237 | 43 | virtual void insert_many_fix_len_data(const char* pos, size_t num) { |
238 | 43 | throw doris::Exception( |
239 | 43 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
240 | 43 | "Method insert_many_fix_len_data is not supported for " + get_name()); |
241 | 43 | } |
242 | | |
243 | | // todo(zeno) Use dict_args temp object to cover all arguments |
244 | | virtual void insert_many_dict_data(const int32_t* data_array, size_t start_index, |
245 | | const StringRef* dict, size_t data_num, |
246 | 43 | uint32_t dict_num = 0) { |
247 | 43 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
248 | 43 | "Method insert_many_dict_data is not supported for " + get_name()); |
249 | 43 | } |
250 | | |
251 | | /// Insert binary data into column from a continuous buffer, the implementation maybe copy all binary data |
252 | | /// in one single time. |
253 | | virtual void insert_many_continuous_binary_data(const char* data, const uint32_t* offsets, |
254 | 43 | const size_t num) { |
255 | 43 | throw doris::Exception( |
256 | 43 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
257 | 43 | "Method insert_many_continuous_binary_data is not supported for " + get_name()); |
258 | 43 | } |
259 | | |
260 | 43 | virtual void insert_many_strings(const StringRef* strings, size_t num) { |
261 | 43 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
262 | 43 | "Method insert_many_strings is not supported for " + get_name()); |
263 | 43 | } |
264 | | |
265 | | virtual void insert_many_strings_overflow(const StringRef* strings, size_t num, |
266 | 43 | size_t max_length) { |
267 | 43 | throw doris::Exception( |
268 | 43 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
269 | 43 | "Method insert_many_strings_overflow is not supported for " + get_name()); |
270 | 43 | } |
271 | | |
272 | | // Here `pos` points to the memory data type is the same as the data type of the column. |
273 | | // This function is used by `insert_keys_into_columns` in AggregationNode. |
274 | 0 | virtual void insert_many_raw_data(const char* pos, size_t num) { |
275 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
276 | 0 | "Method insert_many_raw_data is not supported for " + get_name()); |
277 | 0 | } |
278 | | |
279 | 12 | void insert_data_repeatedly(const char* pos, size_t length, size_t data_num) { |
280 | 24 | for (size_t i = 0; i < data_num; ++i) { |
281 | 12 | insert_data(pos, length); |
282 | 12 | } |
283 | 12 | } |
284 | | |
285 | | /// Appends "default value". |
286 | | /// Is used when there are need to increase column size, but inserting value doesn't make sense. |
287 | | /// For example, ColumnNullable(Nested) absolutely ignores values of nested column if it is marked as NULL. |
288 | | virtual void insert_default() = 0; |
289 | | |
290 | | /// Appends "default value" multiple times. |
291 | 454 | virtual void insert_many_defaults(size_t length) { |
292 | 47.7M | for (size_t i = 0; i < length; ++i) { |
293 | 47.7M | insert_default(); |
294 | 47.7M | } |
295 | 454 | } |
296 | | |
297 | | /** Removes last n elements. |
298 | | * Is used to support exception-safety of several operations. |
299 | | * For example, sometimes insertion should be reverted if we catch an exception during operation processing. |
300 | | * If column has less than n elements or n == 0 - undefined behavior. |
301 | | */ |
302 | | virtual void pop_back(size_t n) = 0; |
303 | | |
304 | | /** Serializes n-th element. Serialized element should be placed continuously inside Arena's memory. |
305 | | * Serialized value can be deserialized to reconstruct original object. Is used in aggregation. |
306 | | * The method is similar to get_data_at(), but can work when element's value cannot be mapped to existing continuous memory chunk, |
307 | | * For example, to obtain unambiguous representation of Array of strings, strings data should be interleaved with their sizes. |
308 | | * Parameter begin should be used with Arena::alloc_continue. |
309 | | */ |
310 | | virtual StringRef serialize_value_into_arena(size_t n, Arena& arena, |
311 | | char const*& begin) const = 0; |
312 | | |
313 | | /// Deserializes a value that was serialized using IColumn::serialize_value_into_arena method. |
314 | | /// Returns pointer to the position after the read data. |
315 | | virtual const char* deserialize_and_insert_from_arena(const char* pos) = 0; |
316 | | |
317 | | /// Return the size of largest row. |
318 | | /// This is for calculating the memory size for vectorized serialization of aggregation keys. |
319 | 1 | virtual size_t get_max_row_byte_size() const { |
320 | 1 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
321 | 1 | "Method get_max_row_byte_size is not supported for " + get_name()); |
322 | 0 | return 0; |
323 | 1 | } |
324 | | |
325 | 0 | virtual void serialize_vec(StringRef* keys, size_t num_rows, size_t max_row_byte_size) const { |
326 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
327 | 0 | "Method serialize_vec is not supported for " + get_name()); |
328 | 0 | } |
329 | | |
330 | | virtual void serialize_vec_with_null_map(StringRef* keys, size_t num_rows, |
331 | 0 | const uint8_t* null_map) const { |
332 | 0 | throw doris::Exception( |
333 | 0 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
334 | 0 | "Method serialize_vec_with_null_map is not supported for " + get_name()); |
335 | 0 | } |
336 | | |
337 | | // This function deserializes group-by keys into column in the vectorized way. |
338 | 0 | virtual void deserialize_vec(StringRef* keys, const size_t num_rows) { |
339 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
340 | 0 | "Method deserialize_vec is not supported for " + get_name()); |
341 | 0 | } |
342 | | |
343 | | // Used in ColumnNullable::deserialize_vec |
344 | | virtual void deserialize_vec_with_null_map(StringRef* keys, const size_t num_rows, |
345 | 0 | const uint8_t* null_map) { |
346 | 0 | throw doris::Exception( |
347 | 0 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
348 | 0 | "Method deserialize_vec_with_null_map is not supported for " + get_name()); |
349 | 0 | } |
350 | | |
351 | | /// TODO: SipHash is slower than city or xx hash, rethink we should have a new interface |
352 | | /// Update state of hash function with value of n-th element. |
353 | | /// On subsequent calls of this method for sequence of column values of arbitrary types, |
354 | | /// passed bytes to hash must identify sequence of values unambiguously. |
355 | 0 | virtual void update_hash_with_value(size_t n, SipHash& hash) const { |
356 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
357 | 0 | "Method update_hash_with_value is not supported for " + get_name()); |
358 | 0 | } |
359 | | |
360 | | /// Update state of hash function with value of n elements to avoid the virtual function call |
361 | | /// null_data to mark whether need to do hash compute, null_data == nullptr |
362 | | /// means all element need to do hash function, else only *null_data != 0 need to do hash func |
363 | | /// do xxHash here, faster than other sip hash |
364 | | virtual void update_hashes_with_value(uint64_t* __restrict hashes, |
365 | 0 | const uint8_t* __restrict null_data = nullptr) const { |
366 | 0 | throw doris::Exception( |
367 | 0 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
368 | 0 | "Method update_hashes_with_value is not supported for " + get_name()); |
369 | 0 | } |
370 | | |
371 | | // use range for one hash value to avoid virtual function call in loop |
372 | | virtual void update_xxHash_with_value(size_t start, size_t end, uint64_t& hash, |
373 | 0 | const uint8_t* __restrict null_data) const { |
374 | 0 | throw doris::Exception( |
375 | 0 | ErrorCode::NOT_IMPLEMENTED_ERROR, |
376 | 0 | "Method update_xxHash_with_value is not supported for " + get_name()); |
377 | 0 | } |
378 | | |
379 | | /// Update state of crc32 hash function with value of n elements to avoid the virtual function call |
380 | | /// null_data to mark whether need to do hash compute, null_data == nullptr |
381 | | /// means all element need to do hash function, else only *null_data != 0 need to do hash func |
382 | | virtual void update_crcs_with_value(uint32_t* __restrict hash, PrimitiveType type, |
383 | | uint32_t rows, uint32_t offset = 0, |
384 | 0 | const uint8_t* __restrict null_data = nullptr) const { |
385 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
386 | 0 | "Method update_crcs_with_value is not supported for " + get_name()); |
387 | 0 | } |
388 | | |
389 | | // use range for one hash value to avoid virtual function call in loop |
390 | | virtual void update_crc_with_value(size_t start, size_t end, uint32_t& hash, |
391 | 0 | const uint8_t* __restrict null_data) const { |
392 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
393 | 0 | "Method update_crc_with_value is not supported for " + get_name()); |
394 | 0 | } |
395 | | |
396 | | /** Removes elements that don't match the filter. |
397 | | * Is used in WHERE and HAVING operations. |
398 | | * If result_size_hint > 0, then makes advance reserve(result_size_hint) for the result column; |
399 | | * if 0, then don't makes reserve(), |
400 | | * otherwise (i.e. < 0), makes reserve() using size of source column. |
401 | | */ |
402 | | using Filter = PaddedPODArray<UInt8>; |
403 | | virtual Ptr filter(const Filter& filt, ssize_t result_size_hint) const = 0; |
404 | | |
405 | | /// This function will modify the original table. |
406 | | /// Return rows number after filtered. |
407 | | virtual size_t filter(const Filter& filter) = 0; |
408 | | |
409 | | /** |
410 | | * used by lazy materialization to filter column by selected rowids |
411 | | * Q: Why use IColumn* as args type instead of MutablePtr or ImmutablePtr ? |
412 | | * A: If use MutablePtr/ImmutablePtr as col_ptr's type, which means there could be many |
413 | | * convert(convert MutablePtr to ImmutablePtr or convert ImmutablePtr to MutablePtr) |
414 | | * happends in filter_by_selector because of mem-reuse logic or ColumnNullable, I think this is meaningless; |
415 | | * So using raw ptr directly here. |
416 | | * NOTICE: only column_nullable and predict_column, column_dictionary now support filter_by_selector |
417 | | * // nullable -> predict_column |
418 | | * // string (dictionary) -> column_dictionary |
419 | | */ |
420 | 0 | virtual Status filter_by_selector(const uint16_t* sel, size_t sel_size, IColumn* col_ptr) { |
421 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
422 | 0 | "Method filter_by_selector is not supported for {}, only " |
423 | 0 | "column_nullable, column_dictionary and predict_column support", |
424 | 0 | get_name()); |
425 | 0 | } |
426 | | |
427 | | /// Permutes elements using specified permutation. Is used in sortings. |
428 | | /// limit - if it isn't 0, puts only first limit elements in the result. |
429 | | using Permutation = PaddedPODArray<size_t>; |
430 | | virtual Ptr permute(const Permutation& perm, size_t limit) const = 0; |
431 | | |
432 | | /** Compares (*this)[n] and rhs[m]. Column rhs should have the same type. |
433 | | * Returns negative number, 0, or positive number (*this)[n] is less, equal, greater than rhs[m] respectively. |
434 | | * Is used in sortings. |
435 | | * |
436 | | * If one of element's value is NaN or NULLs, then: |
437 | | * - if nan_direction_hint == -1, NaN and NULLs are considered as least than everything other; |
438 | | * - if nan_direction_hint == 1, NaN and NULLs are considered as greatest than everything other. |
439 | | * For example, if nan_direction_hint == -1 is used by descending sorting, NaNs will be at the end. |
440 | | * |
441 | | * For non Nullable and non floating point types, nan_direction_hint is ignored. |
442 | | * For array/map/struct types, we compare with nested column element and offsets size |
443 | | */ |
444 | 0 | virtual int compare_at(size_t n, size_t m, const IColumn& rhs, int nan_direction_hint) const { |
445 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, "compare_at for " + get_name()); |
446 | 0 | } |
447 | | |
448 | | /** |
449 | | * To compare all rows in this column with another row (with row_id = rhs_row_id in column rhs) |
450 | | * @param nan_direction_hint and direction indicates the ordering. |
451 | | * @param cmp_res if we already has a comparison result for row i, e.g. cmp_res[i] = 1, we can skip row i |
452 | | * @param filter this stores comparison results for all rows. filter[i] = 1 means row i is less than row rhs_row_id in rhs |
453 | | */ |
454 | | virtual void compare_internal(size_t rhs_row_id, const IColumn& rhs, int nan_direction_hint, |
455 | | int direction, std::vector<uint8>& cmp_res, |
456 | | uint8* __restrict filter) const; |
457 | | |
458 | | /** Returns a permutation that sorts elements of this column, |
459 | | * i.e. perm[i]-th element of source column should be i-th element of sorted column. |
460 | | * reverse - true: descending order, false: ascending order. |
461 | | * limit - if isn't 0, then only first limit elements of the result column could be sorted. |
462 | | * nan_direction_hint - see above. |
463 | | */ |
464 | | virtual void get_permutation(bool reverse, size_t limit, int nan_direction_hint, |
465 | 43 | Permutation& res) const { |
466 | 43 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
467 | 43 | "get_permutation for " + get_name()); |
468 | 43 | } |
469 | | |
470 | | /** Copies each element according offsets parameter. |
471 | | * (i-th element should be copied offsets[i] - offsets[i - 1] times.) |
472 | | * It is necessary in ARRAY JOIN operation. |
473 | | */ |
474 | | virtual Ptr replicate(const Offsets& offsets) const = 0; |
475 | | |
476 | | /** Split column to smaller columns. Each value goes to column index, selected by corresponding element of 'selector'. |
477 | | * Selector must contain values from 0 to num_columns - 1. |
478 | | * For default implementation, see column_impl.h |
479 | | */ |
480 | | using ColumnIndex = UInt64; |
481 | | using Selector = PaddedPODArray<ColumnIndex>; |
482 | | |
483 | | // The append_data_by_selector function requires the column to implement the insert_from function. |
484 | | // In fact, this function is just calling insert_from but without the overhead of a virtual function. |
485 | | |
486 | | virtual void append_data_by_selector(MutablePtr& res, const Selector& selector) const = 0; |
487 | | |
488 | | // Here, begin and end represent the range of the Selector. |
489 | | virtual void append_data_by_selector(MutablePtr& res, const Selector& selector, size_t begin, |
490 | | size_t end) const = 0; |
491 | | |
492 | | /// Insert data from several other columns according to source mask (used in vertical merge). |
493 | | /// For now it is a helper to de-virtualize calls to insert*() functions inside gather loop |
494 | | /// (descendants should call gatherer_stream.gather(*this) to implement this function.) |
495 | | /// TODO: interface decoupled from ColumnGathererStream that allows non-generic specializations. |
496 | | // virtual void gather(ColumnGathererStream & gatherer_stream) = 0; |
497 | | |
498 | | /// Reserves memory for specified amount of elements. If reservation isn't possible, does nothing. |
499 | | /// It affects performance only (not correctness). |
500 | 2 | virtual void reserve(size_t /*n*/) {} |
501 | | |
502 | | /// Resize memory for specified amount of elements. If reservation isn't possible, does nothing. |
503 | | /// It affects performance only (not correctness). |
504 | | /// Note. resize means not only change column self but also sub-columns if have. |
505 | 0 | virtual void resize(size_t /*n*/) {} |
506 | | |
507 | | /// Size of column data in memory (may be approximate) - for profiling. Zero, if could not be determined. |
508 | | virtual size_t byte_size() const = 0; |
509 | | |
510 | | /** |
511 | | * @brief Checks whether the current column has enough capacity to accommodate the given source column. |
512 | | * |
513 | | * This pure virtual function should be implemented by derived classes to determine whether the |
514 | | * current column has enough reserved memory to hold the data of the specified `src` column. |
515 | | * |
516 | | * @param src The source column whose data needs to be checked for fitting into the current column. |
517 | | * @return true if the current column has enough capacity to hold the `src` data, false otherwise. |
518 | | */ |
519 | | virtual bool has_enough_capacity(const IColumn& src) const = 0; |
520 | | |
521 | | /// Size of memory, allocated for column. |
522 | | /// This is greater or equals to byte_size due to memory reservation in containers. |
523 | | /// Zero, if could not be determined. |
524 | | virtual size_t allocated_bytes() const = 0; |
525 | | |
526 | | /// If the column contains subcolumns (such as Array, Nullable, etc), do callback on them. |
527 | | /// Shallow: doesn't do recursive calls; don't do call for itself. |
528 | | using ColumnCallback = std::function<void(WrappedPtr&)>; |
529 | | using ImutableColumnCallback = std::function<void(const IColumn&)>; |
530 | 61.9k | virtual void for_each_subcolumn(ColumnCallback) {} |
531 | | |
532 | | /// Columns have equal structure. |
533 | | /// If true - you can use "compare_at", "insert_from", etc. methods. |
534 | 0 | virtual bool structure_equals(const IColumn&) const { |
535 | 0 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
536 | 0 | "Method structure_equals is not supported for " + get_name()); |
537 | 0 | return false; |
538 | 0 | } |
539 | | |
540 | 69.7k | MutablePtr mutate() const&& { |
541 | 69.7k | MutablePtr res = shallow_mutate(); |
542 | 69.7k | res->for_each_subcolumn( |
543 | 69.7k | [](WrappedPtr& subcolumn) { subcolumn = std::move(*subcolumn).mutate(); }); |
544 | 69.7k | return res; |
545 | 69.7k | } |
546 | | |
547 | 0 | static MutablePtr mutate(Ptr ptr) { |
548 | 0 | MutablePtr res = ptr->shallow_mutate(); /// Now use_count is 2. |
549 | 0 | ptr.reset(); /// Reset use_count to 1. |
550 | 0 | res->for_each_subcolumn( |
551 | 0 | [](WrappedPtr& subcolumn) { subcolumn = std::move(*subcolumn).mutate(); }); |
552 | 0 | return res; |
553 | 0 | } |
554 | | |
555 | | /** Some columns can contain another columns inside. |
556 | | * So, we have a tree of columns. But not all combinations are possible. |
557 | | * There are the following rules: |
558 | | * |
559 | | * ColumnConst may be only at top. It cannot be inside any column. |
560 | | * ColumnNullable can contain only simple columns. |
561 | | */ |
562 | | |
563 | | /// Various properties on behaviour of column type. |
564 | | |
565 | | /// It's true for ColumnNullable only. |
566 | 7.35M | virtual bool is_nullable() const { return false; } |
567 | | /// It's true for ColumnNullable, can be true or false for ColumnConst, etc. |
568 | 0 | virtual bool is_concrete_nullable() const { return false; } |
569 | | |
570 | | // true if column has null element |
571 | 0 | virtual bool has_null() const { return false; } |
572 | | |
573 | | // true if column has null element [0,size) |
574 | 1.65k | virtual bool has_null(size_t size) const { return false; } |
575 | | |
576 | 518 | virtual bool is_exclusive() const { return use_count() == 1; } |
577 | | |
578 | | /// Clear data of column, just like vector clear |
579 | | virtual void clear() = 0; |
580 | | |
581 | | /** Memory layout properties. |
582 | | * |
583 | | * Each value of a column can be placed in memory contiguously or not. |
584 | | * |
585 | | * Example: simple columns like UInt64 or FixedString store their values contiguously in single memory buffer. |
586 | | * |
587 | | * Example: Tuple store values of each component in separate subcolumn, so the values of Tuples with at least two components are not contiguous. |
588 | | * Another example is Nullable. Each value have null flag, that is stored separately, so the value is not contiguous in memory. |
589 | | * |
590 | | * There are some important cases, when values are not stored contiguously, but for each value, you can get contiguous memory segment, |
591 | | * that will unambiguously identify the value. In this case, methods get_data_at and insert_data are implemented. |
592 | | * Example: String column: bytes of strings are stored concatenated in one memory buffer |
593 | | * and offsets to that buffer are stored in another buffer. The same is for Array of fixed-size contiguous elements. |
594 | | * |
595 | | * To avoid confusion between these cases, we don't have isContiguous method. |
596 | | */ |
597 | | |
598 | 1 | virtual StringRef get_raw_data() const { |
599 | 1 | throw doris::Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, |
600 | 1 | "Column {} is not a contiguous block of memory", get_name()); |
601 | 0 | return StringRef {}; |
602 | 1 | } |
603 | | |
604 | | /// Returns ratio of values in column, that are equal to default value of column. |
605 | | /// Checks only @sample_ratio ratio of rows. |
606 | 0 | virtual double get_ratio_of_default_rows(double sample_ratio = 1.0) const { return 0.0; } |
607 | | |
608 | | // Column is ColumnString/ColumnArray/ColumnMap or other variable length column at every row |
609 | 15 | virtual bool is_variable_length() const { return false; } |
610 | | |
611 | 2.48k | virtual bool is_column_string() const { return false; } |
612 | | |
613 | 43 | virtual bool is_column_string64() const { return false; } |
614 | | |
615 | 4.35k | virtual bool is_column_dictionary() const { return false; } |
616 | | |
617 | | /// If the only value column can contain is NULL. |
618 | 21.6k | virtual bool only_null() const { return false; } |
619 | | |
620 | | /** |
621 | | * ColumnSorter is used to sort each columns in a Block. In this sorting pattern, sorting a |
622 | | * column will produce a list of EqualRange which has the same elements respectively. And for |
623 | | * next column in this block, we only need to sort rows in those `range`. |
624 | | * |
625 | | * Besides, we do not materialize sorted data eagerly. Instead, the intermediate sorting results |
626 | | * are represendted by permutation and data will be materialized after all of columns are sorted. |
627 | | * |
628 | | * @sorter: ColumnSorter is used to do sorting. |
629 | | * @flags : indicates if current item equals to the previous one. |
630 | | * @perms : permutation after sorting |
631 | | * @range : EqualRange which has the same elements respectively. |
632 | | * @last_column : indicates if this column is the last in this block. |
633 | | */ |
634 | | virtual void sort_column(const ColumnSorter* sorter, EqualFlags& flags, |
635 | | IColumn::Permutation& perms, EqualRange& range, |
636 | | bool last_column) const; |
637 | | |
638 | 392k | virtual ~IColumn() = default; |
639 | 391k | IColumn() = default; |
640 | 588 | IColumn(const IColumn&) = default; |
641 | | |
642 | | /** Print column name, size, and recursively print all subcolumns. |
643 | | */ |
644 | | String dump_structure() const; |
645 | | |
646 | | // only used in agg value replace for column which is not variable length, eg.BlockReader::_copy_value_data |
647 | | // usage: self_column.replace_column_data(other_column, other_column's row index, self_column's row index) |
648 | | virtual void replace_column_data(const IColumn&, size_t row, size_t self_row = 0) = 0; |
649 | | // replace data to default value if null, used to avoid null data output decimal check failure |
650 | | // usage: nested_column.replace_column_null_data(nested_null_map.data()) |
651 | | // only wrok on column_vector and column column decimal, there will be no behavior when other columns type call this method |
652 | 43 | virtual void replace_column_null_data(const uint8_t* __restrict null_map) {} |
653 | | |
654 | 503k | virtual bool is_date_type() const { return is_date; } |
655 | 503k | virtual bool is_datetime_type() const { return is_date_time; } |
656 | | |
657 | 556 | virtual void set_date_type() { is_date = true; } |
658 | 685 | virtual void set_datetime_type() { is_date_time = true; } |
659 | | |
660 | 1.87k | void copy_date_types(const IColumn& col) { |
661 | 1.87k | if (col.is_date_type()) { |
662 | 150 | set_date_type(); |
663 | 150 | } |
664 | 1.87k | if (col.is_datetime_type()) { |
665 | 147 | set_datetime_type(); |
666 | 147 | } |
667 | 1.87k | } |
668 | | |
669 | | // todo(wb): a temporary implemention, need re-abstract here |
670 | | bool is_date = false; |
671 | | bool is_date_time = false; |
672 | | |
673 | | protected: |
674 | | template <typename Derived> |
675 | | void append_data_by_selector_impl(MutablePtr& res, const Selector& selector) const; |
676 | | template <typename Derived> |
677 | | void append_data_by_selector_impl(MutablePtr& res, const Selector& selector, size_t begin, |
678 | | size_t end) const; |
679 | | template <typename Derived> |
680 | | void insert_from_multi_column_impl(const std::vector<const IColumn*>& srcs, |
681 | | const std::vector<size_t>& positions); |
682 | | }; |
683 | | |
684 | | using ColumnPtr = IColumn::Ptr; |
685 | | using MutableColumnPtr = IColumn::MutablePtr; |
686 | | using Columns = std::vector<ColumnPtr>; |
687 | | using MutableColumns = std::vector<MutableColumnPtr>; |
688 | | using ColumnPtrs = std::vector<ColumnPtr>; |
689 | | using ColumnRawPtrs = std::vector<const IColumn*>; |
690 | | |
691 | | template <typename... Args> |
692 | | struct IsMutableColumns; |
693 | | |
694 | | template <typename Arg, typename... Args> |
695 | | struct IsMutableColumns<Arg, Args...> { |
696 | | static const bool value = |
697 | | std::is_assignable<MutableColumnPtr&&, Arg>::value && IsMutableColumns<Args...>::value; |
698 | | }; |
699 | | |
700 | | template <> |
701 | | struct IsMutableColumns<> { |
702 | | static const bool value = true; |
703 | | }; |
704 | | |
705 | | // prefer assert_cast than check_and_get |
706 | | template <typename Type> |
707 | 80.3k | const Type* check_and_get_column(const IColumn& column) { |
708 | 80.3k | return typeid_cast<const Type*>(&column); |
709 | 80.3k | } _ZN5doris10vectorized20check_and_get_columnINS0_11ColumnArrayEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 60 | const Type* check_and_get_column(const IColumn& column) { | 708 | 60 | return typeid_cast<const Type*>(&column); | 709 | 60 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIjEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 350 | const Type* check_and_get_column(const IColumn& column) { | 708 | 350 | return typeid_cast<const Type*>(&column); | 709 | 350 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIoEEEEPKT_RKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIhEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 3.83k | const Type* check_and_get_column(const IColumn& column) { | 708 | 3.83k | return typeid_cast<const Type*>(&column); | 709 | 3.83k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_14ColumnNullableEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 53.1k | const Type* check_and_get_column(const IColumn& column) { | 708 | 53.1k | return typeid_cast<const Type*>(&column); | 709 | 53.1k | } |
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 | 707 | 450 | const Type* check_and_get_column(const IColumn& column) { | 708 | 450 | return typeid_cast<const Type*>(&column); | 709 | 450 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIdEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 216 | const Type* check_and_get_column(const IColumn& column) { | 708 | 216 | return typeid_cast<const Type*>(&column); | 709 | 216 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIlEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 1.14k | const Type* check_and_get_column(const IColumn& column) { | 708 | 1.14k | return typeid_cast<const Type*>(&column); | 709 | 1.14k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_23ColumnFixedLengthObjectEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 2 | const Type* check_and_get_column(const IColumn& column) { | 708 | 2 | return typeid_cast<const Type*>(&column); | 709 | 2 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIaEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 283 | const Type* check_and_get_column(const IColumn& column) { | 708 | 283 | return typeid_cast<const Type*>(&column); | 709 | 283 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIsEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 317 | const Type* check_and_get_column(const IColumn& column) { | 708 | 317 | return typeid_cast<const Type*>(&column); | 709 | 317 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorInEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 221 | const Type* check_and_get_column(const IColumn& column) { | 708 | 221 | return typeid_cast<const Type*>(&column); | 709 | 221 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalInEEEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 22 | const Type* check_and_get_column(const IColumn& column) { | 708 | 22 | return typeid_cast<const Type*>(&column); | 709 | 22 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIfEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 201 | const Type* check_and_get_column(const IColumn& column) { | 708 | 201 | return typeid_cast<const Type*>(&column); | 709 | 201 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorImEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 538 | const Type* check_and_get_column(const IColumn& column) { | 708 | 538 | return typeid_cast<const Type*>(&column); | 709 | 538 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalIiEEEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 101 | const Type* check_and_get_column(const IColumn& column) { | 708 | 101 | return typeid_cast<const Type*>(&column); | 709 | 101 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalIlEEEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 117 | const Type* check_and_get_column(const IColumn& column) { | 708 | 117 | return typeid_cast<const Type*>(&column); | 709 | 117 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_12Decimal128V3EEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 85 | const Type* check_and_get_column(const IColumn& column) { | 708 | 85 | return typeid_cast<const Type*>(&column); | 709 | 85 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalIN4wide7integerILm256EiEEEEEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 99 | const Type* check_and_get_column(const IColumn& column) { | 708 | 99 | return typeid_cast<const Type*>(&column); | 709 | 99 | } |
_ZN5doris10vectorized20check_and_get_columnIKNS0_14ColumnNullableEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 1.35k | const Type* check_and_get_column(const IColumn& column) { | 708 | 1.35k | return typeid_cast<const Type*>(&column); | 709 | 1.35k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_11ColumnConstEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 17.6k | const Type* check_and_get_column(const IColumn& column) { | 708 | 17.6k | return typeid_cast<const Type*>(&column); | 709 | 17.6k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_9ColumnStrIjEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 221 | const Type* check_and_get_column(const IColumn& column) { | 708 | 221 | return typeid_cast<const Type*>(&column); | 709 | 221 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_11ColumnConstEEEPKT_RKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorItEEEEPKT_RKNS0_7IColumnE Line | Count | Source | 707 | 1 | const Type* check_and_get_column(const IColumn& column) { | 708 | 1 | return typeid_cast<const Type*>(&column); | 709 | 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 | 707 | 3 | const Type* check_and_get_column(const IColumn& column) { | 708 | 3 | return typeid_cast<const Type*>(&column); | 709 | 3 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorIhEEEEPKT_RKNS0_7IColumnE |
710 | | |
711 | | template <typename Type> |
712 | 272M | const Type* check_and_get_column(const IColumn* column) { |
713 | 272M | return typeid_cast<const Type*>(column); |
714 | 272M | } _ZN5doris10vectorized20check_and_get_columnINS0_14ColumnNullableEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 1.58k | const Type* check_and_get_column(const IColumn* column) { | 713 | 1.58k | return typeid_cast<const Type*>(column); | 714 | 1.58k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_19PredicateColumnTypeILNS_13PrimitiveTypeE5EEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 4.07k | const Type* check_and_get_column(const IColumn* column) { | 713 | 4.07k | return typeid_cast<const Type*>(column); | 714 | 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_12ColumnVectorIiEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 59 | const Type* check_and_get_column(const IColumn* column) { | 713 | 59 | return typeid_cast<const Type*>(column); | 714 | 59 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIlEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 77 | const Type* check_and_get_column(const IColumn* column) { | 713 | 77 | return typeid_cast<const Type*>(column); | 714 | 77 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_9ColumnStrIjEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 13.4k | const Type* check_and_get_column(const IColumn* column) { | 713 | 13.4k | return typeid_cast<const Type*>(column); | 714 | 13.4k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_11ColumnConstEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 272M | const Type* check_and_get_column(const IColumn* column) { | 713 | 272M | return typeid_cast<const Type*>(column); | 714 | 272M | } |
_ZN5doris10vectorized20check_and_get_columnINS0_9ColumnStrImEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 43 | const Type* check_and_get_column(const IColumn* column) { | 713 | 43 | return typeid_cast<const Type*>(column); | 714 | 43 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_11ColumnArrayEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 2.06k | const Type* check_and_get_column(const IColumn* column) { | 713 | 2.06k | return typeid_cast<const Type*>(column); | 714 | 2.06k | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIaEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 37 | const Type* check_and_get_column(const IColumn* column) { | 713 | 37 | return typeid_cast<const Type*>(column); | 714 | 37 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIsEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 31 | const Type* check_and_get_column(const IColumn* column) { | 713 | 31 | return typeid_cast<const Type*>(column); | 714 | 31 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorInEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 15 | const Type* check_and_get_column(const IColumn* column) { | 713 | 15 | return typeid_cast<const Type*>(column); | 714 | 15 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIfEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 15 | const Type* check_and_get_column(const IColumn* column) { | 713 | 15 | return typeid_cast<const Type*>(column); | 714 | 15 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIdEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 79 | const Type* check_and_get_column(const IColumn* column) { | 713 | 79 | return typeid_cast<const Type*>(column); | 714 | 79 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIhEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 20 | const Type* check_and_get_column(const IColumn* column) { | 713 | 20 | return typeid_cast<const Type*>(column); | 714 | 20 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorItEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 19 | const Type* check_and_get_column(const IColumn* column) { | 713 | 19 | return typeid_cast<const Type*>(column); | 714 | 19 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIjEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 55 | const Type* check_and_get_column(const IColumn* column) { | 713 | 55 | return typeid_cast<const Type*>(column); | 714 | 55 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorImEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 54 | const Type* check_and_get_column(const IColumn* column) { | 713 | 54 | return typeid_cast<const Type*>(column); | 714 | 54 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalIiEEEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 1 | const Type* check_and_get_column(const IColumn* column) { | 713 | 1 | return typeid_cast<const Type*>(column); | 714 | 1 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalIlEEEEEEPKT_PKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnINS0_13ColumnDecimalINS0_7DecimalInEEEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 2 | const Type* check_and_get_column(const IColumn* column) { | 713 | 2 | return typeid_cast<const Type*>(column); | 714 | 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 | 712 | 4 | const Type* check_and_get_column(const IColumn* column) { | 713 | 4 | return typeid_cast<const Type*>(column); | 714 | 4 | } |
_ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorIaEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 2 | const Type* check_and_get_column(const IColumn* column) { | 713 | 2 | return typeid_cast<const Type*>(column); | 714 | 2 | } |
_ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorIsEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 2 | const Type* check_and_get_column(const IColumn* column) { | 713 | 2 | return typeid_cast<const Type*>(column); | 714 | 2 | } |
_ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorIiEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 2 | const Type* check_and_get_column(const IColumn* column) { | 713 | 2 | return typeid_cast<const Type*>(column); | 714 | 2 | } |
_ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorIlEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 2 | const Type* check_and_get_column(const IColumn* column) { | 713 | 2 | return typeid_cast<const Type*>(column); | 714 | 2 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorInEEEEPKT_PKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnIKNS0_12ColumnVectorIdEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 2 | const Type* check_and_get_column(const IColumn* column) { | 713 | 2 | return typeid_cast<const Type*>(column); | 714 | 2 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_9ColumnMapEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 8 | const Type* check_and_get_column(const IColumn* column) { | 713 | 8 | return typeid_cast<const Type*>(column); | 714 | 8 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnStructEEEPKT_PKNS0_7IColumnE _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnVectorIoEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 2 | const Type* check_and_get_column(const IColumn* column) { | 713 | 2 | return typeid_cast<const Type*>(column); | 714 | 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 | 712 | 128 | const Type* check_and_get_column(const IColumn* column) { | 713 | 128 | return typeid_cast<const Type*>(column); | 714 | 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 | 712 | 70 | const Type* check_and_get_column(const IColumn* column) { | 713 | 70 | return typeid_cast<const Type*>(column); | 714 | 70 | } |
_ZN5doris10vectorized20check_and_get_columnIKNS0_14ColumnNullableEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 12 | const Type* check_and_get_column(const IColumn* column) { | 713 | 12 | return typeid_cast<const Type*>(column); | 714 | 12 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_17ColumnComplexTypeINS_11BitmapValueEEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 8 | const Type* check_and_get_column(const IColumn* column) { | 713 | 8 | return typeid_cast<const Type*>(column); | 714 | 8 | } |
_ZN5doris10vectorized20check_and_get_columnINS0_17ColumnComplexTypeINS_11HyperLogLogEEEEEPKT_PKNS0_7IColumnE Line | Count | Source | 712 | 2 | const Type* check_and_get_column(const IColumn* column) { | 713 | 2 | return typeid_cast<const Type*>(column); | 714 | 2 | } |
Unexecuted instantiation: _ZN5doris10vectorized20check_and_get_columnINS0_12ColumnObjectEEEPKT_PKNS0_7IColumnE |
715 | | |
716 | | template <typename Type> |
717 | 272M | bool is_column(const IColumn& column) { |
718 | 272M | return check_and_get_column<Type>(&column); |
719 | 272M | } _ZN5doris10vectorized9is_columnINS0_9ColumnStrIjEEEEbRKNS0_7IColumnE Line | Count | Source | 717 | 129 | bool is_column(const IColumn& column) { | 718 | 129 | return check_and_get_column<Type>(&column); | 719 | 129 | } |
_ZN5doris10vectorized9is_columnINS0_11ColumnConstEEEbRKNS0_7IColumnE Line | Count | Source | 717 | 272M | bool is_column(const IColumn& column) { | 718 | 272M | return check_and_get_column<Type>(&column); | 719 | 272M | } |
_ZN5doris10vectorized9is_columnINS0_9ColumnStrImEEEEbRKNS0_7IColumnE Line | Count | Source | 717 | 43 | bool is_column(const IColumn& column) { | 718 | 43 | return check_and_get_column<Type>(&column); | 719 | 43 | } |
_ZN5doris10vectorized9is_columnINS0_14ColumnNullableEEEbRKNS0_7IColumnE Line | Count | Source | 717 | 1.45k | bool is_column(const IColumn& column) { | 718 | 1.45k | return check_and_get_column<Type>(&column); | 719 | 1.45k | } |
Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIhEEEEbRKNS0_7IColumnE _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIaEEEEbRKNS0_7IColumnE Line | Count | Source | 717 | 2 | bool is_column(const IColumn& column) { | 718 | 2 | return check_and_get_column<Type>(&column); | 719 | 2 | } |
Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIsEEEEbRKNS0_7IColumnE _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIiEEEEbRKNS0_7IColumnE Line | Count | Source | 717 | 3 | bool is_column(const IColumn& column) { | 718 | 3 | return check_and_get_column<Type>(&column); | 719 | 3 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIlEEEEbRKNS0_7IColumnE Line | Count | Source | 717 | 5 | bool is_column(const IColumn& column) { | 718 | 5 | return check_and_get_column<Type>(&column); | 719 | 5 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorInEEEEbRKNS0_7IColumnE Line | Count | Source | 717 | 1 | bool is_column(const IColumn& column) { | 718 | 1 | return check_and_get_column<Type>(&column); | 719 | 1 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIfEEEEbRKNS0_7IColumnE Line | Count | Source | 717 | 1 | bool is_column(const IColumn& column) { | 718 | 1 | return check_and_get_column<Type>(&column); | 719 | 1 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIdEEEEbRKNS0_7IColumnE Line | Count | Source | 717 | 1 | bool is_column(const IColumn& column) { | 718 | 1 | return check_and_get_column<Type>(&column); | 719 | 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 | 717 | 2 | bool is_column(const IColumn& column) { | 718 | 2 | return check_and_get_column<Type>(&column); | 719 | 2 | } |
Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_13ColumnDecimalINS0_7DecimalIN4wide7integerILm256EiEEEEEEEEbRKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIjEEEEbRKNS0_7IColumnE Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_12ColumnVectorImEEEEbRKNS0_7IColumnE |
720 | | |
721 | | template <typename Type> |
722 | 1.64k | bool is_column(const IColumn* column) { |
723 | 1.64k | return check_and_get_column<Type>(column); |
724 | 1.64k | } _ZN5doris10vectorized9is_columnINS0_11ColumnArrayEEEbPKNS0_7IColumnE Line | Count | Source | 722 | 1.58k | bool is_column(const IColumn* column) { | 723 | 1.58k | return check_and_get_column<Type>(column); | 724 | 1.58k | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIiEEEEbPKNS0_7IColumnE Line | Count | Source | 722 | 7 | bool is_column(const IColumn* column) { | 723 | 7 | return check_and_get_column<Type>(column); | 724 | 7 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIaEEEEbPKNS0_7IColumnE Line | Count | Source | 722 | 7 | bool is_column(const IColumn* column) { | 723 | 7 | return check_and_get_column<Type>(column); | 724 | 7 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIsEEEEbPKNS0_7IColumnE Line | Count | Source | 722 | 7 | bool is_column(const IColumn* column) { | 723 | 7 | return check_and_get_column<Type>(column); | 724 | 7 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIlEEEEbPKNS0_7IColumnE Line | Count | Source | 722 | 4 | bool is_column(const IColumn* column) { | 723 | 4 | return check_and_get_column<Type>(column); | 724 | 4 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorInEEEEbPKNS0_7IColumnE Line | Count | Source | 722 | 4 | bool is_column(const IColumn* column) { | 723 | 4 | return check_and_get_column<Type>(column); | 724 | 4 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIfEEEEbPKNS0_7IColumnE Line | Count | Source | 722 | 4 | bool is_column(const IColumn* column) { | 723 | 4 | return check_and_get_column<Type>(column); | 724 | 4 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIdEEEEbPKNS0_7IColumnE Line | Count | Source | 722 | 4 | bool is_column(const IColumn* column) { | 723 | 4 | return check_and_get_column<Type>(column); | 724 | 4 | } |
_ZN5doris10vectorized9is_columnINS0_9ColumnMapEEEbPKNS0_7IColumnE Line | Count | Source | 722 | 8 | bool is_column(const IColumn* column) { | 723 | 8 | return check_and_get_column<Type>(column); | 724 | 8 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorItEEEEbPKNS0_7IColumnE Line | Count | Source | 722 | 3 | bool is_column(const IColumn* column) { | 723 | 3 | return check_and_get_column<Type>(column); | 724 | 3 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorIjEEEEbPKNS0_7IColumnE Line | Count | Source | 722 | 3 | bool is_column(const IColumn* column) { | 723 | 3 | return check_and_get_column<Type>(column); | 724 | 3 | } |
_ZN5doris10vectorized9is_columnINS0_12ColumnVectorImEEEEbPKNS0_7IColumnE Line | Count | Source | 722 | 3 | bool is_column(const IColumn* column) { | 723 | 3 | return check_and_get_column<Type>(column); | 724 | 3 | } |
Unexecuted instantiation: _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIoEEEEbPKNS0_7IColumnE _ZN5doris10vectorized9is_columnINS0_12ColumnVectorIhEEEEbPKNS0_7IColumnE Line | Count | Source | 722 | 3 | bool is_column(const IColumn* column) { | 723 | 3 | return check_and_get_column<Type>(column); | 724 | 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 |
725 | | |
726 | | // check_and_get_column_ptr is used to return a ColumnPtr of a specific column type, |
727 | | // which will hold ownership. This prevents the occurrence of dangling pointers due to certain situations. |
728 | | template <typename ColumnType> |
729 | 4 | ColumnType::Ptr check_and_get_column_ptr(const ColumnPtr& column) { |
730 | 4 | const ColumnType* raw_type_ptr = check_and_get_column<ColumnType>(column.get()); |
731 | 4 | if (raw_type_ptr == nullptr) { |
732 | 1 | return nullptr; |
733 | 1 | } |
734 | 3 | return typename ColumnType::Ptr(const_cast<ColumnType*>(raw_type_ptr)); |
735 | 4 | } _ZN5doris10vectorized24check_and_get_column_ptrINS0_12ColumnVectorIiEEEENT_3PtrERKNS_3COWINS0_7IColumnEE13immutable_ptrIS7_EE Line | Count | Source | 729 | 2 | ColumnType::Ptr check_and_get_column_ptr(const ColumnPtr& column) { | 730 | 2 | const ColumnType* raw_type_ptr = check_and_get_column<ColumnType>(column.get()); | 731 | 2 | if (raw_type_ptr == nullptr) { | 732 | 0 | return nullptr; | 733 | 0 | } | 734 | 2 | return typename ColumnType::Ptr(const_cast<ColumnType*>(raw_type_ptr)); | 735 | 2 | } |
_ZN5doris10vectorized24check_and_get_column_ptrINS0_12ColumnVectorIlEEEENT_3PtrERKNS_3COWINS0_7IColumnEE13immutable_ptrIS7_EE Line | Count | Source | 729 | 1 | ColumnType::Ptr check_and_get_column_ptr(const ColumnPtr& column) { | 730 | 1 | const ColumnType* raw_type_ptr = check_and_get_column<ColumnType>(column.get()); | 731 | 1 | if (raw_type_ptr == nullptr) { | 732 | 1 | return nullptr; | 733 | 1 | } | 734 | 0 | return typename ColumnType::Ptr(const_cast<ColumnType*>(raw_type_ptr)); | 735 | 1 | } |
_ZN5doris10vectorized24check_and_get_column_ptrINS0_14ColumnNullableEEENT_3PtrERKNS_3COWINS0_7IColumnEE13immutable_ptrIS6_EE Line | Count | Source | 729 | 1 | ColumnType::Ptr check_and_get_column_ptr(const ColumnPtr& column) { | 730 | 1 | const ColumnType* raw_type_ptr = check_and_get_column<ColumnType>(column.get()); | 731 | 1 | if (raw_type_ptr == nullptr) { | 732 | 0 | return nullptr; | 733 | 0 | } | 734 | 1 | return typename ColumnType::Ptr(const_cast<ColumnType*>(raw_type_ptr)); | 735 | 1 | } |
|
736 | | |
737 | | /// True if column's an ColumnConst instance. It's just a syntax sugar for type check. |
738 | | bool is_column_const(const IColumn& column); |
739 | | |
740 | | /// True if column's an ColumnNullable instance. It's just a syntax sugar for type check. |
741 | | bool is_column_nullable(const IColumn& column); |
742 | | } // namespace doris::vectorized |
743 | | |
744 | | // Wrap `ColumnPtr` because `ColumnPtr` can't be used in forward declaration. |
745 | | namespace doris { |
746 | | struct ColumnPtrWrapper { |
747 | | vectorized::ColumnPtr column_ptr; |
748 | | |
749 | 17.7k | ColumnPtrWrapper(vectorized::ColumnPtr col) : column_ptr(std::move(col)) {} |
750 | | }; |
751 | | } // namespace doris |