Coverage Report

Created: 2026-10-27 06:33

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
863
                                          size_t rows_count) const {
82
863
        auto result_column_ptr = data_type()->create_column();
83
863
        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
257
                      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
257
            if (data_type()->is_nullable()) {
99
187
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
187
                                                                  then_columns, rows_count);
101
187
            } else {
102
70
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
70
                                                                   then_columns, rows_count);
104
70
            }
105
606
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
73
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
73
                                                              then_columns, rows_count);
109
533
        } else {
110
533
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
533
                                                           then_columns, rows_count);
112
533
        }
113
863
        return result_column_ptr;
114
863
    }
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
92
                                          size_t rows_count) const {
82
92
        auto result_column_ptr = data_type()->create_column();
83
92
        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
92
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
6
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
6
                                                              then_columns, rows_count);
109
86
        } else {
110
86
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
86
                                                           then_columns, rows_count);
112
86
        }
113
92
        return result_column_ptr;
114
92
    }
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
40
                                          size_t rows_count) const {
82
40
        auto result_column_ptr = data_type()->create_column();
83
40
        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
40
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
34
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
34
                                                              then_columns, rows_count);
109
34
        } else {
110
6
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
6
                                                           then_columns, rows_count);
112
6
        }
113
40
        return result_column_ptr;
114
40
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE6EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
163
                                          size_t rows_count) const {
82
163
        auto result_column_ptr = data_type()->create_column();
83
163
        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
163
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
24
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
24
                                                              then_columns, rows_count);
109
139
        } else {
110
139
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
139
                                                           then_columns, rows_count);
112
139
        }
113
163
        return result_column_ptr;
114
163
    }
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
1
                                          size_t rows_count) const {
82
1
        auto result_column_ptr = data_type()->create_column();
83
1
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
1
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
1
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
1
                                                              then_columns, rows_count);
109
1
        } else {
110
0
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
0
                                                           then_columns, rows_count);
112
0
        }
113
1
        return result_column_ptr;
114
1
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
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
                      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
2
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
2
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
2
                                                              then_columns, rows_count);
109
2
        } else {
110
0
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
0
                                                           then_columns, rows_count);
112
0
        }
113
2
        return result_column_ptr;
114
2
    }
_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
234
                                          size_t rows_count) const {
82
234
        auto result_column_ptr = data_type()->create_column();
83
234
        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
234
                      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
234
            if (data_type()->is_nullable()) {
99
166
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
166
                                                                  then_columns, rows_count);
101
166
            } else {
102
68
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
68
                                                                   then_columns, rows_count);
104
68
            }
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
234
        return result_column_ptr;
114
234
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_15ColumnVarbinaryEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Line
Count
Source
81
12
                                          size_t rows_count) const {
82
12
        auto result_column_ptr = data_type()->create_column();
83
12
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
12
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
12
            if (data_type()->is_nullable()) {
99
10
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
10
                                                                  then_columns, rows_count);
101
10
            } else {
102
2
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
2
                                                                   then_columns, rows_count);
104
2
            }
105
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
                                                              then_columns, rows_count);
109
        } else {
110
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
                                                           then_columns, rows_count);
112
        }
113
12
        return result_column_ptr;
114
12
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE11EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE12EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
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
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_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
3
                                          size_t rows_count) const {
82
3
        auto result_column_ptr = data_type()->create_column();
83
3
        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
3
                      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
3
            if (data_type()->is_nullable()) {
99
3
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
3
                                                                  then_columns, rows_count);
101
3
            } 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
3
        return result_column_ptr;
114
3
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE36EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_11ColumnArrayEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_9ColumnMapEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnStructEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
7
                                          size_t rows_count) const {
82
7
        auto result_column_ptr = data_type()->create_column();
83
7
        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
7
                      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
7
            if (data_type()->is_nullable()) {
99
7
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
7
                                                                  then_columns, rows_count);
101
7
            } 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
7
        return result_column_ptr;
114
7
    }
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
576
                                     size_t rows_count) const {
120
576
#define CASE_TYPE(ptype, coltype) \
121
576
    case PrimitiveType::ptype:    \
122
574
        return _execute_update_result_impl<IndexType, coltype>(then_idx, then_columns, rows_count);
123
124
576
        switch (data_type()->get_primitive_type()) {
125
0
            CASE_TYPE(TYPE_BOOLEAN, ColumnUInt8)
126
92
            CASE_TYPE(TYPE_TINYINT, ColumnInt8)
127
0
            CASE_TYPE(TYPE_SMALLINT, ColumnInt16)
128
40
            CASE_TYPE(TYPE_INT, ColumnInt32)
129
163
            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
1
            CASE_TYPE(TYPE_DECIMAL64, ColumnDecimal64)
135
2
            CASE_TYPE(TYPE_DECIMAL256, ColumnDecimal256)
136
1
            CASE_TYPE(TYPE_DECIMAL128I, ColumnDecimal128V3)
137
0
            CASE_TYPE(TYPE_DECIMALV2, ColumnDecimal128V2)
138
32
            CASE_TYPE(TYPE_STRING, ColumnString)
139
0
            CASE_TYPE(TYPE_CHAR, ColumnString)
140
202
            CASE_TYPE(TYPE_VARCHAR, ColumnString)
141
0
            CASE_TYPE(TYPE_JSONB, ColumnString)
142
12
            CASE_TYPE(TYPE_VARBINARY, ColumnVarbinary)
143
0
            CASE_TYPE(TYPE_DATE, ColumnDate)
144
0
            CASE_TYPE(TYPE_DATETIME, ColumnDateTime)
145
0
            CASE_TYPE(TYPE_DATEV2, ColumnDateV2)
146
0
            CASE_TYPE(TYPE_DATETIMEV2, ColumnDateTimeV2)
147
0
            CASE_TYPE(TYPE_TIMESTAMP_NS, ColumnTimeStampNs)
148
0
            CASE_TYPE(TYPE_TIMESTAMPTZ, ColumnTimeStampTz)
149
0
            CASE_TYPE(TYPE_IPV6, ColumnIPv6)
150
3
            CASE_TYPE(TYPE_UUID, ColumnUUID)
151
0
            CASE_TYPE(TYPE_IPV4, ColumnIPv4)
152
0
            CASE_TYPE(TYPE_ARRAY, ColumnArray)
153
0
            CASE_TYPE(TYPE_MAP, ColumnMap)
154
0
            CASE_TYPE(TYPE_STRUCT, ColumnStruct)
155
7
            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
576
        }
168
576
#undef CASE_TYPE
169
576
    }
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
576
                                     size_t rows_count) const {
120
576
#define CASE_TYPE(ptype, coltype) \
121
576
    case PrimitiveType::ptype:    \
122
576
        return _execute_update_result_impl<IndexType, coltype>(then_idx, then_columns, rows_count);
123
124
576
        switch (data_type()->get_primitive_type()) {
125
0
            CASE_TYPE(TYPE_BOOLEAN, ColumnUInt8)
126
92
            CASE_TYPE(TYPE_TINYINT, ColumnInt8)
127
0
            CASE_TYPE(TYPE_SMALLINT, ColumnInt16)
128
40
            CASE_TYPE(TYPE_INT, ColumnInt32)
129
163
            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
1
            CASE_TYPE(TYPE_DECIMAL64, ColumnDecimal64)
135
2
            CASE_TYPE(TYPE_DECIMAL256, ColumnDecimal256)
136
1
            CASE_TYPE(TYPE_DECIMAL128I, ColumnDecimal128V3)
137
0
            CASE_TYPE(TYPE_DECIMALV2, ColumnDecimal128V2)
138
32
            CASE_TYPE(TYPE_STRING, ColumnString)
139
0
            CASE_TYPE(TYPE_CHAR, ColumnString)
140
202
            CASE_TYPE(TYPE_VARCHAR, ColumnString)
141
0
            CASE_TYPE(TYPE_JSONB, ColumnString)
142
12
            CASE_TYPE(TYPE_VARBINARY, ColumnVarbinary)
143
0
            CASE_TYPE(TYPE_DATE, ColumnDate)
144
0
            CASE_TYPE(TYPE_DATETIME, ColumnDateTime)
145
0
            CASE_TYPE(TYPE_DATEV2, ColumnDateV2)
146
0
            CASE_TYPE(TYPE_DATETIMEV2, ColumnDateTimeV2)
147
0
            CASE_TYPE(TYPE_TIMESTAMP_NS, ColumnTimeStampNs)
148
0
            CASE_TYPE(TYPE_TIMESTAMPTZ, ColumnTimeStampTz)
149
0
            CASE_TYPE(TYPE_IPV6, ColumnIPv6)
150
3
            CASE_TYPE(TYPE_UUID, ColumnUUID)
151
0
            CASE_TYPE(TYPE_IPV4, ColumnIPv4)
152
0
            CASE_TYPE(TYPE_ARRAY, ColumnArray)
153
0
            CASE_TYPE(TYPE_MAP, ColumnMap)
154
0
            CASE_TYPE(TYPE_STRUCT, ColumnStruct)
155
7
            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
576
        }
168
576
#undef CASE_TYPE
169
576
    }
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
331
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
331
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
331
        std::vector<uint8_t> is_consts(then_columns.size());
177
331
        std::vector<uint8_t> is_nullable(then_columns.size());
178
1.80k
        for (size_t i = 0; i < then_columns.size(); i++) {
179
1.47k
            if (!then_columns[i]) {
180
63
                continue;
181
63
            }
182
1.41k
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
1.41k
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
1.41k
        }
185
186
331
        auto* raw_result_column = result_column_ptr.get();
187
241k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
240k
            if (!_has_else_expr && !then_idx[row_idx]) {
189
27
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
27
                        ->insert_default();
191
27
                continue;
192
27
            }
193
240k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
240k
            if constexpr (then_null) {
195
120k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
120k
                        result_column_ptr.get());
197
120k
                if (is_nullable[then_idx[row_idx]]) {
198
112k
                    nullable->insert_from_with_type<ColumnType>(
199
112k
                            *raw_then_columns[then_idx[row_idx]], target);
200
112k
                } else {
201
7.91k
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
7.91k
                            nullable->get_nested_column_ptr().get());
203
7.91k
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
7.91k
                    nullable->push_false_to_nullmap(1);
205
7.91k
                }
206
120k
            } else {
207
120k
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
120k
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
120k
            }
210
240k
        }
211
331
    }
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
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
18
        for (size_t i = 0; i < then_columns.size(); i++) {
179
12
            if (!then_columns[i]) {
180
5
                continue;
181
5
            }
182
7
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
7
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
7
        }
185
186
6
        auto* raw_result_column = result_column_ptr.get();
187
15
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
9
            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
9
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
9
            if constexpr (then_null) {
195
9
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
9
                        result_column_ptr.get());
197
9
                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
8
                } else {
201
8
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
8
                            nullable->get_nested_column_ptr().get());
203
8
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
8
                    nullable->push_false_to_nullmap(1);
205
8
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
9
        }
211
6
    }
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
34
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
34
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
34
        std::vector<uint8_t> is_consts(then_columns.size());
177
34
        std::vector<uint8_t> is_nullable(then_columns.size());
178
81
        for (size_t i = 0; i < then_columns.size(); i++) {
179
47
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
47
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
47
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
47
        }
185
186
34
        auto* raw_result_column = result_column_ptr.get();
187
80
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
46
            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
46
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
46
            if constexpr (then_null) {
195
46
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
46
                        result_column_ptr.get());
197
46
                if (is_nullable[then_idx[row_idx]]) {
198
46
                    nullable->insert_from_with_type<ColumnType>(
199
46
                            *raw_then_columns[then_idx[row_idx]], target);
200
46
                } 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
46
        }
211
34
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE6EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
24
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
24
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
24
        std::vector<uint8_t> is_consts(then_columns.size());
177
24
        std::vector<uint8_t> is_nullable(then_columns.size());
178
78
        for (size_t i = 0; i < then_columns.size(); i++) {
179
54
            if (!then_columns[i]) {
180
13
                continue;
181
13
            }
182
41
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
41
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
41
        }
185
186
24
        auto* raw_result_column = result_column_ptr.get();
187
100k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
100k
            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
100k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
100k
            if constexpr (then_null) {
195
100k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
100k
                        result_column_ptr.get());
197
100k
                if (is_nullable[then_idx[row_idx]]) {
198
100k
                    nullable->insert_from_with_type<ColumnType>(
199
100k
                            *raw_then_columns[then_idx[row_idx]], target);
200
100k
                } 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
100k
        }
211
24
    }
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
2
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
2
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
2
        std::vector<uint8_t> is_consts(then_columns.size());
177
2
        std::vector<uint8_t> is_nullable(then_columns.size());
178
8
        for (size_t i = 0; i < then_columns.size(); i++) {
179
6
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
6
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
6
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
6
        }
185
186
2
        auto* raw_result_column = result_column_ptr.get();
187
6
        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
4
                    nullable->insert_from_with_type<ColumnType>(
199
4
                            *raw_then_columns[then_idx[row_idx]], target);
200
4
                } 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
4
        }
211
2
    }
_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
166
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
166
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
166
        std::vector<uint8_t> is_consts(then_columns.size());
177
166
        std::vector<uint8_t> is_nullable(then_columns.size());
178
1.26k
        for (size_t i = 0; i < then_columns.size(); i++) {
179
1.10k
            if (!then_columns[i]) {
180
39
                continue;
181
39
            }
182
1.06k
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
1.06k
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
1.06k
        }
185
186
166
        auto* raw_result_column = result_column_ptr.get();
187
4.25k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
4.09k
            if (!_has_else_expr && !then_idx[row_idx]) {
189
14
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
14
                        ->insert_default();
191
14
                continue;
192
14
            }
193
4.07k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
4.07k
            if constexpr (then_null) {
195
4.07k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
4.07k
                        result_column_ptr.get());
197
4.07k
                if (is_nullable[then_idx[row_idx]]) {
198
311
                    nullable->insert_from_with_type<ColumnType>(
199
311
                            *raw_then_columns[then_idx[row_idx]], target);
200
3.76k
                } else {
201
3.76k
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
3.76k
                            nullable->get_nested_column_ptr().get());
203
3.76k
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
3.76k
                    nullable->push_false_to_nullmap(1);
205
3.76k
                }
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.07k
        }
211
166
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnStrIjEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS5_EEPKT_RSt6vectorINS6_13immutable_ptrIS5_EESaISF_EEm
Line
Count
Source
174
69
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
69
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
69
        std::vector<uint8_t> is_consts(then_columns.size());
177
69
        std::vector<uint8_t> is_nullable(then_columns.size());
178
246
        for (size_t i = 0; i < then_columns.size(); i++) {
179
177
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
177
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
177
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
177
        }
185
186
69
        auto* raw_result_column = result_column_ptr.get();
187
120k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
120k
            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
120k
            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
120k
            } else {
207
120k
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
120k
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
120k
            }
210
120k
        }
211
69
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_15ColumnVarbinaryELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Line
Count
Source
174
10
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
10
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
10
        std::vector<uint8_t> is_consts(then_columns.size());
177
10
        std::vector<uint8_t> is_nullable(then_columns.size());
178
40
        for (size_t i = 0; i < then_columns.size(); i++) {
179
30
            if (!then_columns[i]) {
180
4
                continue;
181
4
            }
182
26
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
26
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
26
        }
185
186
10
        auto* raw_result_column = result_column_ptr.get();
187
88
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
78
            if (!_has_else_expr && !then_idx[row_idx]) {
189
11
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
11
                        ->insert_default();
191
11
                continue;
192
11
            }
193
67
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
67
            if constexpr (then_null) {
195
67
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
67
                        result_column_ptr.get());
197
67
                if (is_nullable[then_idx[row_idx]]) {
198
36
                    nullable->insert_from_with_type<ColumnType>(
199
36
                            *raw_then_columns[then_idx[row_idx]], target);
200
36
                } else {
201
31
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
31
                            nullable->get_nested_column_ptr().get());
203
31
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
31
                    nullable->push_false_to_nullmap(1);
205
31
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
67
        }
211
10
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_15ColumnVarbinaryELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Line
Count
Source
174
2
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
2
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
2
        std::vector<uint8_t> is_consts(then_columns.size());
177
2
        std::vector<uint8_t> is_nullable(then_columns.size());
178
7
        for (size_t i = 0; i < then_columns.size(); i++) {
179
5
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
5
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
5
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
5
        }
185
186
2
        auto* raw_result_column = result_column_ptr.get();
187
9
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
7
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
7
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
            if constexpr (then_null) {
195
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
                        result_column_ptr.get());
197
                if (is_nullable[then_idx[row_idx]]) {
198
                    nullable->insert_from_with_type<ColumnType>(
199
                            *raw_then_columns[then_idx[row_idx]], target);
200
                } else {
201
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
                            nullable->get_nested_column_ptr().get());
203
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
                    nullable->push_false_to_nullmap(1);
205
                }
206
7
            } else {
207
7
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
7
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
7
            }
210
7
        }
211
2
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE11EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE12EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE25EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE26EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE43EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
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
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
15
        for (size_t i = 0; i < then_columns.size(); i++) {
179
12
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
12
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
12
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
12
        }
185
186
3
        auto* raw_result_column = result_column_ptr.get();
187
16.3k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
16.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
16.3k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
16.3k
            if constexpr (then_null) {
195
16.3k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
16.3k
                        result_column_ptr.get());
197
16.3k
                if (is_nullable[then_idx[row_idx]]) {
198
12.2k
                    nullable->insert_from_with_type<ColumnType>(
199
12.2k
                            *raw_then_columns[then_idx[row_idx]], target);
200
12.2k
                } else {
201
4.09k
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
4.09k
                            nullable->get_nested_column_ptr().get());
203
4.09k
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
4.09k
                    nullable->push_false_to_nullmap(1);
205
4.09k
                }
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
16.3k
        }
211
3
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE44EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE36EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE36EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_11ColumnArrayELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_11ColumnArrayELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnMapELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnMapELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnStructELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnStructELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
7
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
7
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
7
        std::vector<uint8_t> is_consts(then_columns.size());
177
7
        std::vector<uint8_t> is_nullable(then_columns.size());
178
18
        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
7
        auto* raw_result_column = result_column_ptr.get();
187
15
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
8
            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
8
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
8
            if constexpr (then_null) {
195
8
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
8
                        result_column_ptr.get());
197
8
                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
4
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
4
                            nullable->get_nested_column_ptr().get());
203
4
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
4
                    nullable->push_false_to_nullmap(1);
205
4
                }
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
8
        }
211
7
    }
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
533
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
10.8k
        for (auto& then_ptr : then_columns) {
218
10.8k
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
10.8k
        }
220
221
533
        result_column_ptr->resize(rows_count);
222
533
        auto* __restrict result_raw_data =
223
533
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
533
                        ->get_data()
225
533
                        .data();
226
227
        // set default value
228
405k
        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
107k
                result_raw_data[i] = {};
238
107k
            }
239
404k
        }
240
241
11.4k
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
10.8k
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
10.8k
            const auto* __restrict column_raw_data =
246
10.8k
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
10.8k
                            then_columns[i].get())
248
10.8k
                            ->get_data()
249
10.8k
                            .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
914
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
559
                    result_raw_data[row_idx] +=
269
559
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
559
                            column_raw_data[row_idx];
271
559
                }
272
355
            }
273
10.8k
        }
274
533
    }
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
86
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
182
        for (auto& then_ptr : then_columns) {
218
182
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
182
        }
220
221
86
        result_column_ptr->resize(rows_count);
222
86
        auto* __restrict result_raw_data =
223
86
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
86
                        ->get_data()
225
86
                        .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
98
            } else {
237
98
                result_raw_data[i] = {};
238
98
            }
239
98
        }
240
241
268
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
182
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
182
            const auto* __restrict column_raw_data =
246
182
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
182
                            then_columns[i].get())
248
182
                            ->get_data()
249
182
                            .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
182
            } else {
267
401
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
219
                    result_raw_data[row_idx] +=
269
219
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
219
                            column_raw_data[row_idx];
271
219
                }
272
182
            }
273
182
        }
274
86
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE4EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE5EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
6
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
18
        for (auto& then_ptr : then_columns) {
218
18
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
18
        }
220
221
6
        result_column_ptr->resize(rows_count);
222
6
        auto* __restrict result_raw_data =
223
6
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
6
                        ->get_data()
225
6
                        .data();
226
227
        // set default value
228
24
        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
18
            } else {
237
18
                result_raw_data[i] = {};
238
18
            }
239
18
        }
240
241
24
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
18
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
18
            const auto* __restrict column_raw_data =
246
18
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
18
                            then_columns[i].get())
248
18
                            ->get_data()
249
18
                            .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
18
            } else {
267
72
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
54
                    result_raw_data[row_idx] +=
269
54
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
54
                            column_raw_data[row_idx];
271
54
                }
272
18
            }
273
18
        }
274
6
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE6EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
139
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
155
        for (auto& then_ptr : then_columns) {
218
155
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
155
        }
220
221
139
        result_column_ptr->resize(rows_count);
222
139
        auto* __restrict result_raw_data =
223
139
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
139
                        ->get_data()
225
139
                        .data();
226
227
        // set default value
228
407
        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
268
            } else {
237
268
                result_raw_data[i] = {};
238
268
            }
239
268
        }
240
241
294
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
155
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
155
            const auto* __restrict column_raw_data =
246
155
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
155
                            then_columns[i].get())
248
155
                            ->get_data()
249
155
                            .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
155
            } else {
267
441
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
286
                    result_raw_data[row_idx] +=
269
286
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
286
                            column_raw_data[row_idx];
271
286
                }
272
155
            }
273
155
        }
274
139
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE7EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE8EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
25
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
675
        for (auto& then_ptr : then_columns) {
218
675
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
675
        }
220
221
25
        result_column_ptr->resize(rows_count);
222
25
        auto* __restrict result_raw_data =
223
25
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
25
                        ->get_data()
225
25
                        .data();
226
227
        // set default value
228
28.9k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
                result_raw_data[i] = ColumnType::default_value();
236
28.8k
            } else {
237
28.8k
                result_raw_data[i] = {};
238
28.8k
            }
239
28.8k
        }
240
241
700
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
675
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
675
            const auto* __restrict column_raw_data =
246
675
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
675
                            then_columns[i].get())
248
675
                            ->get_data()
249
675
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
675
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
28.8k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
28.8k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
675
        }
274
25
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE9EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
25
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
675
        for (auto& then_ptr : then_columns) {
218
675
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
675
        }
220
221
25
        result_column_ptr->resize(rows_count);
222
25
        auto* __restrict result_raw_data =
223
25
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
25
                        ->get_data()
225
25
                        .data();
226
227
        // set default value
228
28.9k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
                result_raw_data[i] = ColumnType::default_value();
236
28.8k
            } else {
237
28.8k
                result_raw_data[i] = {};
238
28.8k
            }
239
28.8k
        }
240
241
700
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
675
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
675
            const auto* __restrict column_raw_data =
246
675
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
675
                            then_columns[i].get())
248
675
                            ->get_data()
249
675
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
675
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
28.8k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
28.8k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
675
        }
274
25
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_13ColumnDecimalILNS_13PrimitiveTypeE28EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_13ColumnDecimalILNS_13PrimitiveTypeE30EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_13ColumnDecimalILNS_13PrimitiveTypeE20EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE11EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
654
        for (auto& then_ptr : then_columns) {
218
654
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
654
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
672
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
654
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
654
            const auto* __restrict column_raw_data =
246
654
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
654
                            then_columns[i].get())
248
654
                            ->get_data()
249
654
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
654
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.23M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.23M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
654
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE12EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
654
        for (auto& then_ptr : then_columns) {
218
654
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
654
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
672
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
654
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
654
            const auto* __restrict column_raw_data =
246
654
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
654
                            then_columns[i].get())
248
654
                            ->get_data()
249
654
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
654
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.23M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.23M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
654
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
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
574
                            std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
279
574
        std::vector<IndexType> then_idx(rows_count, 0);
280
574
        IndexType* __restrict then_idx_ptr = then_idx.data();
281
1.83k
        for (IndexType i = 0; i < when_columns.size(); i++) {
282
1.29k
            IndexType column_idx = i + 1;
283
1.29k
            auto [raw_when_column, is_consts] = unpack_if_const(when_columns[i]);
284
285
1.29k
            if (is_consts) {
286
31
                if (raw_when_column->get_bool(0)) {
287
995
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
288
964
                        then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx]) * column_idx;
289
964
                    }
290
31
                    break;
291
31
                }
292
0
                continue;
293
31
            }
294
295
1.25k
            if (is_column_nullable(*raw_when_column)) {
296
1.14k
                const auto* column_nullable_ptr =
297
1.14k
                        assert_cast<const ColumnNullable*, TypeCheckOnRelease::DISABLE>(
298
1.14k
                                raw_when_column.get());
299
1.14k
                const auto* __restrict cond_raw_data =
300
1.14k
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
301
1.14k
                                column_nullable_ptr->get_nested_column_ptr().get())
302
1.14k
                                ->get_data()
303
1.14k
                                .data();
304
1.14k
                if (!column_nullable_ptr->has_null()) {
305
277k
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
306
276k
                        then_idx_ptr[row_idx] |=
307
276k
                                (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
308
276k
                    }
309
1.08k
                    continue;
310
1.08k
                }
311
57
                const auto* __restrict cond_raw_nullmap =
312
57
                        column_nullable_ptr->get_null_map_column_ptr()->get_data().data();
313
200k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
314
200k
                    then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx] * cond_raw_data[row_idx] *
315
200k
                                              !cond_raw_nullmap[row_idx]) *
316
200k
                                             column_idx;
317
200k
                }
318
117
            } else {
319
117
                const auto* __restrict cond_raw_data =
320
117
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
321
117
                                raw_when_column.get())
322
117
                                ->get_data()
323
117
                                .data();
324
33.0k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
325
32.9k
                    then_idx_ptr[row_idx] |=
326
32.9k
                            (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
327
32.9k
                }
328
117
            }
329
1.25k
        }
330
331
574
        return _execute_update_result<IndexType>(then_idx_ptr, then_columns, rows_count);
332
574
    }
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
574
                            std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
279
574
        std::vector<IndexType> then_idx(rows_count, 0);
280
574
        IndexType* __restrict then_idx_ptr = then_idx.data();
281
1.83k
        for (IndexType i = 0; i < when_columns.size(); i++) {
282
1.29k
            IndexType column_idx = i + 1;
283
1.29k
            auto [raw_when_column, is_consts] = unpack_if_const(when_columns[i]);
284
285
1.29k
            if (is_consts) {
286
31
                if (raw_when_column->get_bool(0)) {
287
995
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
288
964
                        then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx]) * column_idx;
289
964
                    }
290
31
                    break;
291
31
                }
292
0
                continue;
293
31
            }
294
295
1.25k
            if (is_column_nullable(*raw_when_column)) {
296
1.14k
                const auto* column_nullable_ptr =
297
1.14k
                        assert_cast<const ColumnNullable*, TypeCheckOnRelease::DISABLE>(
298
1.14k
                                raw_when_column.get());
299
1.14k
                const auto* __restrict cond_raw_data =
300
1.14k
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
301
1.14k
                                column_nullable_ptr->get_nested_column_ptr().get())
302
1.14k
                                ->get_data()
303
1.14k
                                .data();
304
1.14k
                if (!column_nullable_ptr->has_null()) {
305
277k
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
306
276k
                        then_idx_ptr[row_idx] |=
307
276k
                                (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
308
276k
                    }
309
1.08k
                    continue;
310
1.08k
                }
311
57
                const auto* __restrict cond_raw_nullmap =
312
57
                        column_nullable_ptr->get_null_map_column_ptr()->get_data().data();
313
200k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
314
200k
                    then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx] * cond_raw_data[row_idx] *
315
200k
                                              !cond_raw_nullmap[row_idx]) *
316
200k
                                             column_idx;
317
200k
                }
318
117
            } else {
319
117
                const auto* __restrict cond_raw_data =
320
117
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
321
117
                                raw_when_column.get())
322
117
                                ->get_data()
323
117
                                .data();
324
33.0k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
325
32.9k
                    then_idx_ptr[row_idx] |=
326
32.9k
                            (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
327
32.9k
                }
328
117
            }
329
1.25k
        }
330
331
574
        return _execute_update_result<IndexType>(then_idx_ptr, then_columns, rows_count);
332
574
    }
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