Coverage Report

Created: 2026-10-27 17:35

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
2.31k
                                          size_t rows_count) const {
82
2.31k
        auto result_column_ptr = data_type()->create_column();
83
2.31k
        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
229
                      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
229
            if (data_type()->is_nullable()) {
99
137
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
137
                                                                  then_columns, rows_count);
101
137
            } else {
102
92
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
92
                                                                   then_columns, rows_count);
104
92
            }
105
2.08k
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
81
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
81
                                                              then_columns, rows_count);
109
2.00k
        } else {
110
2.00k
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
2.00k
                                                           then_columns, rows_count);
112
2.00k
        }
113
2.31k
        return result_column_ptr;
114
2.31k
    }
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
1.49k
                                          size_t rows_count) const {
82
1.49k
        auto result_column_ptr = data_type()->create_column();
83
1.49k
        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.49k
        } 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
1.49k
        } else {
110
1.49k
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
1.49k
                                                           then_columns, rows_count);
112
1.49k
        }
113
1.49k
        return result_column_ptr;
114
1.49k
    }
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
28
                                          size_t rows_count) const {
82
28
        auto result_column_ptr = data_type()->create_column();
83
28
        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
28
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
28
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
28
                                                              then_columns, rows_count);
109
28
        } else {
110
0
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
0
                                                           then_columns, rows_count);
112
0
        }
113
28
        return result_column_ptr;
114
28
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE6EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
183
                                          size_t rows_count) const {
82
183
        auto result_column_ptr = data_type()->create_column();
83
183
        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
183
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
39
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
39
                                                              then_columns, rows_count);
109
144
        } else {
110
144
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
144
                                                           then_columns, rows_count);
112
144
        }
113
183
        return result_column_ptr;
114
183
    }
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
29
                                          size_t rows_count) const {
82
29
        auto result_column_ptr = data_type()->create_column();
83
29
        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
29
        } 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
25
        } else {
110
25
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
25
                                                           then_columns, rows_count);
112
25
        }
113
29
        return result_column_ptr;
114
29
    }
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
69
                                          size_t rows_count) const {
82
69
        auto result_column_ptr = data_type()->create_column();
83
69
        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
69
        } 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
68
        } else {
110
68
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
68
                                                           then_columns, rows_count);
112
68
        }
113
69
        return result_column_ptr;
114
69
    }
_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
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE30EEEEENS_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_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
210
                                          size_t rows_count) const {
82
210
        auto result_column_ptr = data_type()->create_column();
83
210
        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
210
                      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
210
            if (data_type()->is_nullable()) {
99
119
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
119
                                                                  then_columns, rows_count);
101
119
            } else {
102
91
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
91
                                                                   then_columns, rows_count);
104
91
            }
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
210
        return result_column_ptr;
114
210
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_15ColumnVarbinaryEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Line
Count
Source
81
2
                                          size_t rows_count) const {
82
2
        auto result_column_ptr = data_type()->create_column();
83
2
        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
2
                      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
2
            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
1
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
1
                                                                   then_columns, rows_count);
104
1
            }
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
2
        return result_column_ptr;
114
2
    }
_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
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_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
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE44EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
9
                                          size_t rows_count) const {
82
9
        auto result_column_ptr = data_type()->create_column();
83
9
        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
9
                      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
9
            if (data_type()->is_nullable()) {
99
9
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
9
                                                                  then_columns, rows_count);
101
9
            } 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
9
        return result_column_ptr;
114
9
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE36EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_11ColumnArrayEEENS_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
    }
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
6
                                          size_t rows_count) const {
82
6
        auto result_column_ptr = data_type()->create_column();
83
6
        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
6
                      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
6
            if (data_type()->is_nullable()) {
99
6
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
6
                                                                  then_columns, rows_count);
101
6
            } 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
6
        return result_column_ptr;
114
6
    }
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
2.02k
                                     size_t rows_count) const {
120
2.02k
#define CASE_TYPE(ptype, coltype) \
121
2.02k
    case PrimitiveType::ptype:    \
122
2.02k
        return _execute_update_result_impl<IndexType, coltype>(then_idx, then_columns, rows_count);
123
124
2.02k
        switch (data_type()->get_primitive_type()) {
125
0
            CASE_TYPE(TYPE_BOOLEAN, ColumnUInt8)
126
1.49k
            CASE_TYPE(TYPE_TINYINT, ColumnInt8)
127
0
            CASE_TYPE(TYPE_SMALLINT, ColumnInt16)
128
28
            CASE_TYPE(TYPE_INT, ColumnInt32)
129
183
            CASE_TYPE(TYPE_BIGINT, ColumnInt64)
130
0
            CASE_TYPE(TYPE_LARGEINT, ColumnInt128)
131
8
            CASE_TYPE(TYPE_FLOAT, ColumnFloat32)
132
11
            CASE_TYPE(TYPE_DOUBLE, ColumnFloat64)
133
0
            CASE_TYPE(TYPE_DECIMAL32, ColumnDecimal32)
134
69
            CASE_TYPE(TYPE_DECIMAL64, ColumnDecimal64)
135
1
            CASE_TYPE(TYPE_DECIMAL256, ColumnDecimal256)
136
1
            CASE_TYPE(TYPE_DECIMAL128I, ColumnDecimal128V3)
137
0
            CASE_TYPE(TYPE_DECIMALV2, ColumnDecimal128V2)
138
0
            CASE_TYPE(TYPE_STRING, ColumnString)
139
0
            CASE_TYPE(TYPE_CHAR, ColumnString)
140
210
            CASE_TYPE(TYPE_VARCHAR, ColumnString)
141
0
            CASE_TYPE(TYPE_JSONB, ColumnString)
142
2
            CASE_TYPE(TYPE_VARBINARY, ColumnVarbinary)
143
0
            CASE_TYPE(TYPE_DATE, ColumnDate)
144
0
            CASE_TYPE(TYPE_DATETIME, ColumnDateTime)
145
0
            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
9
            CASE_TYPE(TYPE_UUID, ColumnUUID)
151
0
            CASE_TYPE(TYPE_IPV4, ColumnIPv4)
152
1
            CASE_TYPE(TYPE_ARRAY, ColumnArray)
153
0
            CASE_TYPE(TYPE_MAP, ColumnMap)
154
0
            CASE_TYPE(TYPE_STRUCT, ColumnStruct)
155
6
            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
2.02k
        }
168
2.02k
#undef CASE_TYPE
169
2.02k
    }
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
2.02k
                                     size_t rows_count) const {
120
2.02k
#define CASE_TYPE(ptype, coltype) \
121
2.02k
    case PrimitiveType::ptype:    \
122
2.02k
        return _execute_update_result_impl<IndexType, coltype>(then_idx, then_columns, rows_count);
123
124
2.02k
        switch (data_type()->get_primitive_type()) {
125
0
            CASE_TYPE(TYPE_BOOLEAN, ColumnUInt8)
126
1.49k
            CASE_TYPE(TYPE_TINYINT, ColumnInt8)
127
0
            CASE_TYPE(TYPE_SMALLINT, ColumnInt16)
128
28
            CASE_TYPE(TYPE_INT, ColumnInt32)
129
183
            CASE_TYPE(TYPE_BIGINT, ColumnInt64)
130
0
            CASE_TYPE(TYPE_LARGEINT, ColumnInt128)
131
8
            CASE_TYPE(TYPE_FLOAT, ColumnFloat32)
132
11
            CASE_TYPE(TYPE_DOUBLE, ColumnFloat64)
133
0
            CASE_TYPE(TYPE_DECIMAL32, ColumnDecimal32)
134
69
            CASE_TYPE(TYPE_DECIMAL64, ColumnDecimal64)
135
1
            CASE_TYPE(TYPE_DECIMAL256, ColumnDecimal256)
136
1
            CASE_TYPE(TYPE_DECIMAL128I, ColumnDecimal128V3)
137
0
            CASE_TYPE(TYPE_DECIMALV2, ColumnDecimal128V2)
138
0
            CASE_TYPE(TYPE_STRING, ColumnString)
139
0
            CASE_TYPE(TYPE_CHAR, ColumnString)
140
210
            CASE_TYPE(TYPE_VARCHAR, ColumnString)
141
0
            CASE_TYPE(TYPE_JSONB, ColumnString)
142
2
            CASE_TYPE(TYPE_VARBINARY, ColumnVarbinary)
143
0
            CASE_TYPE(TYPE_DATE, ColumnDate)
144
0
            CASE_TYPE(TYPE_DATETIME, ColumnDateTime)
145
0
            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
9
            CASE_TYPE(TYPE_UUID, ColumnUUID)
151
0
            CASE_TYPE(TYPE_IPV4, ColumnIPv4)
152
1
            CASE_TYPE(TYPE_ARRAY, ColumnArray)
153
0
            CASE_TYPE(TYPE_MAP, ColumnMap)
154
0
            CASE_TYPE(TYPE_STRUCT, ColumnStruct)
155
6
            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
2.02k
        }
168
2.02k
#undef CASE_TYPE
169
2.02k
    }
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
310
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
310
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
310
        std::vector<uint8_t> is_consts(then_columns.size());
177
310
        std::vector<uint8_t> is_nullable(then_columns.size());
178
1.77k
        for (size_t i = 0; i < then_columns.size(); i++) {
179
1.46k
            if (!then_columns[i]) {
180
58
                continue;
181
58
            }
182
1.40k
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
1.40k
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
1.40k
        }
185
186
310
        auto* raw_result_column = result_column_ptr.get();
187
239k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
238k
            if (!_has_else_expr && !then_idx[row_idx]) {
189
15
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
15
                        ->insert_default();
191
15
                continue;
192
15
            }
193
238k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
238k
            if constexpr (then_null) {
195
125k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
125k
                        result_column_ptr.get());
197
125k
                if (is_nullable[then_idx[row_idx]]) {
198
105k
                    nullable->insert_from_with_type<ColumnType>(
199
105k
                            *raw_then_columns[then_idx[row_idx]], target);
200
105k
                } else {
201
19.8k
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
19.8k
                            nullable->get_nested_column_ptr().get());
203
19.8k
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
19.8k
                    nullable->push_false_to_nullmap(1);
205
19.8k
                }
206
125k
            } else {
207
113k
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
113k
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
113k
            }
210
238k
        }
211
310
    }
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
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
8
        for (size_t i = 0; i < then_columns.size(); i++) {
179
5
            if (!then_columns[i]) {
180
2
                continue;
181
2
            }
182
3
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
3
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
3
        }
185
186
3
        auto* raw_result_column = result_column_ptr.get();
187
7
        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
3
    }
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
28
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
28
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
28
        std::vector<uint8_t> is_consts(then_columns.size());
177
28
        std::vector<uint8_t> is_nullable(then_columns.size());
178
65
        for (size_t i = 0; i < then_columns.size(); i++) {
179
37
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
37
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
37
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
37
        }
185
186
28
        auto* raw_result_column = result_column_ptr.get();
187
68
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
40
            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
40
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
40
            if constexpr (then_null) {
195
40
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
40
                        result_column_ptr.get());
197
40
                if (is_nullable[then_idx[row_idx]]) {
198
40
                    nullable->insert_from_with_type<ColumnType>(
199
40
                            *raw_then_columns[then_idx[row_idx]], target);
200
40
                } 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
40
        }
211
28
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE6EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
39
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
39
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
39
        std::vector<uint8_t> is_consts(then_columns.size());
177
39
        std::vector<uint8_t> is_nullable(then_columns.size());
178
144
        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
39
        auto* raw_result_column = result_column_ptr.get();
187
89.1k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
89.3k
            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
89.0k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
89.0k
            if constexpr (then_null) {
195
89.0k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
89.0k
                        result_column_ptr.get());
197
97.4k
                if (is_nullable[then_idx[row_idx]]) {
198
97.4k
                    nullable->insert_from_with_type<ColumnType>(
199
97.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
89.0k
        }
211
39
    }
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
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
15
        for (size_t i = 0; i < then_columns.size(); i++) {
179
11
            if (!then_columns[i]) {
180
1
                continue;
181
1
            }
182
10
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
10
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
10
        }
185
186
4
        auto* raw_result_column = result_column_ptr.get();
187
17
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
13
            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
12
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
12
            if constexpr (then_null) {
195
12
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
12
                        result_column_ptr.get());
197
12
                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
7
                } 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
12
        }
211
4
    }
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
3
        for (size_t i = 0; i < then_columns.size(); i++) {
179
2
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
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
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_13PrimitiveTypeE30EEELb1EEEvRNS_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
3
        for (size_t i = 0; i < then_columns.size(); i++) {
179
2
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
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
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
    }
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
119
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
119
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
119
        std::vector<uint8_t> is_consts(then_columns.size());
177
119
        std::vector<uint8_t> is_nullable(then_columns.size());
178
1.12k
        for (size_t i = 0; i < then_columns.size(); i++) {
179
1.00k
            if (!then_columns[i]) {
180
21
                continue;
181
21
            }
182
983
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
983
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
983
        }
185
186
119
        auto* raw_result_column = result_column_ptr.get();
187
3.19k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
3.07k
            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
3.06k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
3.06k
            if constexpr (then_null) {
195
3.06k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
3.06k
                        result_column_ptr.get());
197
3.06k
                if (is_nullable[then_idx[row_idx]]) {
198
307
                    nullable->insert_from_with_type<ColumnType>(
199
307
                            *raw_then_columns[then_idx[row_idx]], target);
200
2.75k
                } else {
201
2.75k
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
2.75k
                            nullable->get_nested_column_ptr().get());
203
2.75k
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
2.75k
                    nullable->push_false_to_nullmap(1);
205
2.75k
                }
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.06k
        }
211
119
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnStrIjEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS5_EEPKT_RSt6vectorINS6_13immutable_ptrIS5_EESaISF_EEm
Line
Count
Source
174
91
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
91
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
91
        std::vector<uint8_t> is_consts(then_columns.size());
177
91
        std::vector<uint8_t> is_nullable(then_columns.size());
178
320
        for (size_t i = 0; i < then_columns.size(); i++) {
179
229
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
229
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
229
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
229
        }
185
186
91
        auto* raw_result_column = result_column_ptr.get();
187
113k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
113k
            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
113k
            } else {
207
113k
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
113k
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
113k
            }
210
113k
        }
211
91
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_15ColumnVarbinaryELb1EEEvRNS_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
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
7
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
6
            if (!_has_else_expr && !then_idx[row_idx]) {
189
2
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
2
                        ->insert_default();
191
2
                continue;
192
2
            }
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
3
                    nullable->insert_from_with_type<ColumnType>(
199
3
                            *raw_then_columns[then_idx[row_idx]], target);
200
3
                } 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
4
        }
211
1
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_15ColumnVarbinaryELb0EEEvRNS_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
4
        for (size_t i = 0; i < then_columns.size(); i++) {
179
3
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
3
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
3
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
3
        }
185
186
1
        auto* raw_result_column = result_column_ptr.get();
187
7
        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
            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
6
            } else {
207
6
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
6
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
6
            }
210
6
        }
211
1
    }
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
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE44EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
9
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
9
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
9
        std::vector<uint8_t> is_consts(then_columns.size());
177
9
        std::vector<uint8_t> is_nullable(then_columns.size());
178
43
        for (size_t i = 0; i < then_columns.size(); i++) {
179
34
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
34
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
34
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
34
        }
185
186
9
        auto* raw_result_column = result_column_ptr.get();
187
32.7k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
32.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
32.7k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
32.7k
            if constexpr (then_null) {
195
32.7k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
32.7k
                        result_column_ptr.get());
197
32.7k
                if (is_nullable[then_idx[row_idx]]) {
198
7.38k
                    nullable->insert_from_with_type<ColumnType>(
199
7.38k
                            *raw_then_columns[then_idx[row_idx]], target);
200
25.3k
                } else {
201
25.3k
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
25.3k
                            nullable->get_nested_column_ptr().get());
203
25.3k
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
25.3k
                    nullable->push_false_to_nullmap(1);
205
25.3k
                }
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.7k
        }
211
9
    }
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
_ZNK5doris9VCaseExpr20update_result_normalIhNS_11ColumnArrayELb1EEEvRNS_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
4
        for (size_t i = 0; i < then_columns.size(); i++) {
179
3
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
3
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
3
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
3
        }
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
1
                    nullable->insert_from_with_type<ColumnType>(
199
1
                            *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
3
        }
211
1
    }
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
6
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
6
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
6
        std::vector<uint8_t> is_consts(then_columns.size());
177
6
        std::vector<uint8_t> is_nullable(then_columns.size());
178
14
        for (size_t i = 0; i < then_columns.size(); i++) {
179
8
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
8
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
8
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
8
        }
185
186
6
        auto* raw_result_column = result_column_ptr.get();
187
12
        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
4
                    nullable->insert_from_with_type<ColumnType>(
199
4
                            *raw_then_columns[then_idx[row_idx]], target);
200
4
                } 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
6
        }
211
6
    }
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
2.00k
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
13.3k
        for (auto& then_ptr : then_columns) {
218
13.3k
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
13.3k
        }
220
221
2.00k
        result_column_ptr->resize(rows_count);
222
2.00k
        auto* __restrict result_raw_data =
223
2.00k
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
2.00k
                        ->get_data()
225
2.00k
                        .data();
226
227
        // set default value
228
408k
        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
109k
                result_raw_data[i] = {};
238
109k
            }
239
406k
        }
240
241
15.3k
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
13.3k
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
13.3k
            const auto* __restrict column_raw_data =
246
13.3k
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
13.3k
                            then_columns[i].get())
248
13.3k
                            ->get_data()
249
13.3k
                            .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
6.14k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
3.33k
                    result_raw_data[row_idx] +=
269
3.33k
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
3.33k
                            column_raw_data[row_idx];
271
3.33k
                }
272
2.81k
            }
273
13.3k
        }
274
2.00k
    }
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
1.49k
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
2.42k
        for (auto& then_ptr : then_columns) {
218
2.42k
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
2.42k
        }
220
221
1.49k
        result_column_ptr->resize(rows_count);
222
1.49k
        auto* __restrict result_raw_data =
223
1.49k
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
1.49k
                        ->get_data()
225
1.49k
                        .data();
226
227
        // set default value
228
2.99k
        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
1.49k
            } else {
237
1.49k
                result_raw_data[i] = {};
238
1.49k
            }
239
1.49k
        }
240
241
3.92k
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
2.42k
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
2.42k
            const auto* __restrict column_raw_data =
246
2.42k
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
2.42k
                            then_columns[i].get())
248
2.42k
                            ->get_data()
249
2.42k
                            .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
2.42k
            } else {
267
4.86k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
2.43k
                    result_raw_data[row_idx] +=
269
2.43k
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
2.43k
                            column_raw_data[row_idx];
271
2.43k
                }
272
2.42k
            }
273
2.42k
        }
274
1.49k
    }
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
144
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
221
        for (auto& then_ptr : then_columns) {
218
221
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
221
        }
220
221
144
        result_column_ptr->resize(rows_count);
222
144
        auto* __restrict result_raw_data =
223
144
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
144
                        ->get_data()
225
144
                        .data();
226
227
        // set default value
228
482
        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
338
            } else {
237
338
                result_raw_data[i] = {};
238
338
            }
239
338
        }
240
241
365
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
221
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
221
            const auto* __restrict column_raw_data =
246
221
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
221
                            then_columns[i].get())
248
221
                            ->get_data()
249
221
                            .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
221
            } else {
267
816
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
595
                    result_raw_data[row_idx] +=
269
595
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
595
                            column_raw_data[row_idx];
271
595
                }
272
221
            }
273
221
        }
274
144
    }
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
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
68
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
164
        for (auto& then_ptr : then_columns) {
218
164
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
164
        }
220
221
68
        result_column_ptr->resize(rows_count);
222
68
        auto* __restrict result_raw_data =
223
68
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
68
                        ->get_data()
225
68
                        .data();
226
227
        // set default value
228
184
        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
116
            } else {
237
116
                result_raw_data[i] = {};
238
116
            }
239
116
        }
240
241
232
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
164
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
164
            const auto* __restrict column_raw_data =
246
164
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
164
                            then_columns[i].get())
248
164
                            ->get_data()
249
164
                            .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
164
            } else {
267
468
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
304
                    result_raw_data[row_idx] +=
269
304
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
304
                            column_raw_data[row_idx];
271
304
                }
272
164
            }
273
164
        }
274
68
    }
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
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_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
2.02k
                            std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
279
2.02k
        std::vector<IndexType> then_idx(rows_count, 0);
280
2.02k
        IndexType* __restrict then_idx_ptr = then_idx.data();
281
4.31k
        for (IndexType i = 0; i < when_columns.size(); i++) {
282
2.28k
            IndexType column_idx = i + 1;
283
2.28k
            auto [raw_when_column, is_consts] = unpack_if_const(when_columns[i]);
284
285
2.28k
            if (is_consts) {
286
0
                if (raw_when_column->get_bool(0)) {
287
0
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
288
0
                        then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx]) * column_idx;
289
0
                    }
290
0
                    break;
291
0
                }
292
0
                continue;
293
0
            }
294
295
2.28k
            if (is_column_nullable(*raw_when_column)) {
296
1.81k
                const auto* column_nullable_ptr =
297
1.81k
                        assert_cast<const ColumnNullable*, TypeCheckOnRelease::DISABLE>(
298
1.81k
                                raw_when_column.get());
299
1.81k
                const auto* __restrict cond_raw_data =
300
1.81k
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
301
1.81k
                                column_nullable_ptr->get_nested_column_ptr().get())
302
1.81k
                                ->get_data()
303
1.81k
                                .data();
304
1.81k
                if (!column_nullable_ptr->has_null()) {
305
341k
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
306
339k
                        then_idx_ptr[row_idx] |=
307
339k
                                (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
308
339k
                    }
309
1.68k
                    continue;
310
1.68k
                }
311
125
                const auto* __restrict cond_raw_nullmap =
312
125
                        column_nullable_ptr->get_null_map_column_ptr()->get_data().data();
313
196k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
314
196k
                    then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx] * cond_raw_data[row_idx] *
315
196k
                                              !cond_raw_nullmap[row_idx]) *
316
196k
                                             column_idx;
317
196k
                }
318
475
            } else {
319
475
                const auto* __restrict cond_raw_data =
320
475
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
321
475
                                raw_when_column.get())
322
475
                                ->get_data()
323
475
                                .data();
324
33.9k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
325
33.4k
                    then_idx_ptr[row_idx] |=
326
33.4k
                            (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
327
33.4k
                }
328
475
            }
329
2.28k
        }
330
331
2.02k
        return _execute_update_result<IndexType>(then_idx_ptr, then_columns, rows_count);
332
2.02k
    }
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
2.02k
                            std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
279
2.02k
        std::vector<IndexType> then_idx(rows_count, 0);
280
2.02k
        IndexType* __restrict then_idx_ptr = then_idx.data();
281
4.31k
        for (IndexType i = 0; i < when_columns.size(); i++) {
282
2.28k
            IndexType column_idx = i + 1;
283
2.28k
            auto [raw_when_column, is_consts] = unpack_if_const(when_columns[i]);
284
285
2.28k
            if (is_consts) {
286
0
                if (raw_when_column->get_bool(0)) {
287
0
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
288
0
                        then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx]) * column_idx;
289
0
                    }
290
0
                    break;
291
0
                }
292
0
                continue;
293
0
            }
294
295
2.28k
            if (is_column_nullable(*raw_when_column)) {
296
1.81k
                const auto* column_nullable_ptr =
297
1.81k
                        assert_cast<const ColumnNullable*, TypeCheckOnRelease::DISABLE>(
298
1.81k
                                raw_when_column.get());
299
1.81k
                const auto* __restrict cond_raw_data =
300
1.81k
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
301
1.81k
                                column_nullable_ptr->get_nested_column_ptr().get())
302
1.81k
                                ->get_data()
303
1.81k
                                .data();
304
1.81k
                if (!column_nullable_ptr->has_null()) {
305
341k
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
306
339k
                        then_idx_ptr[row_idx] |=
307
339k
                                (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
308
339k
                    }
309
1.68k
                    continue;
310
1.68k
                }
311
125
                const auto* __restrict cond_raw_nullmap =
312
125
                        column_nullable_ptr->get_null_map_column_ptr()->get_data().data();
313
196k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
314
196k
                    then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx] * cond_raw_data[row_idx] *
315
196k
                                              !cond_raw_nullmap[row_idx]) *
316
196k
                                             column_idx;
317
196k
                }
318
475
            } else {
319
475
                const auto* __restrict cond_raw_data =
320
475
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
321
475
                                raw_when_column.get())
322
475
                                ->get_data()
323
475
                                .data();
324
33.9k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
325
33.4k
                    then_idx_ptr[row_idx] |=
326
33.4k
                            (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
327
33.4k
                }
328
475
            }
329
2.28k
        }
330
331
2.02k
        return _execute_update_result<IndexType>(then_idx_ptr, then_columns, rows_count);
332
2.02k
    }
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