Coverage Report

Created: 2024-11-22 20:18

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