Coverage Report

Created: 2026-10-27 20:18

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exprs/vcase_expr.h
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#pragma once
19
20
#include <string>
21
22
#include "common/exception.h"
23
#include "common/status.h"
24
#include "core/column/column_array.h"
25
#include "core/column/column_complex.h"
26
#include "core/column/column_const.h"
27
#include "core/column/column_decimal.h"
28
#include "core/column/column_map.h"
29
#include "core/column/column_nullable.h"
30
#include "core/column/column_struct.h"
31
#include "core/column/column_varbinary.h"
32
#include "core/column/variant_v2/column_variant_v2.h"
33
#include "core/data_type/data_type_nullable.h"
34
#include "core/data_type/data_type_variant_v2.h"
35
#include "core/data_type/define_primitive_type.h"
36
#include "core/data_type/primitive_type.h"
37
#include "exprs/function/function.h"
38
#include "exprs/function_context.h"
39
#include "exprs/vexpr.h"
40
41
namespace doris {
42
class RowDescriptor;
43
class RuntimeState;
44
class TExprNode;
45
46
class Block;
47
} // namespace doris
48
49
namespace doris {
50
51
class VCaseExpr final : public VExpr {
52
    ENABLE_FACTORY_CREATOR(VCaseExpr);
53
54
public:
55
    VCaseExpr(const TExprNode& node);
56
    ~VCaseExpr() override = default;
57
    Status execute_column_impl(VExprContext* context, const Block* block, const Selector* selector,
58
                               size_t count, ColumnPtr& result_column) const override;
59
    Status prepare(RuntimeState* state, const RowDescriptor& desc, VExprContext* context) override;
60
    Status open(RuntimeState* state, VExprContext* context,
61
                FunctionContext::FunctionStateScope scope) override;
62
    void close(VExprContext* context, FunctionContext::FunctionStateScope scope) override;
63
    const std::string& expr_name() const override;
64
    std::string debug_string() const override;
65
0
    bool has_else_expr() const { return _has_else_expr; }
66
1
    Status clone_node(VExprSPtr* cloned_expr) const override {
67
1
        DORIS_CHECK(cloned_expr != nullptr);
68
1
        auto node = clone_texpr_node();
69
1
        TCaseExpr case_node;
70
1
        case_node.__set_has_case_expr(false);
71
1
        case_node.__set_has_else_expr(_has_else_expr);
72
1
        node.__set_case_expr(case_node);
73
1
        *cloned_expr = VCaseExpr::create_shared(node);
74
1
        return Status::OK();
75
1
    }
76
77
private:
78
    template <typename IndexType, typename ColumnType>
79
    ColumnPtr _execute_update_result_impl(const IndexType* then_idx,
80
                                          std::vector<ColumnPtr>& then_columns,
81
2.24k
                                          size_t rows_count) const {
82
2.24k
        auto result_column_ptr = data_type()->create_column();
83
2.24k
        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
237
                      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
237
            if (data_type()->is_nullable()) {
99
162
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
162
                                                                  then_columns, rows_count);
101
162
            } else {
102
75
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
75
                                                                   then_columns, rows_count);
104
75
            }
105
2.01k
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
71
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
71
                                                              then_columns, rows_count);
109
1.93k
        } else {
110
1.93k
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
1.93k
                                                           then_columns, rows_count);
112
1.93k
        }
113
2.24k
        return result_column_ptr;
114
2.24k
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE2EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE3EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE4EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE5EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE6EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE7EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE8EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE9EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_13ColumnDecimalILNS_13PrimitiveTypeE28EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_13ColumnDecimalILNS_13PrimitiveTypeE30EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_13ColumnDecimalILNS_13PrimitiveTypeE20EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_9ColumnStrIjEEEENS_3COWINS_7IColumnEE13immutable_ptrIS5_EEPKT_RSt6vectorIS8_SaIS8_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_15ColumnVarbinaryEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE11EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE12EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE26EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE43EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE42EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
18
                                          size_t rows_count) const {
82
18
        auto result_column_ptr = data_type()->create_column();
83
18
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
18
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
18
        } else {
110
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
18
                                                           then_columns, rows_count);
112
18
        }
113
18
        return result_column_ptr;
114
18
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE37EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE44EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE36EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_11ColumnArrayEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_9ColumnMapEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnStructEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE19EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE24EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implItNS_15ColumnVariantV2EEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE2EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE3EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
1.49k
                                          size_t rows_count) const {
82
1.49k
        auto result_column_ptr = data_type()->create_column();
83
1.49k
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
1.49k
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
0
                                                              then_columns, rows_count);
109
1.49k
        } else {
110
1.49k
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
1.49k
                                                           then_columns, rows_count);
112
1.49k
        }
113
1.49k
        return result_column_ptr;
114
1.49k
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE4EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE5EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
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
165
                                          size_t rows_count) const {
82
165
        auto result_column_ptr = data_type()->create_column();
83
165
        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
165
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
31
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
31
                                                              then_columns, rows_count);
109
134
        } else {
110
134
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
134
                                                           then_columns, rows_count);
112
134
        }
113
165
        return result_column_ptr;
114
165
    }
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
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
1
                                          size_t rows_count) const {
82
1
        auto result_column_ptr = data_type()->create_column();
83
1
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
            if (data_type()->is_nullable()) {
99
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
                                                                  then_columns, rows_count);
101
            } else {
102
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
                                                                   then_columns, rows_count);
104
            }
105
1
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
1
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
1
                                                              then_columns, rows_count);
109
1
        } else {
110
0
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
0
                                                           then_columns, rows_count);
112
0
        }
113
1
        return result_column_ptr;
114
1
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE30EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE20EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_9ColumnStrIjEEEENS_3COWINS_7IColumnEE13immutable_ptrIS5_EEPKT_RSt6vectorIS8_SaIS8_EEm
Line
Count
Source
81
208
                                          size_t rows_count) const {
82
208
        auto result_column_ptr = data_type()->create_column();
83
208
        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
208
                      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
208
            if (data_type()->is_nullable()) {
99
135
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
135
                                                                  then_columns, rows_count);
101
135
            } else {
102
73
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
73
                                                                   then_columns, rows_count);
104
73
            }
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
208
        return result_column_ptr;
114
208
    }
_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
6
                                          size_t rows_count) const {
82
6
        auto result_column_ptr = data_type()->create_column();
83
6
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
6
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
6
            if (data_type()->is_nullable()) {
99
6
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
6
                                                                  then_columns, rows_count);
101
6
            } else {
102
0
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
0
                                                                   then_columns, rows_count);
104
0
            }
105
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
                                                              then_columns, rows_count);
109
        } else {
110
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
                                                           then_columns, rows_count);
112
        }
113
6
        return result_column_ptr;
114
6
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE36EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_11ColumnArrayEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_9ColumnMapEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnStructEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
81
10
                                          size_t rows_count) const {
82
10
        auto result_column_ptr = data_type()->create_column();
83
10
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
10
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
10
            if (data_type()->is_nullable()) {
99
10
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
10
                                                                  then_columns, rows_count);
101
10
            } else {
102
0
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
0
                                                                   then_columns, rows_count);
104
0
            }
105
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
                                                              then_columns, rows_count);
109
        } else {
110
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
                                                           then_columns, rows_count);
112
        }
113
10
        return result_column_ptr;
114
10
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE19EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE24EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_15ColumnVariantV2EEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Line
Count
Source
81
1
                                          size_t rows_count) const {
82
1
        auto result_column_ptr = data_type()->create_column();
83
1
        result_column_ptr->reserve(rows_count);
84
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
85
                      std::is_same_v<ColumnType, ColumnVarbinary> ||
86
                      std::is_same_v<ColumnType, ColumnBitmap> ||
87
                      std::is_same_v<ColumnType, ColumnArray> ||
88
                      std::is_same_v<ColumnType, ColumnMap> ||
89
                      std::is_same_v<ColumnType, ColumnStruct> ||
90
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
91
                      std::is_same_v<ColumnType, ColumnHLL> ||
92
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
93
                      std::is_same_v<ColumnType, ColumnIPv4> ||
94
                      std::is_same_v<ColumnType, ColumnIPv6> ||
95
1
                      std::is_same_v<ColumnType, ColumnUUID>) {
96
            // result_column and all then_column is not nullable.
97
            // can't simd when type is string.
98
1
            if (data_type()->is_nullable()) {
99
1
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
100
1
                                                                  then_columns, rows_count);
101
1
            } else {
102
0
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
103
0
                                                                   then_columns, rows_count);
104
0
            }
105
        } else if (data_type()->is_nullable()) {
106
            // result_column and all then_column is nullable.
107
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
108
                                                              then_columns, rows_count);
109
        } else {
110
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
111
                                                           then_columns, rows_count);
112
        }
113
1
        return result_column_ptr;
114
1
    }
115
116
    template <typename IndexType>
117
    ColumnPtr _execute_update_result(const IndexType* then_idx,
118
                                     std::vector<ColumnPtr>& then_columns,
119
1.96k
                                     size_t rows_count) const {
120
1.96k
#define CASE_TYPE(ptype, coltype) \
121
1.96k
    case PrimitiveType::ptype:    \
122
1.96k
        return _execute_update_result_impl<IndexType, coltype>(then_idx, then_columns, rows_count);
123
124
1.96k
        switch (data_type()->get_primitive_type()) {
125
0
            CASE_TYPE(TYPE_BOOLEAN, ColumnUInt8)
126
1.49k
            CASE_TYPE(TYPE_TINYINT, ColumnInt8)
127
0
            CASE_TYPE(TYPE_SMALLINT, ColumnInt16)
128
40
            CASE_TYPE(TYPE_INT, ColumnInt32)
129
165
            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
0
            CASE_TYPE(TYPE_DECIMAL64, ColumnDecimal64)
135
1
            CASE_TYPE(TYPE_DECIMAL256, ColumnDecimal256)
136
0
            CASE_TYPE(TYPE_DECIMAL128I, ColumnDecimal128V3)
137
0
            CASE_TYPE(TYPE_DECIMALV2, ColumnDecimal128V2)
138
30
            CASE_TYPE(TYPE_STRING, ColumnString)
139
0
            CASE_TYPE(TYPE_CHAR, ColumnString)
140
178
            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
6
            CASE_TYPE(TYPE_UUID, ColumnUUID)
151
0
            CASE_TYPE(TYPE_IPV4, ColumnIPv4)
152
0
            CASE_TYPE(TYPE_ARRAY, ColumnArray)
153
0
            CASE_TYPE(TYPE_MAP, ColumnMap)
154
0
            CASE_TYPE(TYPE_STRUCT, ColumnStruct)
155
10
            CASE_TYPE(TYPE_BITMAP, ColumnBitmap)
156
0
            CASE_TYPE(TYPE_HLL, ColumnHLL)
157
0
            CASE_TYPE(TYPE_QUANTILE_STATE, ColumnQuantileState)
158
1
        case PrimitiveType::TYPE_VARIANT: {
159
1
            const IDataType* variant_type = remove_nullable(data_type()).get();
160
1
            DORIS_CHECK(dynamic_cast<const DataTypeVariantV2*>(variant_type) != nullptr);
161
1
            return _execute_update_result_impl<IndexType, ColumnVariantV2>(then_idx, then_columns,
162
1
                                                                           rows_count);
163
0
        }
164
0
        default:
165
0
            throw Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, "argument_type {} not supported",
166
0
                            data_type()->get_name());
167
1.96k
        }
168
1.96k
#undef CASE_TYPE
169
1.96k
    }
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
1.96k
                                     size_t rows_count) const {
120
1.96k
#define CASE_TYPE(ptype, coltype) \
121
1.96k
    case PrimitiveType::ptype:    \
122
1.96k
        return _execute_update_result_impl<IndexType, coltype>(then_idx, then_columns, rows_count);
123
124
1.96k
        switch (data_type()->get_primitive_type()) {
125
0
            CASE_TYPE(TYPE_BOOLEAN, ColumnUInt8)
126
1.49k
            CASE_TYPE(TYPE_TINYINT, ColumnInt8)
127
0
            CASE_TYPE(TYPE_SMALLINT, ColumnInt16)
128
40
            CASE_TYPE(TYPE_INT, ColumnInt32)
129
165
            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
0
            CASE_TYPE(TYPE_DECIMAL64, ColumnDecimal64)
135
1
            CASE_TYPE(TYPE_DECIMAL256, ColumnDecimal256)
136
0
            CASE_TYPE(TYPE_DECIMAL128I, ColumnDecimal128V3)
137
0
            CASE_TYPE(TYPE_DECIMALV2, ColumnDecimal128V2)
138
30
            CASE_TYPE(TYPE_STRING, ColumnString)
139
0
            CASE_TYPE(TYPE_CHAR, ColumnString)
140
178
            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
6
            CASE_TYPE(TYPE_UUID, ColumnUUID)
151
0
            CASE_TYPE(TYPE_IPV4, ColumnIPv4)
152
0
            CASE_TYPE(TYPE_ARRAY, ColumnArray)
153
0
            CASE_TYPE(TYPE_MAP, ColumnMap)
154
0
            CASE_TYPE(TYPE_STRUCT, ColumnStruct)
155
10
            CASE_TYPE(TYPE_BITMAP, ColumnBitmap)
156
0
            CASE_TYPE(TYPE_HLL, ColumnHLL)
157
0
            CASE_TYPE(TYPE_QUANTILE_STATE, ColumnQuantileState)
158
1
        case PrimitiveType::TYPE_VARIANT: {
159
1
            const IDataType* variant_type = remove_nullable(data_type()).get();
160
1
            DORIS_CHECK(dynamic_cast<const DataTypeVariantV2*>(variant_type) != nullptr);
161
1
            return _execute_update_result_impl<IndexType, ColumnVariantV2>(then_idx, then_columns,
162
1
                                                                           rows_count);
163
0
        }
164
0
        default:
165
0
            throw Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, "argument_type {} not supported",
166
0
                            data_type()->get_name());
167
1.96k
        }
168
1.96k
#undef CASE_TYPE
169
1.96k
    }
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
308
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
308
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
308
        std::vector<uint8_t> is_consts(then_columns.size());
177
308
        std::vector<uint8_t> is_nullable(then_columns.size());
178
1.72k
        for (size_t i = 0; i < then_columns.size(); i++) {
179
1.41k
            if (!then_columns[i]) {
180
24
                continue;
181
24
            }
182
1.39k
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
1.39k
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
1.39k
        }
185
186
308
        auto* raw_result_column = result_column_ptr.get();
187
257k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
257k
            if (!_has_else_expr && !then_idx[row_idx]) {
189
21
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
21
                        ->insert_default();
191
21
                continue;
192
21
            }
193
257k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
257k
            if constexpr (then_null) {
195
136k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
136k
                        result_column_ptr.get());
197
136k
                if (is_nullable[then_idx[row_idx]]) {
198
116k
                    nullable->insert_from_with_type<ColumnType>(
199
116k
                            *raw_then_columns[then_idx[row_idx]], target);
200
116k
                } else {
201
20.1k
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
20.1k
                            nullable->get_nested_column_ptr().get());
203
20.1k
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
20.1k
                    nullable->push_false_to_nullmap(1);
205
20.1k
                }
206
136k
            } 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
257k
        }
211
308
    }
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
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE3EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
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
82
        for (size_t i = 0; i < then_columns.size(); i++) {
179
48
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
48
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
48
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
48
        }
185
186
34
        auto* raw_result_column = result_column_ptr.get();
187
78
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
44
            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
44
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
44
            if constexpr (then_null) {
195
44
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
44
                        result_column_ptr.get());
197
44
                if (is_nullable[then_idx[row_idx]]) {
198
44
                    nullable->insert_from_with_type<ColumnType>(
199
44
                            *raw_then_columns[then_idx[row_idx]], target);
200
44
                } 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
44
        }
211
34
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE6EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
31
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
31
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
31
        std::vector<uint8_t> is_consts(then_columns.size());
177
31
        std::vector<uint8_t> is_nullable(then_columns.size());
178
94
        for (size_t i = 0; i < then_columns.size(); i++) {
179
63
            if (!then_columns[i]) {
180
13
                continue;
181
13
            }
182
50
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
50
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
50
        }
185
186
31
        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
31
    }
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
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
1
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
1
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
1
        std::vector<uint8_t> is_consts(then_columns.size());
177
1
        std::vector<uint8_t> is_nullable(then_columns.size());
178
5
        for (size_t i = 0; i < then_columns.size(); i++) {
179
4
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
4
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
4
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
4
        }
185
186
1
        auto* raw_result_column = result_column_ptr.get();
187
4
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
3
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
3
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
3
            if constexpr (then_null) {
195
3
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
3
                        result_column_ptr.get());
197
3
                if (is_nullable[then_idx[row_idx]]) {
198
3
                    nullable->insert_from_with_type<ColumnType>(
199
3
                            *raw_then_columns[then_idx[row_idx]], target);
200
3
                } else {
201
0
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
0
                            nullable->get_nested_column_ptr().get());
203
0
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
0
                    nullable->push_false_to_nullmap(1);
205
0
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
3
        }
211
1
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_13ColumnDecimalILNS_13PrimitiveTypeE30EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_13ColumnDecimalILNS_13PrimitiveTypeE20EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnStrIjEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS5_EEPKT_RSt6vectorINS6_13immutable_ptrIS5_EESaISF_EEm
Line
Count
Source
174
135
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
135
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
135
        std::vector<uint8_t> is_consts(then_columns.size());
177
135
        std::vector<uint8_t> is_nullable(then_columns.size());
178
1.16k
        for (size_t i = 0; i < then_columns.size(); i++) {
179
1.03k
            if (!then_columns[i]) {
180
5
                continue;
181
5
            }
182
1.02k
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
1.02k
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
1.02k
        }
185
186
135
        auto* raw_result_column = result_column_ptr.get();
187
4.19k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
4.05k
            if (!_has_else_expr && !then_idx[row_idx]) {
189
8
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
8
                        ->insert_default();
191
8
                continue;
192
8
            }
193
4.04k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
4.04k
            if constexpr (then_null) {
195
4.04k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
4.04k
                        result_column_ptr.get());
197
4.04k
                if (is_nullable[then_idx[row_idx]]) {
198
321
                    nullable->insert_from_with_type<ColumnType>(
199
321
                            *raw_then_columns[then_idx[row_idx]], target);
200
3.72k
                } else {
201
3.72k
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
3.72k
                            nullable->get_nested_column_ptr().get());
203
3.72k
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
3.72k
                    nullable->push_false_to_nullmap(1);
205
3.72k
                }
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.04k
        }
211
135
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnStrIjEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS5_EEPKT_RSt6vectorINS6_13immutable_ptrIS5_EESaISF_EEm
Line
Count
Source
174
73
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
73
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
73
        std::vector<uint8_t> is_consts(then_columns.size());
177
73
        std::vector<uint8_t> is_nullable(then_columns.size());
178
248
        for (size_t i = 0; i < then_columns.size(); i++) {
179
175
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
175
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
175
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
175
        }
185
186
73
        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
73
    }
_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
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
30
        for (size_t i = 0; i < then_columns.size(); i++) {
179
24
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
24
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
24
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
24
        }
185
186
6
        auto* raw_result_column = result_column_ptr.get();
187
32.7k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
32.7k
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
32.7k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
32.7k
            if constexpr (then_null) {
195
32.7k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
32.7k
                        result_column_ptr.get());
197
32.7k
                if (is_nullable[then_idx[row_idx]]) {
198
16.3k
                    nullable->insert_from_with_type<ColumnType>(
199
16.3k
                            *raw_then_columns[then_idx[row_idx]], target);
200
16.3k
                } else {
201
16.3k
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
16.3k
                            nullable->get_nested_column_ptr().get());
203
16.3k
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
16.3k
                    nullable->push_false_to_nullmap(1);
205
16.3k
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
32.7k
        }
211
6
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE44EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE36EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE36EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_11ColumnArrayELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_11ColumnArrayELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnMapELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnMapELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnStructELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnStructELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
174
10
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
10
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
10
        std::vector<uint8_t> is_consts(then_columns.size());
177
10
        std::vector<uint8_t> is_nullable(then_columns.size());
178
28
        for (size_t i = 0; i < then_columns.size(); i++) {
179
18
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
18
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
18
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
18
        }
185
186
10
        auto* raw_result_column = result_column_ptr.get();
187
20
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
10
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
10
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
10
            if constexpr (then_null) {
195
10
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
10
                        result_column_ptr.get());
197
10
                if (is_nullable[then_idx[row_idx]]) {
198
2
                    nullable->insert_from_with_type<ColumnType>(
199
2
                            *raw_then_columns[then_idx[row_idx]], target);
200
8
                } else {
201
8
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
8
                            nullable->get_nested_column_ptr().get());
203
8
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
8
                    nullable->push_false_to_nullmap(1);
205
8
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
10
        }
211
10
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE19EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE19EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE24EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE24EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_15ColumnVariantV2ELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Line
Count
Source
174
1
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
175
1
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
176
1
        std::vector<uint8_t> is_consts(then_columns.size());
177
1
        std::vector<uint8_t> is_nullable(then_columns.size());
178
5
        for (size_t i = 0; i < then_columns.size(); i++) {
179
4
            if (!then_columns[i]) {
180
0
                continue;
181
0
            }
182
4
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
183
4
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
184
4
        }
185
186
1
        auto* raw_result_column = result_column_ptr.get();
187
5
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
188
4
            if (!_has_else_expr && !then_idx[row_idx]) {
189
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
190
0
                        ->insert_default();
191
0
                continue;
192
0
            }
193
4
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
194
4
            if constexpr (then_null) {
195
4
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
196
4
                        result_column_ptr.get());
197
4
                if (is_nullable[then_idx[row_idx]]) {
198
1
                    nullable->insert_from_with_type<ColumnType>(
199
1
                            *raw_then_columns[then_idx[row_idx]], target);
200
3
                } else {
201
3
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
202
3
                            nullable->get_nested_column_ptr().get());
203
3
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
3
                    nullable->push_false_to_nullmap(1);
205
3
                }
206
            } else {
207
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
208
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
209
            }
210
4
        }
211
1
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_15ColumnVariantV2ELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
212
213
    template <typename IndexType, typename ColumnType>
214
    void update_result_auto_simd(MutableColumnPtr& result_column_ptr,
215
                                 const IndexType* __restrict then_idx,
216
1.94k
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
13.0k
        for (auto& then_ptr : then_columns) {
218
13.0k
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
13.0k
        }
220
221
1.94k
        result_column_ptr->resize(rows_count);
222
1.94k
        auto* __restrict result_raw_data =
223
1.94k
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
1.94k
                        ->get_data()
225
1.94k
                        .data();
226
227
        // set default value
228
408k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
297k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
297k
                result_raw_data[i] = ColumnType::default_value();
236
297k
            } else {
237
109k
                result_raw_data[i] = {};
238
109k
            }
239
406k
        }
240
241
15.0k
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
13.0k
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
13.0k
            const auto* __restrict column_raw_data =
246
13.0k
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
13.0k
                            then_columns[i].get())
248
13.0k
                            ->get_data()
249
13.0k
                            .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
5.33k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
2.77k
                    result_raw_data[row_idx] +=
269
2.77k
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
2.77k
                            column_raw_data[row_idx];
271
2.77k
                }
272
2.56k
            }
273
13.0k
        }
274
1.94k
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE2EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE3EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE4EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE5EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE6EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE7EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE8EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
                result_raw_data[i] = ColumnType::default_value();
236
24.7k
            } else {
237
24.7k
                result_raw_data[i] = {};
238
24.7k
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE9EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
                result_raw_data[i] = ColumnType::default_value();
236
24.7k
            } else {
237
24.7k
                result_raw_data[i] = {};
238
24.7k
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_13ColumnDecimalILNS_13PrimitiveTypeE28EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_13ColumnDecimalILNS_13PrimitiveTypeE30EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdItNS_13ColumnDecimalILNS_13PrimitiveTypeE20EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE11EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE12EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE26EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE43EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE42EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
658
        for (auto& then_ptr : then_columns) {
218
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
658
        }
220
221
18
        result_column_ptr->resize(rows_count);
222
18
        auto* __restrict result_raw_data =
223
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
18
                        ->get_data()
225
18
                        .data();
226
227
        // set default value
228
24.7k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
24.7k
                result_raw_data[i] = ColumnType::default_value();
236
            } else {
237
                result_raw_data[i] = {};
238
            }
239
24.7k
        }
240
241
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
658
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
658
            const auto* __restrict column_raw_data =
246
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
658
                            then_columns[i].get())
248
658
                            ->get_data()
249
658
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
2.25M
                    if (then_idx[row_idx] == i) {
263
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
24.7k
                    }
265
2.25M
                }
266
            } else {
267
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
                    result_raw_data[row_idx] +=
269
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
                            column_raw_data[row_idx];
271
                }
272
            }
273
658
        }
274
18
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE2EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE3EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
216
1.49k
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
2.39k
        for (auto& then_ptr : then_columns) {
218
2.39k
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
2.39k
        }
220
221
1.49k
        result_column_ptr->resize(rows_count);
222
1.49k
        auto* __restrict result_raw_data =
223
1.49k
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
1.49k
                        ->get_data()
225
1.49k
                        .data();
226
227
        // set default value
228
3.00k
        for (int i = 0; i < rows_count; i++) {
229
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
230
                          std::is_same_v<ColumnType, ColumnDateTime> ||
231
                          std::is_same_v<ColumnType, ColumnDateV2> ||
232
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
233
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
234
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
235
                result_raw_data[i] = ColumnType::default_value();
236
1.50k
            } else {
237
1.50k
                result_raw_data[i] = {};
238
1.50k
            }
239
1.50k
        }
240
241
3.89k
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
2.39k
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
2.39k
            const auto* __restrict column_raw_data =
246
2.39k
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
2.39k
                            then_columns[i].get())
248
2.39k
                            ->get_data()
249
2.39k
                            .data();
250
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
251
                          std::is_same_v<ColumnType, ColumnFloat64> ||
252
                          std::is_same_v<ColumnType, ColumnDate> ||
253
                          std::is_same_v<ColumnType, ColumnDateTime> ||
254
                          std::is_same_v<ColumnType, ColumnDateV2> ||
255
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
256
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
257
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
258
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
259
                // Conditional stores also let the compiler vectorize without loading from a
260
                // selected source/destination pointer, as a ternary assignment can do.
261
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
262
                    if (then_idx[row_idx] == i) {
263
                        result_raw_data[row_idx] = column_raw_data[row_idx];
264
                    }
265
                }
266
2.39k
            } else {
267
4.78k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
2.39k
                    result_raw_data[row_idx] +=
269
2.39k
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
2.39k
                            column_raw_data[row_idx];
271
2.39k
                }
272
2.39k
            }
273
2.39k
        }
274
1.49k
    }
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
134
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
217
150
        for (auto& then_ptr : then_columns) {
218
150
            then_ptr = then_ptr->convert_to_full_column_if_const();
219
150
        }
220
221
134
        result_column_ptr->resize(rows_count);
222
134
        auto* __restrict result_raw_data =
223
134
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
224
134
                        ->get_data()
225
134
                        .data();
226
227
        // set default value
228
416
        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
282
            } else {
237
282
                result_raw_data[i] = {};
238
282
            }
239
282
        }
240
241
284
        for (IndexType i = 0; i < then_columns.size(); i++) {
242
150
            if (!then_columns[i]) {
243
0
                continue;
244
0
            }
245
150
            const auto* __restrict column_raw_data =
246
150
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
247
150
                            then_columns[i].get())
248
150
                            ->get_data()
249
150
                            .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
150
            } else {
267
472
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
268
322
                    result_raw_data[row_idx] +=
269
322
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
270
322
                            column_raw_data[row_idx];
271
322
                }
272
150
            }
273
150
        }
274
134
    }
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
1.95k
                            std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
279
1.95k
        std::vector<IndexType> then_idx(rows_count, 0);
280
1.95k
        IndexType* __restrict then_idx_ptr = then_idx.data();
281
3.98k
        for (IndexType i = 0; i < when_columns.size(); i++) {
282
2.05k
            IndexType column_idx = i + 1;
283
2.05k
            auto [raw_when_column, is_consts] = unpack_if_const(when_columns[i]);
284
285
2.05k
            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
2.02k
            if (is_column_nullable(*raw_when_column)) {
296
1.59k
                const auto* column_nullable_ptr =
297
1.59k
                        assert_cast<const ColumnNullable*, TypeCheckOnRelease::DISABLE>(
298
1.59k
                                raw_when_column.get());
299
1.59k
                const auto* __restrict cond_raw_data =
300
1.59k
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
301
1.59k
                                column_nullable_ptr->get_nested_column_ptr().get())
302
1.59k
                                ->get_data()
303
1.59k
                                .data();
304
1.59k
                if (!column_nullable_ptr->has_null()) {
305
327k
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
306
326k
                        then_idx_ptr[row_idx] |=
307
326k
                                (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
308
326k
                    }
309
1.54k
                    continue;
310
1.54k
                }
311
53
                const auto* __restrict cond_raw_nullmap =
312
53
                        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
429
            } else {
319
429
                const auto* __restrict cond_raw_data =
320
429
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
321
429
                                raw_when_column.get())
322
429
                                ->get_data()
323
429
                                .data();
324
33.7k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
325
33.3k
                    then_idx_ptr[row_idx] |=
326
33.3k
                            (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
327
33.3k
                }
328
429
            }
329
2.02k
        }
330
331
1.95k
        return _execute_update_result<IndexType>(then_idx_ptr, then_columns, rows_count);
332
1.95k
    }
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
1.95k
                            std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
279
1.95k
        std::vector<IndexType> then_idx(rows_count, 0);
280
1.95k
        IndexType* __restrict then_idx_ptr = then_idx.data();
281
3.98k
        for (IndexType i = 0; i < when_columns.size(); i++) {
282
2.05k
            IndexType column_idx = i + 1;
283
2.05k
            auto [raw_when_column, is_consts] = unpack_if_const(when_columns[i]);
284
285
2.05k
            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
2.02k
            if (is_column_nullable(*raw_when_column)) {
296
1.59k
                const auto* column_nullable_ptr =
297
1.59k
                        assert_cast<const ColumnNullable*, TypeCheckOnRelease::DISABLE>(
298
1.59k
                                raw_when_column.get());
299
1.59k
                const auto* __restrict cond_raw_data =
300
1.59k
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
301
1.59k
                                column_nullable_ptr->get_nested_column_ptr().get())
302
1.59k
                                ->get_data()
303
1.59k
                                .data();
304
1.59k
                if (!column_nullable_ptr->has_null()) {
305
327k
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
306
326k
                        then_idx_ptr[row_idx] |=
307
326k
                                (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
308
326k
                    }
309
1.54k
                    continue;
310
1.54k
                }
311
53
                const auto* __restrict cond_raw_nullmap =
312
53
                        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
429
            } else {
319
429
                const auto* __restrict cond_raw_data =
320
429
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
321
429
                                raw_when_column.get())
322
429
                                ->get_data()
323
429
                                .data();
324
33.7k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
325
33.3k
                    then_idx_ptr[row_idx] |=
326
33.3k
                            (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
327
33.3k
                }
328
429
            }
329
2.02k
        }
330
331
1.95k
        return _execute_update_result<IndexType>(then_idx_ptr, then_columns, rows_count);
332
1.95k
    }
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