Coverage Report

Created: 2026-10-29 06:29

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exprs/vcase_expr.h
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#pragma once
19
20
#include <string>
21
22
#include "common/exception.h"
23
#include "common/status.h"
24
#include "core/column/column_array.h"
25
#include "core/column/column_complex.h"
26
#include "core/column/column_const.h"
27
#include "core/column/column_decimal.h"
28
#include "core/column/column_map.h"
29
#include "core/column/column_nullable.h"
30
#include "core/column/column_struct.h"
31
#include "core/column/column_varbinary.h"
32
#include "core/column/variant_v2/column_variant_v2.h"
33
#include "core/data_type/data_type_nullable.h"
34
#include "core/data_type/data_type_variant_v2.h"
35
#include "core/data_type/define_primitive_type.h"
36
#include "core/data_type/primitive_type.h"
37
#include "exprs/function/function.h"
38
#include "exprs/function_context.h"
39
#include "exprs/vexpr.h"
40
41
namespace doris {
42
class RowDescriptor;
43
class RuntimeState;
44
class TExprNode;
45
46
class Block;
47
} // namespace doris
48
49
namespace doris {
50
51
class VCaseExpr final : public VExpr {
52
    ENABLE_FACTORY_CREATOR(VCaseExpr);
53
54
public:
55
    VCaseExpr(const TExprNode& node);
56
    ~VCaseExpr() override = default;
57
    Status execute_column_impl(VExprContext* context, const Block* block, const Selector* selector,
58
                               size_t count, ColumnPtr& result_column) const override;
59
    Status prepare(RuntimeState* state, const RowDescriptor& desc, VExprContext* context) override;
60
    Status open(RuntimeState* state, VExprContext* context,
61
                FunctionContext::FunctionStateScope scope) override;
62
    void close(VExprContext* context, FunctionContext::FunctionStateScope scope) override;
63
    const std::string& expr_name() const override;
64
    std::string debug_string() const override;
65
0
    bool has_else_expr() const { return _has_else_expr; }
66
1
    Status clone_node(VExprSPtr* cloned_expr) const override {
67
1
        DORIS_CHECK(cloned_expr != nullptr);
68
1
        auto node = clone_texpr_node();
69
1
        TCaseExpr case_node;
70
1
        case_node.__set_has_case_expr(false);
71
1
        case_node.__set_has_else_expr(_has_else_expr);
72
1
        node.__set_case_expr(case_node);
73
1
        *cloned_expr = VCaseExpr::create_shared(node);
74
1
        return Status::OK();
75
1
    }
76
77
private:
78
    template <typename IndexType, typename ColumnType>
79
    ColumnPtr _execute_update_result_impl(const IndexType* then_idx,
80
                                          std::vector<ColumnPtr>& then_columns,
81
806
                                          size_t rows_count) const {
82
806
        auto result_column_ptr = data_type()->create_column();
83
806
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
281
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
281
            if (data_type()->is_nullable()) {
99
163
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
163
                                                                  then_columns, rows_count);
101
163
            } else {
102
118
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
118
                                                                   then_columns, rows_count);
104
118
            }
105
525
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
77
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
77
                                                              then_columns, rows_count);
109
448
        } else {
110
448
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
448
                                                           then_columns, rows_count);
112
448
        }
113
806
        return result_column_ptr;
114
806
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE2EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE3EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE4EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE5EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE6EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE7EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE8EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE9EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_13ColumnDecimalILNS_13PrimitiveTypeE28EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_13ColumnDecimalILNS_13PrimitiveTypeE30EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_13ColumnDecimalILNS_13PrimitiveTypeE20EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_9ColumnStrIjEEEENS_3COWINS_7IColumnEE13immutable_ptrIS5_EEPKT_RSt6vectorIS8_SaIS8_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_15ColumnVarbinaryEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE11EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE12EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE26EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE43EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE42EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE37EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE44EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE36EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_11ColumnArrayEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_9ColumnMapEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnStructEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE19EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE24EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_15ColumnVariantV2EEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE2EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE3EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
15
                                          size_t rows_count) const {
82
15
        auto result_column_ptr = data_type()->create_column();
83
15
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
15
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
4
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
4
                                                              then_columns, rows_count);
109
11
        } else {
110
11
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
11
                                                           then_columns, rows_count);
112
11
        }
113
15
        return result_column_ptr;
114
15
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE4EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE5EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
22
                                          size_t rows_count) const {
82
22
        auto result_column_ptr = data_type()->create_column();
83
22
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
22
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
22
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
22
                                                              then_columns, rows_count);
109
22
        } else {
110
0
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
0
                                                           then_columns, rows_count);
112
0
        }
113
22
        return result_column_ptr;
114
22
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE6EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
173
                                          size_t rows_count) const {
82
173
        auto result_column_ptr = data_type()->create_column();
83
173
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
173
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
40
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
40
                                                              then_columns, rows_count);
109
133
        } else {
110
133
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
133
                                                           then_columns, rows_count);
112
133
        }
113
173
        return result_column_ptr;
114
173
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE7EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE8EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
26
                                          size_t rows_count) const {
82
26
        auto result_column_ptr = data_type()->create_column();
83
26
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
26
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
1
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
1
                                                              then_columns, rows_count);
109
25
        } else {
110
25
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
25
                                                           then_columns, rows_count);
112
25
        }
113
26
        return result_column_ptr;
114
26
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE9EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
30
                                          size_t rows_count) const {
82
30
        auto result_column_ptr = data_type()->create_column();
83
30
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
30
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
5
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
5
                                                              then_columns, rows_count);
109
25
        } else {
110
25
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
25
                                                           then_columns, rows_count);
112
25
        }
113
30
        return result_column_ptr;
114
30
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE28EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
1
                                          size_t rows_count) const {
82
1
        auto result_column_ptr = data_type()->create_column();
83
1
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
1
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
1
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
1
                                                              then_columns, rows_count);
109
1
        } else {
110
0
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
0
                                                           then_columns, rows_count);
112
0
        }
113
1
        return result_column_ptr;
114
1
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
1
                                          size_t rows_count) const {
82
1
        auto result_column_ptr = data_type()->create_column();
83
1
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
1
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
1
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
1
                                                              then_columns, rows_count);
109
1
        } else {
110
0
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
0
                                                           then_columns, rows_count);
112
0
        }
113
1
        return result_column_ptr;
114
1
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE30EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE20EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_9ColumnStrIjEEEENS_3COWINS_7IColumnEE13immutable_ptrIS5_EEPKT_RSt6vectorIS8_SaIS8_EEm
Line
Count
Source
81
258
                                          size_t rows_count) const {
82
258
        auto result_column_ptr = data_type()->create_column();
83
258
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
258
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
258
            if (data_type()->is_nullable()) {
99
142
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
142
                                                                  then_columns, rows_count);
101
142
            } else {
102
116
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
116
                                                                   then_columns, rows_count);
104
116
            }
105
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
                                                              then_columns, rows_count);
109
        } else {
110
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
                                                           then_columns, rows_count);
112
        }
113
258
        return result_column_ptr;
114
258
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_15ColumnVarbinaryEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Line
Count
Source
81
12
                                          size_t rows_count) const {
82
12
        auto result_column_ptr = data_type()->create_column();
83
12
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
12
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
12
            if (data_type()->is_nullable()) {
99
10
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
10
                                                                  then_columns, rows_count);
101
10
            } else {
102
2
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
2
                                                                   then_columns, rows_count);
104
2
            }
105
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
                                                              then_columns, rows_count);
109
        } else {
110
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
                                                           then_columns, rows_count);
112
        }
113
12
        return result_column_ptr;
114
12
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE11EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE12EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
20
                                          size_t rows_count) const {
82
20
        auto result_column_ptr = data_type()->create_column();
83
20
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
20
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
20
        } else {
110
20
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
20
                                                           then_columns, rows_count);
112
20
        }
113
20
        return result_column_ptr;
114
20
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE26EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE43EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
21
                                          size_t rows_count) const {
82
21
        auto result_column_ptr = data_type()->create_column();
83
21
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
21
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
3
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
3
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
21
        return result_column_ptr;
114
21
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE42EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE37EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE44EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE36EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_11ColumnArrayEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_9ColumnMapEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnStructEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
10
                                          size_t rows_count) const {
82
10
        auto result_column_ptr = data_type()->create_column();
83
10
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
10
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
10
            if (data_type()->is_nullable()) {
99
10
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
10
                                                                  then_columns, rows_count);
101
10
            } else {
102
0
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
0
                                                                   then_columns, rows_count);
104
0
            }
105
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
                                                              then_columns, rows_count);
109
        } else {
110
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
                                                           then_columns, rows_count);
112
        }
113
10
        return result_column_ptr;
114
10
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE19EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE24EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_15ColumnVariantV2EEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Line
Count
Source
81
1
                                          size_t rows_count) const {
82
1
        auto result_column_ptr = data_type()->create_column();
83
1
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
1
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
1
            if (data_type()->is_nullable()) {
99
1
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
1
                                                                  then_columns, rows_count);
101
1
            } else {
102
0
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
0
                                                                   then_columns, rows_count);
104
0
            }
105
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
                                                              then_columns, rows_count);
109
        } else {
110
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
                                                           then_columns, rows_count);
112
        }
113
1
        return result_column_ptr;
114
1
    }
115
116
    template <typename IndexType>
117
    ColumnPtr _execute_update_result(const IndexType* then_idx,
118
                                     std::vector<ColumnPtr>& then_columns,
119
518
                                     size_t rows_count) const {
120
518
#define CASE_TYPE(ptype, coltype) \
121
518
    case PrimitiveType::ptype:    \
122
517
        return _execute_update_result_impl<IndexType, coltype>(then_idx, then_columns, rows_count);
123
124
518
        switch (data_type()->get_primitive_type()) {
125
0
            CASE_TYPE(TYPE_BOOLEAN, ColumnUInt8)
126
15
            CASE_TYPE(TYPE_TINYINT, ColumnInt8)
127
0
            CASE_TYPE(TYPE_SMALLINT, ColumnInt16)
128
22
            CASE_TYPE(TYPE_INT, ColumnInt32)
129
173
            CASE_TYPE(TYPE_BIGINT, ColumnInt64)
130
0
            CASE_TYPE(TYPE_LARGEINT, ColumnInt128)
131
8
            CASE_TYPE(TYPE_FLOAT, ColumnFloat32)
132
12
            CASE_TYPE(TYPE_DOUBLE, ColumnFloat64)
133
0
            CASE_TYPE(TYPE_DECIMAL32, ColumnDecimal32)
134
1
            CASE_TYPE(TYPE_DECIMAL64, ColumnDecimal64)
135
1
            CASE_TYPE(TYPE_DECIMAL256, ColumnDecimal256)
136
0
            CASE_TYPE(TYPE_DECIMAL128I, ColumnDecimal128V3)
137
0
            CASE_TYPE(TYPE_DECIMALV2, ColumnDecimal128V2)
138
116
            CASE_TYPE(TYPE_STRING, ColumnString)
139
0
            CASE_TYPE(TYPE_CHAR, ColumnString)
140
142
            CASE_TYPE(TYPE_VARCHAR, ColumnString)
141
0
            CASE_TYPE(TYPE_JSONB, ColumnString)
142
12
            CASE_TYPE(TYPE_VARBINARY, ColumnVarbinary)
143
0
            CASE_TYPE(TYPE_DATE, ColumnDate)
144
0
            CASE_TYPE(TYPE_DATETIME, ColumnDateTime)
145
2
            CASE_TYPE(TYPE_DATEV2, ColumnDateV2)
146
0
            CASE_TYPE(TYPE_DATETIMEV2, ColumnDateTimeV2)
147
3
            CASE_TYPE(TYPE_TIMESTAMP_NS, ColumnTimeStampNs)
148
0
            CASE_TYPE(TYPE_TIMESTAMPTZ, ColumnTimeStampTz)
149
0
            CASE_TYPE(TYPE_IPV6, ColumnIPv6)
150
0
            CASE_TYPE(TYPE_UUID, ColumnUUID)
151
0
            CASE_TYPE(TYPE_IPV4, ColumnIPv4)
152
0
            CASE_TYPE(TYPE_ARRAY, ColumnArray)
153
0
            CASE_TYPE(TYPE_MAP, ColumnMap)
154
0
            CASE_TYPE(TYPE_STRUCT, ColumnStruct)
155
10
            CASE_TYPE(TYPE_BITMAP, ColumnBitmap)
156
0
            CASE_TYPE(TYPE_HLL, ColumnHLL)
157
0
            CASE_TYPE(TYPE_QUANTILE_STATE, ColumnQuantileState)
158
1
        case PrimitiveType::TYPE_VARIANT: {
159
1
            const IDataType* variant_type = remove_nullable(data_type()).get();
160
1
            DORIS_CHECK(dynamic_cast<const DataTypeVariantV2*>(variant_type) != nullptr);
161
1
            return _execute_update_result_impl<IndexType, ColumnVariantV2>(then_idx, then_columns,
162
1
                                                                           rows_count);
163
0
        }
164
0
        default:
165
0
            throw Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, "argument_type {} not supported",
166
0
                            data_type()->get_name());
167
518
        }
168
518
#undef CASE_TYPE
169
518
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr22_execute_update_resultItEENS_3COWINS_7IColumnEE13immutable_ptrIS3_EEPKT_RSt6vectorIS6_SaIS6_EEm
_ZNK5doris9VCaseExpr22_execute_update_resultIhEENS_3COWINS_7IColumnEE13immutable_ptrIS3_EEPKT_RSt6vectorIS6_SaIS6_EEm
Line
Count
Source
119
518
                                     size_t rows_count) const {
120
518
#define CASE_TYPE(ptype, coltype) \
121
518
    case PrimitiveType::ptype:    \
122
518
        return _execute_update_result_impl<IndexType, coltype>(then_idx, then_columns, rows_count);
123
124
518
        switch (data_type()->get_primitive_type()) {
125
0
            CASE_TYPE(TYPE_BOOLEAN, ColumnUInt8)
126
15
            CASE_TYPE(TYPE_TINYINT, ColumnInt8)
127
0
            CASE_TYPE(TYPE_SMALLINT, ColumnInt16)
128
22
            CASE_TYPE(TYPE_INT, ColumnInt32)
129
173
            CASE_TYPE(TYPE_BIGINT, ColumnInt64)
130
0
            CASE_TYPE(TYPE_LARGEINT, ColumnInt128)
131
8
            CASE_TYPE(TYPE_FLOAT, ColumnFloat32)
132
12
            CASE_TYPE(TYPE_DOUBLE, ColumnFloat64)
133
0
            CASE_TYPE(TYPE_DECIMAL32, ColumnDecimal32)
134
1
            CASE_TYPE(TYPE_DECIMAL64, ColumnDecimal64)
135
1
            CASE_TYPE(TYPE_DECIMAL256, ColumnDecimal256)
136
0
            CASE_TYPE(TYPE_DECIMAL128I, ColumnDecimal128V3)
137
0
            CASE_TYPE(TYPE_DECIMALV2, ColumnDecimal128V2)
138
116
            CASE_TYPE(TYPE_STRING, ColumnString)
139
0
            CASE_TYPE(TYPE_CHAR, ColumnString)
140
142
            CASE_TYPE(TYPE_VARCHAR, ColumnString)
141
0
            CASE_TYPE(TYPE_JSONB, ColumnString)
142
12
            CASE_TYPE(TYPE_VARBINARY, ColumnVarbinary)
143
0
            CASE_TYPE(TYPE_DATE, ColumnDate)
144
0
            CASE_TYPE(TYPE_DATETIME, ColumnDateTime)
145
2
            CASE_TYPE(TYPE_DATEV2, ColumnDateV2)
146
0
            CASE_TYPE(TYPE_DATETIMEV2, ColumnDateTimeV2)
147
3
            CASE_TYPE(TYPE_TIMESTAMP_NS, ColumnTimeStampNs)
148
0
            CASE_TYPE(TYPE_TIMESTAMPTZ, ColumnTimeStampTz)
149
0
            CASE_TYPE(TYPE_IPV6, ColumnIPv6)
150
0
            CASE_TYPE(TYPE_UUID, ColumnUUID)
151
0
            CASE_TYPE(TYPE_IPV4, ColumnIPv4)
152
0
            CASE_TYPE(TYPE_ARRAY, ColumnArray)
153
0
            CASE_TYPE(TYPE_MAP, ColumnMap)
154
0
            CASE_TYPE(TYPE_STRUCT, ColumnStruct)
155
10
            CASE_TYPE(TYPE_BITMAP, ColumnBitmap)
156
0
            CASE_TYPE(TYPE_HLL, ColumnHLL)
157
0
            CASE_TYPE(TYPE_QUANTILE_STATE, ColumnQuantileState)
158
1
        case PrimitiveType::TYPE_VARIANT: {
159
1
            const IDataType* variant_type = remove_nullable(data_type()).get();
160
1
            DORIS_CHECK(dynamic_cast<const DataTypeVariantV2*>(variant_type) != nullptr);
161
1
            return _execute_update_result_impl<IndexType, ColumnVariantV2>(then_idx, then_columns,
162
1
                                                                           rows_count);
163
0
        }
164
0
        default:
165
0
            throw Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, "argument_type {} not supported",
166
0
                            data_type()->get_name());
167
518
        }
168
518
#undef CASE_TYPE
169
518
    }
170
171
    template <typename IndexType, typename ColumnType, bool then_null>
172
    void update_result_normal(MutableColumnPtr& result_column_ptr,
173
                              const IndexType* __restrict then_idx,
174
358
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
358
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
358
        std::vector<uint8_t> is_consts(then_columns.size());
177
358
        std::vector<uint8_t> is_nullable(then_columns.size());
178
1.21k
        for (size_t i = 0; i < then_columns.size(); i++) {
179
852
            if (!then_columns[i]) {
180
67
                continue;
181
67
            }
182
785
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
785
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
785
        }
185
186
358
        auto* raw_result_column = result_column_ptr.get();
187
324k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
324k
            if (!_has_else_expr && !then_idx[row_idx]) {
189
24
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
24
                        ->insert_default();
191
24
                continue;
192
24
            }
193
324k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
324k
            if constexpr (then_null) {
195
96.7k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
96.7k
                        result_column_ptr.get());
197
98.5k
                if (is_nullable[then_idx[row_idx]]) {
198
98.5k
                    nullable->insert_from_with_type<ColumnType>(
199
98.5k
                            *raw_then_columns[then_idx[row_idx]], target);
200
18.4E
                } else {
201
18.4E
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
18.4E
                            nullable->get_nested_column_ptr().get());
203
18.4E
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
18.4E
                    nullable->push_false_to_nullmap(1);
205
18.4E
                }
206
227k
            } else {
207
227k
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
227k
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
227k
            }
210
324k
        }
211
358
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE2EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE3EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE4EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE5EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE6EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE7EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE8EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE9EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_13ColumnDecimalILNS_13PrimitiveTypeE28EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_13ColumnDecimalILNS_13PrimitiveTypeE30EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_13ColumnDecimalILNS_13PrimitiveTypeE20EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_9ColumnStrIjEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS5_EEPKT_RSt6vectorINS6_13immutable_ptrIS5_EESaISF_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_9ColumnStrIjEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS5_EEPKT_RSt6vectorINS6_13immutable_ptrIS5_EESaISF_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_15ColumnVarbinaryELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_15ColumnVarbinaryELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE11EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE12EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE25EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE26EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE43EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE42EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE37EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE37EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE44EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE44EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE36EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE36EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_11ColumnArrayELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_11ColumnArrayELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_9ColumnMapELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_9ColumnMapELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnStructELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnStructELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE19EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE19EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE24EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE24EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_15ColumnVariantV2ELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_15ColumnVariantV2ELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE2EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE3EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
4
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
4
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
4
        std::vector<uint8_t> is_consts(then_columns.size());
177
4
        std::vector<uint8_t> is_nullable(then_columns.size());
178
12
        for (size_t i = 0; i < then_columns.size(); i++) {
179
8
            if (!then_columns[i]) {
180
3
                continue;
181
3
            }
182
5
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
5
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
5
        }
185
186
4
        auto* raw_result_column = result_column_ptr.get();
187
10
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
6
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
6
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
6
            if constexpr (then_null) {
195
6
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
6
                        result_column_ptr.get());
197
6
                if (is_nullable[then_idx[row_idx]]) {
198
1
                    nullable->insert_from_with_type<ColumnType>(
199
1
                            *raw_then_columns[then_idx[row_idx]], target);
200
5
                } else {
201
5
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
5
                            nullable->get_nested_column_ptr().get());
203
5
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
5
                    nullable->push_false_to_nullmap(1);
205
5
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
6
        }
211
4
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE4EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE5EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
22
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
22
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
22
        std::vector<uint8_t> is_consts(then_columns.size());
177
22
        std::vector<uint8_t> is_nullable(then_columns.size());
178
50
        for (size_t i = 0; i < then_columns.size(); i++) {
179
28
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
28
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
28
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
28
        }
185
186
22
        auto* raw_result_column = result_column_ptr.get();
187
54
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
32
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
32
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
32
            if constexpr (then_null) {
195
32
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
32
                        result_column_ptr.get());
197
32
                if (is_nullable[then_idx[row_idx]]) {
198
32
                    nullable->insert_from_with_type<ColumnType>(
199
32
                            *raw_then_columns[then_idx[row_idx]], target);
200
32
                } else {
201
0
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
0
                            nullable->get_nested_column_ptr().get());
203
0
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
0
                    nullable->push_false_to_nullmap(1);
205
0
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
32
        }
211
22
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE6EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
40
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
40
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
40
        std::vector<uint8_t> is_consts(then_columns.size());
177
40
        std::vector<uint8_t> is_nullable(then_columns.size());
178
145
        for (size_t i = 0; i < then_columns.size(); i++) {
179
105
            if (!then_columns[i]) {
180
32
                continue;
181
32
            }
182
73
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
73
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
73
        }
185
186
40
        auto* raw_result_column = result_column_ptr.get();
187
95.5k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
95.7k
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
95.5k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
95.5k
            if constexpr (then_null) {
195
95.5k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
95.5k
                        result_column_ptr.get());
197
98.4k
                if (is_nullable[then_idx[row_idx]]) {
198
98.4k
                    nullable->insert_from_with_type<ColumnType>(
199
98.4k
                            *raw_then_columns[then_idx[row_idx]], target);
200
18.4E
                } else {
201
18.4E
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
18.4E
                            nullable->get_nested_column_ptr().get());
203
18.4E
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
18.4E
                    nullable->push_false_to_nullmap(1);
205
18.4E
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
95.5k
        }
211
40
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE7EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE8EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
1
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
1
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
1
        std::vector<uint8_t> is_consts(then_columns.size());
177
1
        std::vector<uint8_t> is_nullable(then_columns.size());
178
4
        for (size_t i = 0; i < then_columns.size(); i++) {
179
3
            if (!then_columns[i]) {
180
1
                continue;
181
1
            }
182
2
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
2
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
2
        }
185
186
1
        auto* raw_result_column = result_column_ptr.get();
187
4
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
3
            if (!_has_else_expr && !then_idx[row_idx]) {
189
1
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
1
                        ->insert_default();
191
1
                continue;
192
1
            }
193
2
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
2
            if constexpr (then_null) {
195
2
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
2
                        result_column_ptr.get());
197
2
                if (is_nullable[then_idx[row_idx]]) {
198
0
                    nullable->insert_from_with_type<ColumnType>(
199
0
                            *raw_then_columns[then_idx[row_idx]], target);
200
2
                } else {
201
2
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
2
                            nullable->get_nested_column_ptr().get());
203
2
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
2
                    nullable->push_false_to_nullmap(1);
205
2
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
2
        }
211
1
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE9EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
5
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
5
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
5
        std::vector<uint8_t> is_consts(then_columns.size());
177
5
        std::vector<uint8_t> is_nullable(then_columns.size());
178
25
        for (size_t i = 0; i < then_columns.size(); i++) {
179
20
            if (!then_columns[i]) {
180
2
                continue;
181
2
            }
182
18
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
18
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
18
        }
185
186
5
        auto* raw_result_column = result_column_ptr.get();
187
26
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
21
            if (!_has_else_expr && !then_idx[row_idx]) {
189
1
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
1
                        ->insert_default();
191
1
                continue;
192
1
            }
193
20
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
20
            if constexpr (then_null) {
195
20
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
20
                        result_column_ptr.get());
197
20
                if (is_nullable[then_idx[row_idx]]) {
198
7
                    nullable->insert_from_with_type<ColumnType>(
199
7
                            *raw_then_columns[then_idx[row_idx]], target);
200
13
                } else {
201
13
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
13
                            nullable->get_nested_column_ptr().get());
203
13
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
13
                    nullable->push_false_to_nullmap(1);
205
13
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
20
        }
211
5
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_13ColumnDecimalILNS_13PrimitiveTypeE28EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
1
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
1
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
1
        std::vector<uint8_t> is_consts(then_columns.size());
177
1
        std::vector<uint8_t> is_nullable(then_columns.size());
178
2
        for (size_t i = 0; i < then_columns.size(); i++) {
179
1
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
1
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
1
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
1
        }
185
186
1
        auto* raw_result_column = result_column_ptr.get();
187
2
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
1
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
1
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
1
            if constexpr (then_null) {
195
1
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
1
                        result_column_ptr.get());
197
1
                if (is_nullable[then_idx[row_idx]]) {
198
1
                    nullable->insert_from_with_type<ColumnType>(
199
1
                            *raw_then_columns[then_idx[row_idx]], target);
200
1
                } else {
201
0
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
0
                            nullable->get_nested_column_ptr().get());
203
0
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
0
                    nullable->push_false_to_nullmap(1);
205
0
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
1
        }
211
1
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
1
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
1
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
1
        std::vector<uint8_t> is_consts(then_columns.size());
177
1
        std::vector<uint8_t> is_nullable(then_columns.size());
178
5
        for (size_t i = 0; i < then_columns.size(); i++) {
179
4
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
4
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
4
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
4
        }
185
186
1
        auto* raw_result_column = result_column_ptr.get();
187
4
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
3
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
3
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
3
            if constexpr (then_null) {
195
3
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
3
                        result_column_ptr.get());
197
3
                if (is_nullable[then_idx[row_idx]]) {
198
3
                    nullable->insert_from_with_type<ColumnType>(
199
3
                            *raw_then_columns[then_idx[row_idx]], target);
200
3
                } else {
201
0
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
0
                            nullable->get_nested_column_ptr().get());
203
0
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
0
                    nullable->push_false_to_nullmap(1);
205
0
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
3
        }
211
1
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_13ColumnDecimalILNS_13PrimitiveTypeE30EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_13ColumnDecimalILNS_13PrimitiveTypeE20EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnStrIjEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS5_EEPKT_RSt6vectorINS6_13immutable_ptrIS5_EESaISF_EEm
Line
Count
Source
174
142
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
142
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
142
        std::vector<uint8_t> is_consts(then_columns.size());
177
142
        std::vector<uint8_t> is_nullable(then_columns.size());
178
460
        for (size_t i = 0; i < then_columns.size(); i++) {
179
318
            if (!then_columns[i]) {
180
25
                continue;
181
25
            }
182
293
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
293
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
293
        }
185
186
142
        auto* raw_result_column = result_column_ptr.get();
187
1.25k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
1.11k
            if (!_has_else_expr && !then_idx[row_idx]) {
189
11
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
11
                        ->insert_default();
191
11
                continue;
192
11
            }
193
1.10k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
1.10k
            if constexpr (then_null) {
195
1.10k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
1.10k
                        result_column_ptr.get());
197
1.10k
                if (is_nullable[then_idx[row_idx]]) {
198
23
                    nullable->insert_from_with_type<ColumnType>(
199
23
                            *raw_then_columns[then_idx[row_idx]], target);
200
1.07k
                } else {
201
1.07k
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
1.07k
                            nullable->get_nested_column_ptr().get());
203
1.07k
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
1.07k
                    nullable->push_false_to_nullmap(1);
205
1.07k
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
1.10k
        }
211
142
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnStrIjEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS5_EEPKT_RSt6vectorINS6_13immutable_ptrIS5_EESaISF_EEm
Line
Count
Source
174
116
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
116
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
116
        std::vector<uint8_t> is_consts(then_columns.size());
177
116
        std::vector<uint8_t> is_nullable(then_columns.size());
178
413
        for (size_t i = 0; i < then_columns.size(); i++) {
179
297
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
297
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
297
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
297
        }
185
186
116
        auto* raw_result_column = result_column_ptr.get();
187
227k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
227k
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
18.4E
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
            if constexpr (then_null) {
195
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
                        result_column_ptr.get());
197
                if (is_nullable[then_idx[row_idx]]) {
198
                    nullable->insert_from_with_type<ColumnType>(
199
                            *raw_then_columns[then_idx[row_idx]], target);
200
                } else {
201
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
                            nullable->get_nested_column_ptr().get());
203
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
                    nullable->push_false_to_nullmap(1);
205
                }
206
227k
            } else {
207
227k
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
227k
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
227k
            }
210
227k
        }
211
116
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_15ColumnVarbinaryELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Line
Count
Source
174
10
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
10
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
10
        std::vector<uint8_t> is_consts(then_columns.size());
177
10
        std::vector<uint8_t> is_nullable(then_columns.size());
178
40
        for (size_t i = 0; i < then_columns.size(); i++) {
179
30
            if (!then_columns[i]) {
180
4
                continue;
181
4
            }
182
26
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
26
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
26
        }
185
186
10
        auto* raw_result_column = result_column_ptr.get();
187
88
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
78
            if (!_has_else_expr && !then_idx[row_idx]) {
189
11
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
11
                        ->insert_default();
191
11
                continue;
192
11
            }
193
67
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
67
            if constexpr (then_null) {
195
67
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
67
                        result_column_ptr.get());
197
67
                if (is_nullable[then_idx[row_idx]]) {
198
36
                    nullable->insert_from_with_type<ColumnType>(
199
36
                            *raw_then_columns[then_idx[row_idx]], target);
200
36
                } else {
201
31
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
31
                            nullable->get_nested_column_ptr().get());
203
31
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
31
                    nullable->push_false_to_nullmap(1);
205
31
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
67
        }
211
10
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_15ColumnVarbinaryELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Line
Count
Source
174
2
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
2
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
2
        std::vector<uint8_t> is_consts(then_columns.size());
177
2
        std::vector<uint8_t> is_nullable(then_columns.size());
178
7
        for (size_t i = 0; i < then_columns.size(); i++) {
179
5
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
5
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
5
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
5
        }
185
186
2
        auto* raw_result_column = result_column_ptr.get();
187
9
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
7
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
7
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
            if constexpr (then_null) {
195
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
                        result_column_ptr.get());
197
                if (is_nullable[then_idx[row_idx]]) {
198
                    nullable->insert_from_with_type<ColumnType>(
199
                            *raw_then_columns[then_idx[row_idx]], target);
200
                } else {
201
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
                            nullable->get_nested_column_ptr().get());
203
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
                    nullable->push_false_to_nullmap(1);
205
                }
206
7
            } else {
207
7
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
7
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
7
            }
210
7
        }
211
2
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE11EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE12EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE25EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE26EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE43EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
3
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
3
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
3
        std::vector<uint8_t> is_consts(then_columns.size());
177
3
        std::vector<uint8_t> is_nullable(then_columns.size());
178
14
        for (size_t i = 0; i < then_columns.size(); i++) {
179
11
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
11
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
11
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
11
        }
185
186
3
        auto* raw_result_column = result_column_ptr.get();
187
16
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
13
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
13
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
13
            if constexpr (then_null) {
195
13
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
13
                        result_column_ptr.get());
197
13
                if (is_nullable[then_idx[row_idx]]) {
198
12
                    nullable->insert_from_with_type<ColumnType>(
199
12
                            *raw_then_columns[then_idx[row_idx]], target);
200
12
                } else {
201
1
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
1
                            nullable->get_nested_column_ptr().get());
203
1
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
1
                    nullable->push_false_to_nullmap(1);
205
1
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
13
        }
211
3
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE42EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE37EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE37EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE44EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE44EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE36EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE36EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_11ColumnArrayELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_11ColumnArrayELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnMapELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnMapELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnStructELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnStructELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
10
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
10
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
10
        std::vector<uint8_t> is_consts(then_columns.size());
177
10
        std::vector<uint8_t> is_nullable(then_columns.size());
178
28
        for (size_t i = 0; i < then_columns.size(); i++) {
179
18
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
18
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
18
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
18
        }
185
186
10
        auto* raw_result_column = result_column_ptr.get();
187
20
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
10
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
10
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
10
            if constexpr (then_null) {
195
10
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
10
                        result_column_ptr.get());
197
10
                if (is_nullable[then_idx[row_idx]]) {
198
2
                    nullable->insert_from_with_type<ColumnType>(
199
2
                            *raw_then_columns[then_idx[row_idx]], target);
200
8
                } else {
201
8
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
8
                            nullable->get_nested_column_ptr().get());
203
8
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
8
                    nullable->push_false_to_nullmap(1);
205
8
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
10
        }
211
10
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE19EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE19EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE24EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE24EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_15ColumnVariantV2ELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Line
Count
Source
174
1
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
1
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
1
        std::vector<uint8_t> is_consts(then_columns.size());
177
1
        std::vector<uint8_t> is_nullable(then_columns.size());
178
5
        for (size_t i = 0; i < then_columns.size(); i++) {
179
4
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
4
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
4
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
4
        }
185
186
1
        auto* raw_result_column = result_column_ptr.get();
187
5
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
4
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
4
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
4
            if constexpr (then_null) {
195
4
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
4
                        result_column_ptr.get());
197
4
                if (is_nullable[then_idx[row_idx]]) {
198
1
                    nullable->insert_from_with_type<ColumnType>(
199
1
                            *raw_then_columns[then_idx[row_idx]], target);
200
3
                } else {
201
3
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
3
                            nullable->get_nested_column_ptr().get());
203
3
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
3
                    nullable->push_false_to_nullmap(1);
205
3
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
4
        }
211
1
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_15ColumnVariantV2ELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
212
213
    template <typename IndexType, typename ColumnType>
214
    void update_result_auto_simd(MutableColumnPtr& result_column_ptr,
215
                                 const IndexType* __restrict then_idx,
216
448
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
10.7k
        for (auto& then_ptr : then_columns) {
218
10.7k
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
10.7k
        }
220
221
448
        result_column_ptr->resize(rows_count);
222
448
        auto* __restrict result_raw_data =
223
448
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
448
                        ->get_data()
225
448
                        .data();
226
227
        // set default value
228
505k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
297k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
297k
                result_raw_data[i] = ColumnType::default_value();
236
297k
            } else {
237
207k
                result_raw_data[i] = {};
238
207k
            }
239
504k
        }
240
241
11.1k
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
10.7k
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
10.7k
            const auto* __restrict column_raw_data =
246
10.7k
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
10.7k
                            then_columns[i].get())
248
10.7k
                            ->get_data()
249
10.7k
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
10.5k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
35.9M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
35.9M
                    if (then_idx[row_idx] == i) {
263
404k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
404k
                    }
265
35.9M
                }
266
10.5k
            } else {
267
300k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
300k
                    result_raw_data[row_idx] +=
269
300k
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
300k
                            column_raw_data[row_idx];
271
300k
                }
272
186
            }
273
10.7k
        }
274
448
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE2EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE3EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE4EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE5EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE6EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE7EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE8EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
                result_raw_data[i] = ColumnType::default_value();
236
24.7k
            } else {
237
24.7k
                result_raw_data[i] = {};
238
24.7k
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE9EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
                result_raw_data[i] = ColumnType::default_value();
236
24.7k
            } else {
237
24.7k
                result_raw_data[i] = {};
238
24.7k
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_13ColumnDecimalILNS_13PrimitiveTypeE28EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_13ColumnDecimalILNS_13PrimitiveTypeE30EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_13ColumnDecimalILNS_13PrimitiveTypeE20EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE11EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE12EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE26EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE43EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE42EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE2EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE3EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
11
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
21
        for (auto& then_ptr : then_columns) {
218
21
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
21
        }
220
221
11
        result_column_ptr->resize(rows_count);
222
11
        auto* __restrict result_raw_data =
223
11
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
11
                        ->get_data()
225
11
                        .data();
226
227
        // set default value
228
37
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
                result_raw_data[i] = ColumnType::default_value();
236
26
            } else {
237
26
                result_raw_data[i] = {};
238
26
            }
239
26
        }
240
241
32
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
21
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
21
            const auto* __restrict column_raw_data =
246
21
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
21
                            then_columns[i].get())
248
21
                            ->get_data()
249
21
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
                    if (then_idx[row_idx] == i) {
263
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
                    }
265
                }
266
21
            } else {
267
80
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
59
                    result_raw_data[row_idx] +=
269
59
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
59
                            column_raw_data[row_idx];
271
59
                }
272
21
            }
273
21
        }
274
11
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE4EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE5EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE6EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
133
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
165
        for (auto& then_ptr : then_columns) {
218
165
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
165
        }
220
221
133
        result_column_ptr->resize(rows_count);
222
133
        auto* __restrict result_raw_data =
223
133
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
133
                        ->get_data()
225
133
                        .data();
226
227
        // set default value
228
100k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
                result_raw_data[i] = ColumnType::default_value();
236
100k
            } else {
237
100k
                result_raw_data[i] = {};
238
100k
            }
239
100k
        }
240
241
298
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
165
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
165
            const auto* __restrict column_raw_data =
246
165
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
165
                            then_columns[i].get())
248
165
                            ->get_data()
249
165
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
                    if (then_idx[row_idx] == i) {
263
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
                    }
265
                }
266
165
            } else {
267
300k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
300k
                    result_raw_data[row_idx] +=
269
300k
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
300k
                            column_raw_data[row_idx];
271
300k
                }
272
165
            }
273
165
        }
274
133
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE7EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE8EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
25
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
675
        for (auto& then_ptr : then_columns) {
218
675
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
675
        }
220
221
25
        result_column_ptr->resize(rows_count);
222
25
        auto* __restrict result_raw_data =
223
25
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
25
                        ->get_data()
225
25
                        .data();
226
227
        // set default value
228
28.9k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
                result_raw_data[i] = ColumnType::default_value();
236
28.8k
            } else {
237
28.8k
                result_raw_data[i] = {};
238
28.8k
            }
239
28.8k
        }
240
241
700
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
675
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
675
            const auto* __restrict column_raw_data =
246
675
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
675
                            then_columns[i].get())
248
675
                            ->get_data()
249
675
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
675
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
28.8k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
28.8k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
675
        }
274
25
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE9EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
25
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
675
        for (auto& then_ptr : then_columns) {
218
675
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
675
        }
220
221
25
        result_column_ptr->resize(rows_count);
222
25
        auto* __restrict result_raw_data =
223
25
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
25
                        ->get_data()
225
25
                        .data();
226
227
        // set default value
228
28.9k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
                result_raw_data[i] = ColumnType::default_value();
236
28.8k
            } else {
237
28.8k
                result_raw_data[i] = {};
238
28.8k
            }
239
28.8k
        }
240
241
700
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
675
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
675
            const auto* __restrict column_raw_data =
246
675
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
675
                            then_columns[i].get())
248
675
                            ->get_data()
249
675
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
675
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
28.8k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
28.8k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
675
        }
274
25
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_13ColumnDecimalILNS_13PrimitiveTypeE28EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_13ColumnDecimalILNS_13PrimitiveTypeE30EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_13ColumnDecimalILNS_13PrimitiveTypeE20EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE11EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
654
        for (auto& then_ptr : then_columns) {
218
654
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
654
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
672
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
654
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
654
            const auto* __restrict column_raw_data =
246
654
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
654
                            then_columns[i].get())
248
654
                            ->get_data()
249
654
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
654
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.23M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.23M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
654
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE12EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
654
        for (auto& then_ptr : then_columns) {
218
654
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
654
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
672
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
654
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
654
            const auto* __restrict column_raw_data =
246
654
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
654
                            then_columns[i].get())
248
654
                            ->get_data()
249
654
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
654
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.23M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.23M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
654
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
20
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
660
        for (auto& then_ptr : then_columns) {
218
660
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
660
        }
220
221
20
        result_column_ptr->resize(rows_count);
222
20
        auto* __restrict result_raw_data =
223
20
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
20
                        ->get_data()
225
20
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
680
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
660
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
660
            const auto* __restrict column_raw_data =
246
660
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
660
                            then_columns[i].get())
248
660
                            ->get_data()
249
660
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
660
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.23M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.23M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
660
        }
274
20
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE26EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
654
        for (auto& then_ptr : then_columns) {
218
654
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
654
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
672
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
654
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
654
            const auto* __restrict column_raw_data =
246
654
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
654
                            then_columns[i].get())
248
654
                            ->get_data()
249
654
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
654
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.23M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.23M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
654
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE43EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
654
        for (auto& then_ptr : then_columns) {
218
654
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
654
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
672
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
654
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
654
            const auto* __restrict column_raw_data =
246
654
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
654
                            then_columns[i].get())
248
654
                            ->get_data()
249
654
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
654
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.23M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.23M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
654
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE42EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
654
        for (auto& then_ptr : then_columns) {
218
654
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
654
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
672
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
654
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
654
            const auto* __restrict column_raw_data =
246
654
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
654
                            then_columns[i].get())
248
654
                            ->get_data()
249
654
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
654
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.23M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.23M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
654
        }
274
18
    }
275
276
    template <typename IndexType>
277
    ColumnPtr _execute_impl(const std::vector<ColumnPtr>& when_columns,
278
516
                            std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
279
516
        std::vector<IndexType> then_idx(rows_count, 0);
280
516
        IndexType* __restrict then_idx_ptr = then_idx.data();
281
941
        for (IndexType i = 0; i < when_columns.size(); i++) {
282
540
            IndexType column_idx = i + 1;
283
540
            auto [raw_when_column, is_consts] = unpack_if_const(when_columns[i]);
284
285
540
            if (is_consts) {
286
115
                if (raw_when_column->get_bool(0)) {
287
1.07k
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
288
964
                        then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx]) * column_idx;
289
964
                    }
290
115
                    break;
291
115
                }
292
0
                continue;
293
115
            }
294
295
425
            if (is_column_nullable(*raw_when_column)) {
296
346
                const auto* column_nullable_ptr =
297
346
                        assert_cast<const ColumnNullable*, TypeCheckOnRelease::DISABLE>(
298
346
                                raw_when_column.get());
299
346
                const auto* __restrict cond_raw_data =
300
346
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
301
346
                                column_nullable_ptr->get_nested_column_ptr().get())
302
346
                                ->get_data()
303
346
                                .data();
304
346
                if (!column_nullable_ptr->has_null()) {
305
663k
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
306
662k
                        then_idx_ptr[row_idx] |=
307
662k
                                (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
308
662k
                    }
309
251
                    continue;
310
251
                }
311
95
                const auto* __restrict cond_raw_nullmap =
312
95
                        column_nullable_ptr->get_null_map_column_ptr()->get_data().data();
313
199k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
314
199k
                    then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx] * cond_raw_data[row_idx] *
315
199k
                                              !cond_raw_nullmap[row_idx]) *
316
199k
                                             column_idx;
317
199k
                }
318
95
            } else {
319
79
                const auto* __restrict cond_raw_data =
320
79
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
321
79
                                raw_when_column.get())
322
79
                                ->get_data()
323
79
                                .data();
324
16.7k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
325
16.6k
                    then_idx_ptr[row_idx] |=
326
16.6k
                            (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
327
16.6k
                }
328
79
            }
329
425
        }
330
331
516
        return _execute_update_result<IndexType>(then_idx_ptr, then_columns, rows_count);
332
516
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr13_execute_implItEENS_3COWINS_7IColumnEE13immutable_ptrIS3_EERKSt6vectorIS6_SaIS6_EERS9_m
_ZNK5doris9VCaseExpr13_execute_implIhEENS_3COWINS_7IColumnEE13immutable_ptrIS3_EERKSt6vectorIS6_SaIS6_EERS9_m
Line
Count
Source
278
516
                            std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
279
516
        std::vector<IndexType> then_idx(rows_count, 0);
280
516
        IndexType* __restrict then_idx_ptr = then_idx.data();
281
941
        for (IndexType i = 0; i < when_columns.size(); i++) {
282
540
            IndexType column_idx = i + 1;
283
540
            auto [raw_when_column, is_consts] = unpack_if_const(when_columns[i]);
284
285
540
            if (is_consts) {
286
115
                if (raw_when_column->get_bool(0)) {
287
1.07k
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
288
964
                        then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx]) * column_idx;
289
964
                    }
290
115
                    break;
291
115
                }
292
0
                continue;
293
115
            }
294
295
425
            if (is_column_nullable(*raw_when_column)) {
296
346
                const auto* column_nullable_ptr =
297
346
                        assert_cast<const ColumnNullable*, TypeCheckOnRelease::DISABLE>(
298
346
                                raw_when_column.get());
299
346
                const auto* __restrict cond_raw_data =
300
346
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
301
346
                                column_nullable_ptr->get_nested_column_ptr().get())
302
346
                                ->get_data()
303
346
                                .data();
304
346
                if (!column_nullable_ptr->has_null()) {
305
663k
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
306
662k
                        then_idx_ptr[row_idx] |=
307
662k
                                (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
308
662k
                    }
309
251
                    continue;
310
251
                }
311
95
                const auto* __restrict cond_raw_nullmap =
312
95
                        column_nullable_ptr->get_null_map_column_ptr()->get_data().data();
313
199k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
314
199k
                    then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx] * cond_raw_data[row_idx] *
315
199k
                                              !cond_raw_nullmap[row_idx]) *
316
199k
                                             column_idx;
317
199k
                }
318
95
            } else {
319
79
                const auto* __restrict cond_raw_data =
320
79
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
321
79
                                raw_when_column.get())
322
79
                                ->get_data()
323
79
                                .data();
324
16.7k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
325
16.6k
                    then_idx_ptr[row_idx] |=
326
16.6k
                            (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
327
16.6k
                }
328
79
            }
329
425
        }
330
331
516
        return _execute_update_result<IndexType>(then_idx_ptr, then_columns, rows_count);
332
516
    }
333
334
    bool _has_else_expr;
335
336
    inline static const std::string FUNCTION_NAME = "case";
337
    inline static const std::string EXPR_NAME = "vcase expr";
338
};
339
} // namespace doris