Coverage Report

Created: 2026-09-16 17:45

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/variant_v2/column_variant_v2.h"
32
#include "core/data_type/data_type_nullable.h"
33
#include "core/data_type/data_type_variant_v2.h"
34
#include "core/data_type/define_primitive_type.h"
35
#include "core/data_type/primitive_type.h"
36
#include "exprs/function/function.h"
37
#include "exprs/function_context.h"
38
#include "exprs/vexpr.h"
39
40
namespace doris {
41
class RowDescriptor;
42
class RuntimeState;
43
class TExprNode;
44
45
class Block;
46
} // namespace doris
47
48
namespace doris {
49
50
class VCaseExpr final : public VExpr {
51
    ENABLE_FACTORY_CREATOR(VCaseExpr);
52
53
public:
54
    VCaseExpr(const TExprNode& node);
55
    ~VCaseExpr() override = default;
56
    Status execute_column_impl(VExprContext* context, const Block* block, const Selector* selector,
57
                               size_t count, ColumnPtr& result_column) const override;
58
    Status prepare(RuntimeState* state, const RowDescriptor& desc, VExprContext* context) override;
59
    Status open(RuntimeState* state, VExprContext* context,
60
                FunctionContext::FunctionStateScope scope) override;
61
    void close(VExprContext* context, FunctionContext::FunctionStateScope scope) override;
62
    const std::string& expr_name() const override;
63
    std::string debug_string() const override;
64
0
    bool has_else_expr() const { return _has_else_expr; }
65
1
    Status clone_node(VExprSPtr* cloned_expr) const override {
66
1
        DORIS_CHECK(cloned_expr != nullptr);
67
1
        auto node = clone_texpr_node();
68
1
        TCaseExpr case_node;
69
1
        case_node.__set_has_case_expr(false);
70
1
        case_node.__set_has_else_expr(_has_else_expr);
71
1
        node.__set_case_expr(case_node);
72
1
        *cloned_expr = VCaseExpr::create_shared(node);
73
1
        return Status::OK();
74
1
    }
75
76
private:
77
    template <typename IndexType, typename ColumnType>
78
    ColumnPtr _execute_update_result_impl(const IndexType* then_idx,
79
                                          std::vector<ColumnPtr>& then_columns,
80
604
                                          size_t rows_count) const {
81
604
        auto result_column_ptr = data_type()->create_column();
82
604
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
135
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
135
            if (data_type()->is_nullable()) {
96
70
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
70
                                                                  then_columns, rows_count);
98
70
            } else {
99
65
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
65
                                                                   then_columns, rows_count);
101
65
            }
102
469
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
59
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
59
                                                              then_columns, rows_count);
106
410
        } else {
107
410
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
410
                                                           then_columns, rows_count);
109
410
        }
110
604
        return result_column_ptr;
111
604
    }
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
80
18
                                          size_t rows_count) const {
81
18
        auto result_column_ptr = data_type()->create_column();
82
18
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
18
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
0
                                                              then_columns, rows_count);
106
18
        } else {
107
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
18
                                                           then_columns, rows_count);
109
18
        }
110
18
        return result_column_ptr;
111
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE9EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
18
                                          size_t rows_count) const {
81
18
        auto result_column_ptr = data_type()->create_column();
82
18
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
18
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
0
                                                              then_columns, rows_count);
106
18
        } else {
107
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
18
                                                           then_columns, rows_count);
109
18
        }
110
18
        return result_column_ptr;
111
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
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE11EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
18
                                          size_t rows_count) const {
81
18
        auto result_column_ptr = data_type()->create_column();
82
18
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
18
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
0
                                                              then_columns, rows_count);
106
18
        } else {
107
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
18
                                                           then_columns, rows_count);
109
18
        }
110
18
        return result_column_ptr;
111
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE12EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
18
                                          size_t rows_count) const {
81
18
        auto result_column_ptr = data_type()->create_column();
82
18
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
18
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
0
                                                              then_columns, rows_count);
106
18
        } else {
107
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
18
                                                           then_columns, rows_count);
109
18
        }
110
18
        return result_column_ptr;
111
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
18
                                          size_t rows_count) const {
81
18
        auto result_column_ptr = data_type()->create_column();
82
18
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
18
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
0
                                                              then_columns, rows_count);
106
18
        } else {
107
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
18
                                                           then_columns, rows_count);
109
18
        }
110
18
        return result_column_ptr;
111
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE26EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
18
                                          size_t rows_count) const {
81
18
        auto result_column_ptr = data_type()->create_column();
82
18
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
18
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
0
                                                              then_columns, rows_count);
106
18
        } else {
107
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
18
                                                           then_columns, rows_count);
109
18
        }
110
18
        return result_column_ptr;
111
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE43EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
18
                                          size_t rows_count) const {
81
18
        auto result_column_ptr = data_type()->create_column();
82
18
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
18
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
0
                                                              then_columns, rows_count);
106
18
        } else {
107
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
18
                                                           then_columns, rows_count);
109
18
        }
110
18
        return result_column_ptr;
111
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implItNS_12ColumnVectorILNS_13PrimitiveTypeE42EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
18
                                          size_t rows_count) const {
81
18
        auto result_column_ptr = data_type()->create_column();
82
18
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
18
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
0
                                                              then_columns, rows_count);
106
18
        } else {
107
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
18
                                                           then_columns, rows_count);
109
18
        }
110
18
        return result_column_ptr;
111
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_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
80
14
                                          size_t rows_count) const {
81
14
        auto result_column_ptr = data_type()->create_column();
82
14
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
14
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
4
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
4
                                                              then_columns, rows_count);
106
10
        } else {
107
10
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
10
                                                           then_columns, rows_count);
109
10
        }
110
14
        return result_column_ptr;
111
14
    }
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
80
39
                                          size_t rows_count) const {
81
39
        auto result_column_ptr = data_type()->create_column();
82
39
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
39
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
39
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
39
                                                              then_columns, rows_count);
106
39
        } else {
107
0
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
0
                                                           then_columns, rows_count);
109
0
        }
110
39
        return result_column_ptr;
111
39
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE6EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
102
                                          size_t rows_count) const {
81
102
        auto result_column_ptr = data_type()->create_column();
82
102
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
102
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
6
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
6
                                                              then_columns, rows_count);
106
96
        } else {
107
96
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
96
                                                           then_columns, rows_count);
109
96
        }
110
102
        return result_column_ptr;
111
102
    }
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
80
26
                                          size_t rows_count) const {
81
26
        auto result_column_ptr = data_type()->create_column();
82
26
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
26
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
1
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
1
                                                              then_columns, rows_count);
106
25
        } else {
107
25
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
25
                                                           then_columns, rows_count);
109
25
        }
110
26
        return result_column_ptr;
111
26
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE9EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
29
                                          size_t rows_count) const {
81
29
        auto result_column_ptr = data_type()->create_column();
82
29
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
29
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
4
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
4
                                                              then_columns, rows_count);
106
25
        } else {
107
25
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
25
                                                           then_columns, rows_count);
109
25
        }
110
29
        return result_column_ptr;
111
29
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE28EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
1
                                          size_t rows_count) const {
81
1
        auto result_column_ptr = data_type()->create_column();
82
1
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
1
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
1
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
1
                                                              then_columns, rows_count);
106
1
        } else {
107
0
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
0
                                                           then_columns, rows_count);
109
0
        }
110
1
        return result_column_ptr;
111
1
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
1
                                          size_t rows_count) const {
81
1
        auto result_column_ptr = data_type()->create_column();
82
1
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
1
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
1
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
1
                                                              then_columns, rows_count);
106
1
        } else {
107
0
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
0
                                                           then_columns, rows_count);
109
0
        }
110
1
        return result_column_ptr;
111
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
80
121
                                          size_t rows_count) const {
81
121
        auto result_column_ptr = data_type()->create_column();
82
121
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
121
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
121
            if (data_type()->is_nullable()) {
96
56
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
56
                                                                  then_columns, rows_count);
98
65
            } else {
99
65
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
65
                                                                   then_columns, rows_count);
101
65
            }
102
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
                                                              then_columns, rows_count);
106
        } else {
107
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
                                                           then_columns, rows_count);
109
        }
110
121
        return result_column_ptr;
111
121
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE11EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
18
                                          size_t rows_count) const {
81
18
        auto result_column_ptr = data_type()->create_column();
82
18
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
18
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
0
                                                              then_columns, rows_count);
106
18
        } else {
107
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
18
                                                           then_columns, rows_count);
109
18
        }
110
18
        return result_column_ptr;
111
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE12EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
18
                                          size_t rows_count) const {
81
18
        auto result_column_ptr = data_type()->create_column();
82
18
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
18
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
0
                                                              then_columns, rows_count);
106
18
        } else {
107
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
18
                                                           then_columns, rows_count);
109
18
        }
110
18
        return result_column_ptr;
111
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
20
                                          size_t rows_count) const {
81
20
        auto result_column_ptr = data_type()->create_column();
82
20
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
20
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
0
                                                              then_columns, rows_count);
106
20
        } else {
107
20
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
20
                                                           then_columns, rows_count);
109
20
        }
110
20
        return result_column_ptr;
111
20
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE26EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
18
                                          size_t rows_count) const {
81
18
        auto result_column_ptr = data_type()->create_column();
82
18
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
18
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
0
                                                              then_columns, rows_count);
106
18
        } else {
107
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
18
                                                           then_columns, rows_count);
109
18
        }
110
18
        return result_column_ptr;
111
18
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE43EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
21
                                          size_t rows_count) const {
81
21
        auto result_column_ptr = data_type()->create_column();
82
21
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
21
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
3
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
3
                                                              then_columns, rows_count);
106
18
        } else {
107
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
18
                                                           then_columns, rows_count);
109
18
        }
110
21
        return result_column_ptr;
111
21
    }
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE42EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
18
                                          size_t rows_count) const {
81
18
        auto result_column_ptr = data_type()->create_column();
82
18
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
            if (data_type()->is_nullable()) {
96
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
                                                                  then_columns, rows_count);
98
            } else {
99
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
                                                                   then_columns, rows_count);
101
            }
102
18
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
0
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
0
                                                              then_columns, rows_count);
106
18
        } else {
107
18
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
18
                                                           then_columns, rows_count);
109
18
        }
110
18
        return result_column_ptr;
111
18
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE37EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnVectorILNS_13PrimitiveTypeE36EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_11ColumnArrayEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Line
Count
Source
80
1
                                          size_t rows_count) const {
81
1
        auto result_column_ptr = data_type()->create_column();
82
1
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
1
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
1
            if (data_type()->is_nullable()) {
96
1
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
1
                                                                  then_columns, rows_count);
98
1
            } else {
99
0
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
0
                                                                   then_columns, rows_count);
101
0
            }
102
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
                                                              then_columns, rows_count);
106
        } else {
107
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
                                                           then_columns, rows_count);
109
        }
110
1
        return result_column_ptr;
111
1
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_9ColumnMapEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_12ColumnStructEEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
_ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEEEENS_3COWINS_7IColumnEE13immutable_ptrIS6_EEPKT_RSt6vectorIS9_SaIS9_EEm
Line
Count
Source
80
13
                                          size_t rows_count) const {
81
13
        auto result_column_ptr = data_type()->create_column();
82
13
        result_column_ptr->reserve(rows_count);
83
        if constexpr (std::is_same_v<ColumnType, ColumnString> ||
84
                      std::is_same_v<ColumnType, ColumnBitmap> ||
85
                      std::is_same_v<ColumnType, ColumnArray> ||
86
                      std::is_same_v<ColumnType, ColumnMap> ||
87
                      std::is_same_v<ColumnType, ColumnStruct> ||
88
                      std::is_same_v<ColumnType, ColumnVariantV2> ||
89
                      std::is_same_v<ColumnType, ColumnHLL> ||
90
                      std::is_same_v<ColumnType, ColumnQuantileState> ||
91
                      std::is_same_v<ColumnType, ColumnIPv4> ||
92
13
                      std::is_same_v<ColumnType, ColumnIPv6>) {
93
            // result_column and all then_column is not nullable.
94
            // can't simd when type is string.
95
13
            if (data_type()->is_nullable()) {
96
13
                update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
97
13
                                                                  then_columns, rows_count);
98
13
            } else {
99
0
                update_result_normal<IndexType, ColumnType, false>(result_column_ptr, then_idx,
100
0
                                                                   then_columns, rows_count);
101
0
            }
102
        } else if (data_type()->is_nullable()) {
103
            // result_column and all then_column is nullable.
104
            update_result_normal<IndexType, ColumnType, true>(result_column_ptr, then_idx,
105
                                                              then_columns, rows_count);
106
        } else {
107
            update_result_auto_simd<IndexType, ColumnType>(result_column_ptr, then_idx,
108
                                                           then_columns, rows_count);
109
        }
110
13
        return result_column_ptr;
111
13
    }
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
Unexecuted instantiation: _ZNK5doris9VCaseExpr27_execute_update_result_implIhNS_15ColumnVariantV2EEENS_3COWINS_7IColumnEE13immutable_ptrIS4_EEPKT_RSt6vectorIS7_SaIS7_EEm
112
113
    template <typename IndexType>
114
    ColumnPtr _execute_update_result(const IndexType* then_idx,
115
                                     std::vector<ColumnPtr>& then_columns,
116
316
                                     size_t rows_count) const {
117
316
#define CASE_TYPE(ptype, coltype) \
118
316
    case PrimitiveType::ptype:    \
119
316
        return _execute_update_result_impl<IndexType, coltype>(then_idx, then_columns, rows_count);
120
121
316
        switch (data_type()->get_primitive_type()) {
122
0
            CASE_TYPE(TYPE_BOOLEAN, ColumnUInt8)
123
14
            CASE_TYPE(TYPE_TINYINT, ColumnInt8)
124
0
            CASE_TYPE(TYPE_SMALLINT, ColumnInt16)
125
39
            CASE_TYPE(TYPE_INT, ColumnInt32)
126
102
            CASE_TYPE(TYPE_BIGINT, ColumnInt64)
127
0
            CASE_TYPE(TYPE_LARGEINT, ColumnInt128)
128
8
            CASE_TYPE(TYPE_FLOAT, ColumnFloat32)
129
11
            CASE_TYPE(TYPE_DOUBLE, ColumnFloat64)
130
0
            CASE_TYPE(TYPE_DECIMAL32, ColumnDecimal32)
131
1
            CASE_TYPE(TYPE_DECIMAL64, ColumnDecimal64)
132
1
            CASE_TYPE(TYPE_DECIMAL256, ColumnDecimal256)
133
0
            CASE_TYPE(TYPE_DECIMAL128I, ColumnDecimal128V3)
134
0
            CASE_TYPE(TYPE_DECIMALV2, ColumnDecimal128V2)
135
30
            CASE_TYPE(TYPE_STRING, ColumnString)
136
0
            CASE_TYPE(TYPE_CHAR, ColumnString)
137
91
            CASE_TYPE(TYPE_VARCHAR, ColumnString)
138
0
            CASE_TYPE(TYPE_JSONB, ColumnString)
139
0
            CASE_TYPE(TYPE_DATE, ColumnDate)
140
0
            CASE_TYPE(TYPE_DATETIME, ColumnDateTime)
141
2
            CASE_TYPE(TYPE_DATEV2, ColumnDateV2)
142
0
            CASE_TYPE(TYPE_DATETIMEV2, ColumnDateTimeV2)
143
3
            CASE_TYPE(TYPE_TIMESTAMP_NS, ColumnTimeStampNs)
144
0
            CASE_TYPE(TYPE_TIMESTAMPTZ, ColumnTimeStampTz)
145
0
            CASE_TYPE(TYPE_IPV6, ColumnIPv6)
146
0
            CASE_TYPE(TYPE_IPV4, ColumnIPv4)
147
1
            CASE_TYPE(TYPE_ARRAY, ColumnArray)
148
0
            CASE_TYPE(TYPE_MAP, ColumnMap)
149
0
            CASE_TYPE(TYPE_STRUCT, ColumnStruct)
150
13
            CASE_TYPE(TYPE_BITMAP, ColumnBitmap)
151
0
            CASE_TYPE(TYPE_HLL, ColumnHLL)
152
0
            CASE_TYPE(TYPE_QUANTILE_STATE, ColumnQuantileState)
153
0
        case PrimitiveType::TYPE_VARIANT: {
154
0
            const IDataType* variant_type = remove_nullable(data_type()).get();
155
0
            DORIS_CHECK(dynamic_cast<const DataTypeVariantV2*>(variant_type) != nullptr);
156
0
            return _execute_update_result_impl<IndexType, ColumnVariantV2>(then_idx, then_columns,
157
0
                                                                           rows_count);
158
0
        }
159
0
        default:
160
0
            throw Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, "argument_type {} not supported",
161
0
                            data_type()->get_name());
162
316
        }
163
316
#undef CASE_TYPE
164
316
    }
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
116
316
                                     size_t rows_count) const {
117
316
#define CASE_TYPE(ptype, coltype) \
118
316
    case PrimitiveType::ptype:    \
119
316
        return _execute_update_result_impl<IndexType, coltype>(then_idx, then_columns, rows_count);
120
121
316
        switch (data_type()->get_primitive_type()) {
122
0
            CASE_TYPE(TYPE_BOOLEAN, ColumnUInt8)
123
14
            CASE_TYPE(TYPE_TINYINT, ColumnInt8)
124
0
            CASE_TYPE(TYPE_SMALLINT, ColumnInt16)
125
39
            CASE_TYPE(TYPE_INT, ColumnInt32)
126
102
            CASE_TYPE(TYPE_BIGINT, ColumnInt64)
127
0
            CASE_TYPE(TYPE_LARGEINT, ColumnInt128)
128
8
            CASE_TYPE(TYPE_FLOAT, ColumnFloat32)
129
11
            CASE_TYPE(TYPE_DOUBLE, ColumnFloat64)
130
0
            CASE_TYPE(TYPE_DECIMAL32, ColumnDecimal32)
131
1
            CASE_TYPE(TYPE_DECIMAL64, ColumnDecimal64)
132
1
            CASE_TYPE(TYPE_DECIMAL256, ColumnDecimal256)
133
0
            CASE_TYPE(TYPE_DECIMAL128I, ColumnDecimal128V3)
134
0
            CASE_TYPE(TYPE_DECIMALV2, ColumnDecimal128V2)
135
30
            CASE_TYPE(TYPE_STRING, ColumnString)
136
0
            CASE_TYPE(TYPE_CHAR, ColumnString)
137
91
            CASE_TYPE(TYPE_VARCHAR, ColumnString)
138
0
            CASE_TYPE(TYPE_JSONB, ColumnString)
139
0
            CASE_TYPE(TYPE_DATE, ColumnDate)
140
0
            CASE_TYPE(TYPE_DATETIME, ColumnDateTime)
141
2
            CASE_TYPE(TYPE_DATEV2, ColumnDateV2)
142
0
            CASE_TYPE(TYPE_DATETIMEV2, ColumnDateTimeV2)
143
3
            CASE_TYPE(TYPE_TIMESTAMP_NS, ColumnTimeStampNs)
144
0
            CASE_TYPE(TYPE_TIMESTAMPTZ, ColumnTimeStampTz)
145
0
            CASE_TYPE(TYPE_IPV6, ColumnIPv6)
146
0
            CASE_TYPE(TYPE_IPV4, ColumnIPv4)
147
1
            CASE_TYPE(TYPE_ARRAY, ColumnArray)
148
0
            CASE_TYPE(TYPE_MAP, ColumnMap)
149
0
            CASE_TYPE(TYPE_STRUCT, ColumnStruct)
150
13
            CASE_TYPE(TYPE_BITMAP, ColumnBitmap)
151
0
            CASE_TYPE(TYPE_HLL, ColumnHLL)
152
0
            CASE_TYPE(TYPE_QUANTILE_STATE, ColumnQuantileState)
153
0
        case PrimitiveType::TYPE_VARIANT: {
154
0
            const IDataType* variant_type = remove_nullable(data_type()).get();
155
0
            DORIS_CHECK(dynamic_cast<const DataTypeVariantV2*>(variant_type) != nullptr);
156
0
            return _execute_update_result_impl<IndexType, ColumnVariantV2>(then_idx, then_columns,
157
0
                                                                           rows_count);
158
0
        }
159
0
        default:
160
0
            throw Exception(ErrorCode::NOT_IMPLEMENTED_ERROR, "argument_type {} not supported",
161
0
                            data_type()->get_name());
162
316
        }
163
316
#undef CASE_TYPE
164
316
    }
165
166
    template <typename IndexType, typename ColumnType, bool then_null>
167
    void update_result_normal(MutableColumnPtr& result_column_ptr,
168
                              const IndexType* __restrict then_idx,
169
194
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
170
194
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
171
194
        std::vector<uint8_t> is_consts(then_columns.size());
172
194
        std::vector<uint8_t> is_nullable(then_columns.size());
173
611
        for (size_t i = 0; i < then_columns.size(); i++) {
174
417
            if (!then_columns[i]) {
175
30
                continue;
176
30
            }
177
387
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
178
387
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
179
387
        }
180
181
194
        auto* raw_result_column = result_column_ptr.get();
182
1.55k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
183
1.36k
            if (!_has_else_expr && !then_idx[row_idx]) {
184
13
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
185
13
                        ->insert_default();
186
13
                continue;
187
13
            }
188
1.34k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
189
1.34k
            if constexpr (then_null) {
190
1.15k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
191
1.15k
                        result_column_ptr.get());
192
1.15k
                if (is_nullable[then_idx[row_idx]]) {
193
97
                    nullable->insert_from_with_type<ColumnType>(
194
97
                            *raw_then_columns[then_idx[row_idx]], target);
195
1.06k
                } else {
196
1.06k
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
197
1.06k
                            nullable->get_nested_column_ptr().get());
198
1.06k
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
199
1.06k
                    nullable->push_false_to_nullmap(1);
200
1.06k
                }
201
1.15k
            } else {
202
191
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
203
191
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
191
            }
205
1.34k
        }
206
194
    }
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_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_13PrimitiveTypeE36EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnVectorILNS_13PrimitiveTypeE36EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_11ColumnArrayELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_11ColumnArrayELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_9ColumnMapELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_9ColumnMapELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnStructELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_12ColumnStructELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE19EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE19EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE24EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_17ColumnComplexTypeILNS_13PrimitiveTypeE24EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_15ColumnVariantV2ELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalItNS_15ColumnVariantV2ELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE2EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE3EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
169
4
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
170
4
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
171
4
        std::vector<uint8_t> is_consts(then_columns.size());
172
4
        std::vector<uint8_t> is_nullable(then_columns.size());
173
12
        for (size_t i = 0; i < then_columns.size(); i++) {
174
8
            if (!then_columns[i]) {
175
3
                continue;
176
3
            }
177
5
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
178
5
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
179
5
        }
180
181
4
        auto* raw_result_column = result_column_ptr.get();
182
10
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
183
6
            if (!_has_else_expr && !then_idx[row_idx]) {
184
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
185
0
                        ->insert_default();
186
0
                continue;
187
0
            }
188
6
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
189
6
            if constexpr (then_null) {
190
6
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
191
6
                        result_column_ptr.get());
192
6
                if (is_nullable[then_idx[row_idx]]) {
193
1
                    nullable->insert_from_with_type<ColumnType>(
194
1
                            *raw_then_columns[then_idx[row_idx]], target);
195
5
                } else {
196
5
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
197
5
                            nullable->get_nested_column_ptr().get());
198
5
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
199
5
                    nullable->push_false_to_nullmap(1);
200
5
                }
201
            } else {
202
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
203
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
            }
205
6
        }
206
4
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE4EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE5EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
169
39
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
170
39
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
171
39
        std::vector<uint8_t> is_consts(then_columns.size());
172
39
        std::vector<uint8_t> is_nullable(then_columns.size());
173
109
        for (size_t i = 0; i < then_columns.size(); i++) {
174
70
            if (!then_columns[i]) {
175
0
                continue;
176
0
            }
177
70
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
178
70
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
179
70
        }
180
181
39
        auto* raw_result_column = result_column_ptr.get();
182
92
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
183
53
            if (!_has_else_expr && !then_idx[row_idx]) {
184
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
185
0
                        ->insert_default();
186
0
                continue;
187
0
            }
188
53
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
189
53
            if constexpr (then_null) {
190
53
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
191
53
                        result_column_ptr.get());
192
53
                if (is_nullable[then_idx[row_idx]]) {
193
53
                    nullable->insert_from_with_type<ColumnType>(
194
53
                            *raw_then_columns[then_idx[row_idx]], target);
195
53
                } else {
196
0
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
197
0
                            nullable->get_nested_column_ptr().get());
198
0
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
199
0
                    nullable->push_false_to_nullmap(1);
200
0
                }
201
            } else {
202
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
203
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
            }
205
53
        }
206
39
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE6EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
169
6
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
170
6
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
171
6
        std::vector<uint8_t> is_consts(then_columns.size());
172
6
        std::vector<uint8_t> is_nullable(then_columns.size());
173
19
        for (size_t i = 0; i < then_columns.size(); i++) {
174
13
            if (!then_columns[i]) {
175
0
                continue;
176
0
            }
177
13
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
178
13
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
179
13
        }
180
181
6
        auto* raw_result_column = result_column_ptr.get();
182
18
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
183
12
            if (!_has_else_expr && !then_idx[row_idx]) {
184
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
185
0
                        ->insert_default();
186
0
                continue;
187
0
            }
188
12
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
189
12
            if constexpr (then_null) {
190
12
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
191
12
                        result_column_ptr.get());
192
12
                if (is_nullable[then_idx[row_idx]]) {
193
12
                    nullable->insert_from_with_type<ColumnType>(
194
12
                            *raw_then_columns[then_idx[row_idx]], target);
195
12
                } else {
196
0
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
197
0
                            nullable->get_nested_column_ptr().get());
198
0
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
199
0
                    nullable->push_false_to_nullmap(1);
200
0
                }
201
            } else {
202
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
203
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
            }
205
12
        }
206
6
    }
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
169
1
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
170
1
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
171
1
        std::vector<uint8_t> is_consts(then_columns.size());
172
1
        std::vector<uint8_t> is_nullable(then_columns.size());
173
4
        for (size_t i = 0; i < then_columns.size(); i++) {
174
3
            if (!then_columns[i]) {
175
1
                continue;
176
1
            }
177
2
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
178
2
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
179
2
        }
180
181
1
        auto* raw_result_column = result_column_ptr.get();
182
4
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
183
3
            if (!_has_else_expr && !then_idx[row_idx]) {
184
1
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
185
1
                        ->insert_default();
186
1
                continue;
187
1
            }
188
2
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
189
2
            if constexpr (then_null) {
190
2
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
191
2
                        result_column_ptr.get());
192
2
                if (is_nullable[then_idx[row_idx]]) {
193
0
                    nullable->insert_from_with_type<ColumnType>(
194
0
                            *raw_then_columns[then_idx[row_idx]], target);
195
2
                } else {
196
2
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
197
2
                            nullable->get_nested_column_ptr().get());
198
2
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
199
2
                    nullable->push_false_to_nullmap(1);
200
2
                }
201
            } else {
202
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
203
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
            }
205
2
        }
206
1
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE9EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
169
4
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
170
4
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
171
4
        std::vector<uint8_t> is_consts(then_columns.size());
172
4
        std::vector<uint8_t> is_nullable(then_columns.size());
173
15
        for (size_t i = 0; i < then_columns.size(); i++) {
174
11
            if (!then_columns[i]) {
175
1
                continue;
176
1
            }
177
10
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
178
10
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
179
10
        }
180
181
4
        auto* raw_result_column = result_column_ptr.get();
182
17
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
183
13
            if (!_has_else_expr && !then_idx[row_idx]) {
184
1
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
185
1
                        ->insert_default();
186
1
                continue;
187
1
            }
188
12
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
189
12
            if constexpr (then_null) {
190
12
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
191
12
                        result_column_ptr.get());
192
12
                if (is_nullable[then_idx[row_idx]]) {
193
7
                    nullable->insert_from_with_type<ColumnType>(
194
7
                            *raw_then_columns[then_idx[row_idx]], target);
195
7
                } else {
196
5
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
197
5
                            nullable->get_nested_column_ptr().get());
198
5
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
199
5
                    nullable->push_false_to_nullmap(1);
200
5
                }
201
            } else {
202
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
203
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
            }
205
12
        }
206
4
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_13ColumnDecimalILNS_13PrimitiveTypeE28EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_13ColumnDecimalILNS_13PrimitiveTypeE29EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
169
1
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
170
1
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
171
1
        std::vector<uint8_t> is_consts(then_columns.size());
172
1
        std::vector<uint8_t> is_nullable(then_columns.size());
173
2
        for (size_t i = 0; i < then_columns.size(); i++) {
174
1
            if (!then_columns[i]) {
175
0
                continue;
176
0
            }
177
1
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
178
1
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
179
1
        }
180
181
1
        auto* raw_result_column = result_column_ptr.get();
182
2
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
183
1
            if (!_has_else_expr && !then_idx[row_idx]) {
184
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
185
0
                        ->insert_default();
186
0
                continue;
187
0
            }
188
1
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
189
1
            if constexpr (then_null) {
190
1
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
191
1
                        result_column_ptr.get());
192
1
                if (is_nullable[then_idx[row_idx]]) {
193
1
                    nullable->insert_from_with_type<ColumnType>(
194
1
                            *raw_then_columns[then_idx[row_idx]], target);
195
1
                } else {
196
0
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
197
0
                            nullable->get_nested_column_ptr().get());
198
0
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
199
0
                    nullable->push_false_to_nullmap(1);
200
0
                }
201
            } else {
202
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
203
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
            }
205
1
        }
206
1
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_13ColumnDecimalILNS_13PrimitiveTypeE35EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
169
1
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
170
1
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
171
1
        std::vector<uint8_t> is_consts(then_columns.size());
172
1
        std::vector<uint8_t> is_nullable(then_columns.size());
173
5
        for (size_t i = 0; i < then_columns.size(); i++) {
174
4
            if (!then_columns[i]) {
175
0
                continue;
176
0
            }
177
4
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
178
4
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
179
4
        }
180
181
1
        auto* raw_result_column = result_column_ptr.get();
182
4
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
183
3
            if (!_has_else_expr && !then_idx[row_idx]) {
184
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
185
0
                        ->insert_default();
186
0
                continue;
187
0
            }
188
3
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
189
3
            if constexpr (then_null) {
190
3
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
191
3
                        result_column_ptr.get());
192
3
                if (is_nullable[then_idx[row_idx]]) {
193
3
                    nullable->insert_from_with_type<ColumnType>(
194
3
                            *raw_then_columns[then_idx[row_idx]], target);
195
3
                } else {
196
0
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
197
0
                            nullable->get_nested_column_ptr().get());
198
0
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
199
0
                    nullable->push_false_to_nullmap(1);
200
0
                }
201
            } else {
202
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
203
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
            }
205
3
        }
206
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
169
56
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
170
56
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
171
56
        std::vector<uint8_t> is_consts(then_columns.size());
172
56
        std::vector<uint8_t> is_nullable(then_columns.size());
173
179
        for (size_t i = 0; i < then_columns.size(); i++) {
174
123
            if (!then_columns[i]) {
175
25
                continue;
176
25
            }
177
98
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
178
98
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
179
98
        }
180
181
56
        auto* raw_result_column = result_column_ptr.get();
182
1.10k
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
183
1.04k
            if (!_has_else_expr && !then_idx[row_idx]) {
184
11
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
185
11
                        ->insert_default();
186
11
                continue;
187
11
            }
188
1.03k
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
189
1.03k
            if constexpr (then_null) {
190
1.03k
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
191
1.03k
                        result_column_ptr.get());
192
1.03k
                if (is_nullable[then_idx[row_idx]]) {
193
3
                    nullable->insert_from_with_type<ColumnType>(
194
3
                            *raw_then_columns[then_idx[row_idx]], target);
195
1.03k
                } else {
196
1.03k
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
197
1.03k
                            nullable->get_nested_column_ptr().get());
198
1.03k
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
199
1.03k
                    nullable->push_false_to_nullmap(1);
200
1.03k
                }
201
            } else {
202
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
203
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
            }
205
1.03k
        }
206
56
    }
_ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnStrIjEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS5_EEPKT_RSt6vectorINS6_13immutable_ptrIS5_EESaISF_EEm
Line
Count
Source
169
65
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
170
65
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
171
65
        std::vector<uint8_t> is_consts(then_columns.size());
172
65
        std::vector<uint8_t> is_nullable(then_columns.size());
173
213
        for (size_t i = 0; i < then_columns.size(); i++) {
174
148
            if (!then_columns[i]) {
175
0
                continue;
176
0
            }
177
148
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
178
148
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
179
148
        }
180
181
65
        auto* raw_result_column = result_column_ptr.get();
182
256
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
183
191
            if (!_has_else_expr && !then_idx[row_idx]) {
184
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
185
0
                        ->insert_default();
186
0
                continue;
187
0
            }
188
191
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
189
            if constexpr (then_null) {
190
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
191
                        result_column_ptr.get());
192
                if (is_nullable[then_idx[row_idx]]) {
193
                    nullable->insert_from_with_type<ColumnType>(
194
                            *raw_then_columns[then_idx[row_idx]], target);
195
                } else {
196
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
197
                            nullable->get_nested_column_ptr().get());
198
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
199
                    nullable->push_false_to_nullmap(1);
200
                }
201
191
            } else {
202
191
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
203
191
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
191
            }
205
191
        }
206
65
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE11EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE12EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE25EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE26EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE43EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
169
3
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
170
3
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
171
3
        std::vector<uint8_t> is_consts(then_columns.size());
172
3
        std::vector<uint8_t> is_nullable(then_columns.size());
173
14
        for (size_t i = 0; i < then_columns.size(); i++) {
174
11
            if (!then_columns[i]) {
175
0
                continue;
176
0
            }
177
11
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
178
11
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
179
11
        }
180
181
3
        auto* raw_result_column = result_column_ptr.get();
182
16
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
183
13
            if (!_has_else_expr && !then_idx[row_idx]) {
184
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
185
0
                        ->insert_default();
186
0
                continue;
187
0
            }
188
13
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
189
13
            if constexpr (then_null) {
190
13
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
191
13
                        result_column_ptr.get());
192
13
                if (is_nullable[then_idx[row_idx]]) {
193
12
                    nullable->insert_from_with_type<ColumnType>(
194
12
                            *raw_then_columns[then_idx[row_idx]], target);
195
12
                } else {
196
1
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
197
1
                            nullable->get_nested_column_ptr().get());
198
1
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
199
1
                    nullable->push_false_to_nullmap(1);
200
1
                }
201
            } else {
202
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
203
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
            }
205
13
        }
206
3
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE42EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE37EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE37EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE36EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnVectorILNS_13PrimitiveTypeE36EEELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_11ColumnArrayELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Line
Count
Source
169
1
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
170
1
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
171
1
        std::vector<uint8_t> is_consts(then_columns.size());
172
1
        std::vector<uint8_t> is_nullable(then_columns.size());
173
4
        for (size_t i = 0; i < then_columns.size(); i++) {
174
3
            if (!then_columns[i]) {
175
0
                continue;
176
0
            }
177
3
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
178
3
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
179
3
        }
180
181
1
        auto* raw_result_column = result_column_ptr.get();
182
4
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
183
3
            if (!_has_else_expr && !then_idx[row_idx]) {
184
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
185
0
                        ->insert_default();
186
0
                continue;
187
0
            }
188
3
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
189
3
            if constexpr (then_null) {
190
3
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
191
3
                        result_column_ptr.get());
192
3
                if (is_nullable[then_idx[row_idx]]) {
193
1
                    nullable->insert_from_with_type<ColumnType>(
194
1
                            *raw_then_columns[then_idx[row_idx]], target);
195
2
                } else {
196
2
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
197
2
                            nullable->get_nested_column_ptr().get());
198
2
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
199
2
                    nullable->push_false_to_nullmap(1);
200
2
                }
201
            } else {
202
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
203
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
            }
205
3
        }
206
1
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_11ColumnArrayELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnMapELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_9ColumnMapELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnStructELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_12ColumnStructELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
_ZNK5doris9VCaseExpr20update_result_normalIhNS_17ColumnComplexTypeILNS_13PrimitiveTypeE22EEELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
169
13
                              std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
170
13
        std::vector<ColumnPtr> raw_then_columns(then_columns.size());
171
13
        std::vector<uint8_t> is_consts(then_columns.size());
172
13
        std::vector<uint8_t> is_nullable(then_columns.size());
173
35
        for (size_t i = 0; i < then_columns.size(); i++) {
174
22
            if (!then_columns[i]) {
175
0
                continue;
176
0
            }
177
22
            std::tie(raw_then_columns[i], is_consts[i]) = unpack_if_const(then_columns[i]);
178
22
            is_nullable[i] = is_column_nullable(*raw_then_columns[i]);
179
22
        }
180
181
13
        auto* raw_result_column = result_column_ptr.get();
182
28
        for (int row_idx = 0; row_idx < rows_count; row_idx++) {
183
15
            if (!_has_else_expr && !then_idx[row_idx]) {
184
0
                assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(raw_result_column)
185
0
                        ->insert_default();
186
0
                continue;
187
0
            }
188
15
            size_t target = is_consts[then_idx[row_idx]] ? 0 : row_idx;
189
15
            if constexpr (then_null) {
190
15
                auto* nullable = assert_cast<ColumnNullable*, TypeCheckOnRelease::DISABLE>(
191
15
                        result_column_ptr.get());
192
15
                if (is_nullable[then_idx[row_idx]]) {
193
4
                    nullable->insert_from_with_type<ColumnType>(
194
4
                            *raw_then_columns[then_idx[row_idx]], target);
195
11
                } else {
196
11
                    auto* nested = assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(
197
11
                            nullable->get_nested_column_ptr().get());
198
11
                    nested->insert_from(*raw_then_columns[then_idx[row_idx]], target);
199
11
                    nullable->push_false_to_nullmap(1);
200
11
                }
201
            } else {
202
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
203
                        ->insert_from(*raw_then_columns[then_idx[row_idx]], target);
204
            }
205
15
        }
206
13
    }
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
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_15ColumnVariantV2ELb1EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr20update_result_normalIhNS_15ColumnVariantV2ELb0EEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS4_EEPKT_RSt6vectorINS5_13immutable_ptrIS4_EESaISE_EEm
207
208
    template <typename IndexType, typename ColumnType>
209
    void update_result_auto_simd(MutableColumnPtr& result_column_ptr,
210
                                 const IndexType* __restrict then_idx,
211
410
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
10.6k
        for (auto& then_ptr : then_columns) {
213
10.6k
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
10.6k
        }
215
216
410
        result_column_ptr->resize(rows_count);
217
410
        auto* __restrict result_raw_data =
218
410
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
410
                        ->get_data()
220
410
                        .data();
221
222
        // set default value
223
405k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
297k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
297k
                result_raw_data[i] = ColumnType::default_value();
231
297k
            } else {
232
107k
                result_raw_data[i] = {};
233
107k
            }
234
404k
        }
235
236
11.0k
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
10.6k
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
10.6k
            const auto* __restrict column_raw_data =
241
10.6k
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
10.6k
                            then_columns[i].get())
243
10.6k
                            ->get_data()
244
10.6k
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
10.5k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
35.9M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
35.9M
                    if (then_idx[row_idx] == i) {
258
404k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
404k
                    }
260
35.9M
                }
261
10.5k
            } else {
262
402
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
286
                    result_raw_data[row_idx] +=
264
286
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
286
                            column_raw_data[row_idx];
266
286
                }
267
116
            }
268
10.6k
        }
269
410
    }
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
211
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
658
        for (auto& then_ptr : then_columns) {
213
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
658
        }
215
216
18
        result_column_ptr->resize(rows_count);
217
18
        auto* __restrict result_raw_data =
218
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
18
                        ->get_data()
220
18
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
                result_raw_data[i] = ColumnType::default_value();
231
24.7k
            } else {
232
24.7k
                result_raw_data[i] = {};
233
24.7k
            }
234
24.7k
        }
235
236
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
658
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
658
            const auto* __restrict column_raw_data =
241
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
658
                            then_columns[i].get())
243
658
                            ->get_data()
244
658
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.25M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.25M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
658
        }
269
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE9EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
211
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
658
        for (auto& then_ptr : then_columns) {
213
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
658
        }
215
216
18
        result_column_ptr->resize(rows_count);
217
18
        auto* __restrict result_raw_data =
218
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
18
                        ->get_data()
220
18
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
                result_raw_data[i] = ColumnType::default_value();
231
24.7k
            } else {
232
24.7k
                result_raw_data[i] = {};
233
24.7k
            }
234
24.7k
        }
235
236
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
658
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
658
            const auto* __restrict column_raw_data =
241
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
658
                            then_columns[i].get())
243
658
                            ->get_data()
244
658
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.25M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.25M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
658
        }
269
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
211
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
658
        for (auto& then_ptr : then_columns) {
213
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
658
        }
215
216
18
        result_column_ptr->resize(rows_count);
217
18
        auto* __restrict result_raw_data =
218
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
18
                        ->get_data()
220
18
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
24.7k
                result_raw_data[i] = ColumnType::default_value();
231
            } else {
232
                result_raw_data[i] = {};
233
            }
234
24.7k
        }
235
236
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
658
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
658
            const auto* __restrict column_raw_data =
241
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
658
                            then_columns[i].get())
243
658
                            ->get_data()
244
658
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.25M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.25M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
658
        }
269
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE12EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
211
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
658
        for (auto& then_ptr : then_columns) {
213
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
658
        }
215
216
18
        result_column_ptr->resize(rows_count);
217
18
        auto* __restrict result_raw_data =
218
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
18
                        ->get_data()
220
18
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
24.7k
                result_raw_data[i] = ColumnType::default_value();
231
            } else {
232
                result_raw_data[i] = {};
233
            }
234
24.7k
        }
235
236
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
658
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
658
            const auto* __restrict column_raw_data =
241
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
658
                            then_columns[i].get())
243
658
                            ->get_data()
244
658
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.25M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.25M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
658
        }
269
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
211
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
658
        for (auto& then_ptr : then_columns) {
213
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
658
        }
215
216
18
        result_column_ptr->resize(rows_count);
217
18
        auto* __restrict result_raw_data =
218
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
18
                        ->get_data()
220
18
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
24.7k
                result_raw_data[i] = ColumnType::default_value();
231
            } else {
232
                result_raw_data[i] = {};
233
            }
234
24.7k
        }
235
236
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
658
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
658
            const auto* __restrict column_raw_data =
241
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
658
                            then_columns[i].get())
243
658
                            ->get_data()
244
658
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.25M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.25M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
658
        }
269
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE26EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
211
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
658
        for (auto& then_ptr : then_columns) {
213
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
658
        }
215
216
18
        result_column_ptr->resize(rows_count);
217
18
        auto* __restrict result_raw_data =
218
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
18
                        ->get_data()
220
18
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
24.7k
                result_raw_data[i] = ColumnType::default_value();
231
            } else {
232
                result_raw_data[i] = {};
233
            }
234
24.7k
        }
235
236
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
658
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
658
            const auto* __restrict column_raw_data =
241
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
658
                            then_columns[i].get())
243
658
                            ->get_data()
244
658
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.25M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.25M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
658
        }
269
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE43EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
211
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
658
        for (auto& then_ptr : then_columns) {
213
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
658
        }
215
216
18
        result_column_ptr->resize(rows_count);
217
18
        auto* __restrict result_raw_data =
218
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
18
                        ->get_data()
220
18
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
24.7k
                result_raw_data[i] = ColumnType::default_value();
231
            } else {
232
                result_raw_data[i] = {};
233
            }
234
24.7k
        }
235
236
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
658
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
658
            const auto* __restrict column_raw_data =
241
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
658
                            then_columns[i].get())
243
658
                            ->get_data()
244
658
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.25M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.25M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
658
        }
269
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdItNS_12ColumnVectorILNS_13PrimitiveTypeE42EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
211
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
658
        for (auto& then_ptr : then_columns) {
213
658
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
658
        }
215
216
18
        result_column_ptr->resize(rows_count);
217
18
        auto* __restrict result_raw_data =
218
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
18
                        ->get_data()
220
18
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
24.7k
                result_raw_data[i] = ColumnType::default_value();
231
            } else {
232
                result_raw_data[i] = {};
233
            }
234
24.7k
        }
235
236
676
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
658
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
658
            const auto* __restrict column_raw_data =
241
658
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
658
                            then_columns[i].get())
243
658
                            ->get_data()
244
658
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
658
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.25M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.25M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
658
        }
269
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
211
10
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
20
        for (auto& then_ptr : then_columns) {
213
20
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
20
        }
215
216
10
        result_column_ptr->resize(rows_count);
217
10
        auto* __restrict result_raw_data =
218
10
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
10
                        ->get_data()
220
10
                        .data();
221
222
        // set default value
223
34
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
                result_raw_data[i] = ColumnType::default_value();
231
24
            } else {
232
24
                result_raw_data[i] = {};
233
24
            }
234
24
        }
235
236
30
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
20
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
20
            const auto* __restrict column_raw_data =
241
20
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
20
                            then_columns[i].get())
243
20
                            ->get_data()
244
20
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
                    if (then_idx[row_idx] == i) {
258
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
                    }
260
                }
261
20
            } else {
262
77
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
57
                    result_raw_data[row_idx] +=
264
57
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
57
                            column_raw_data[row_idx];
266
57
                }
267
20
            }
268
20
        }
269
10
    }
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE4EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Unexecuted instantiation: _ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE5EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE6EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
211
96
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
96
        for (auto& then_ptr : then_columns) {
213
96
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
96
        }
215
216
96
        result_column_ptr->resize(rows_count);
217
96
        auto* __restrict result_raw_data =
218
96
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
96
                        ->get_data()
220
96
                        .data();
221
222
        // set default value
223
325
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
                result_raw_data[i] = ColumnType::default_value();
231
229
            } else {
232
229
                result_raw_data[i] = {};
233
229
            }
234
229
        }
235
236
192
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
96
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
96
            const auto* __restrict column_raw_data =
241
96
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
96
                            then_columns[i].get())
243
96
                            ->get_data()
244
96
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
                    if (then_idx[row_idx] == i) {
258
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
                    }
260
                }
261
96
            } else {
262
325
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
229
                    result_raw_data[row_idx] +=
264
229
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
229
                            column_raw_data[row_idx];
266
229
                }
267
96
            }
268
96
        }
269
96
    }
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
211
25
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
675
        for (auto& then_ptr : then_columns) {
213
675
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
675
        }
215
216
25
        result_column_ptr->resize(rows_count);
217
25
        auto* __restrict result_raw_data =
218
25
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
25
                        ->get_data()
220
25
                        .data();
221
222
        // set default value
223
28.9k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
                result_raw_data[i] = ColumnType::default_value();
231
28.8k
            } else {
232
28.8k
                result_raw_data[i] = {};
233
28.8k
            }
234
28.8k
        }
235
236
700
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
675
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
675
            const auto* __restrict column_raw_data =
241
675
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
675
                            then_columns[i].get())
243
675
                            ->get_data()
244
675
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
675
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.25M
                    if (then_idx[row_idx] == i) {
258
28.8k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
28.8k
                    }
260
2.25M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
675
        }
269
25
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE9EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
211
25
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
675
        for (auto& then_ptr : then_columns) {
213
675
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
675
        }
215
216
25
        result_column_ptr->resize(rows_count);
217
25
        auto* __restrict result_raw_data =
218
25
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
25
                        ->get_data()
220
25
                        .data();
221
222
        // set default value
223
28.9k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
                result_raw_data[i] = ColumnType::default_value();
231
28.8k
            } else {
232
28.8k
                result_raw_data[i] = {};
233
28.8k
            }
234
28.8k
        }
235
236
700
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
675
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
675
            const auto* __restrict column_raw_data =
241
675
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
675
                            then_columns[i].get())
243
675
                            ->get_data()
244
675
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
675
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.25M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.25M
                    if (then_idx[row_idx] == i) {
258
28.8k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
28.8k
                    }
260
2.25M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
675
        }
269
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
211
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
654
        for (auto& then_ptr : then_columns) {
213
654
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
654
        }
215
216
18
        result_column_ptr->resize(rows_count);
217
18
        auto* __restrict result_raw_data =
218
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
18
                        ->get_data()
220
18
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
24.7k
                result_raw_data[i] = ColumnType::default_value();
231
            } else {
232
                result_raw_data[i] = {};
233
            }
234
24.7k
        }
235
236
672
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
654
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
654
            const auto* __restrict column_raw_data =
241
654
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
654
                            then_columns[i].get())
243
654
                            ->get_data()
244
654
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
654
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.23M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.23M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
654
        }
269
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE12EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
211
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
654
        for (auto& then_ptr : then_columns) {
213
654
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
654
        }
215
216
18
        result_column_ptr->resize(rows_count);
217
18
        auto* __restrict result_raw_data =
218
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
18
                        ->get_data()
220
18
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
24.7k
                result_raw_data[i] = ColumnType::default_value();
231
            } else {
232
                result_raw_data[i] = {};
233
            }
234
24.7k
        }
235
236
672
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
654
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
654
            const auto* __restrict column_raw_data =
241
654
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
654
                            then_columns[i].get())
243
654
                            ->get_data()
244
654
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
654
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.23M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.23M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
654
        }
269
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE25EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
211
20
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
660
        for (auto& then_ptr : then_columns) {
213
660
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
660
        }
215
216
20
        result_column_ptr->resize(rows_count);
217
20
        auto* __restrict result_raw_data =
218
20
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
20
                        ->get_data()
220
20
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
24.7k
                result_raw_data[i] = ColumnType::default_value();
231
            } else {
232
                result_raw_data[i] = {};
233
            }
234
24.7k
        }
235
236
680
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
660
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
660
            const auto* __restrict column_raw_data =
241
660
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
660
                            then_columns[i].get())
243
660
                            ->get_data()
244
660
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
660
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.23M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.23M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
660
        }
269
20
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE26EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
211
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
654
        for (auto& then_ptr : then_columns) {
213
654
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
654
        }
215
216
18
        result_column_ptr->resize(rows_count);
217
18
        auto* __restrict result_raw_data =
218
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
18
                        ->get_data()
220
18
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
24.7k
                result_raw_data[i] = ColumnType::default_value();
231
            } else {
232
                result_raw_data[i] = {};
233
            }
234
24.7k
        }
235
236
672
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
654
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
654
            const auto* __restrict column_raw_data =
241
654
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
654
                            then_columns[i].get())
243
654
                            ->get_data()
244
654
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
654
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.23M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.23M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
654
        }
269
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE43EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
211
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
654
        for (auto& then_ptr : then_columns) {
213
654
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
654
        }
215
216
18
        result_column_ptr->resize(rows_count);
217
18
        auto* __restrict result_raw_data =
218
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
18
                        ->get_data()
220
18
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
24.7k
                result_raw_data[i] = ColumnType::default_value();
231
            } else {
232
                result_raw_data[i] = {};
233
            }
234
24.7k
        }
235
236
672
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
654
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
654
            const auto* __restrict column_raw_data =
241
654
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
654
                            then_columns[i].get())
243
654
                            ->get_data()
244
654
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
654
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.23M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.23M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
654
        }
269
18
    }
_ZNK5doris9VCaseExpr23update_result_auto_simdIhNS_12ColumnVectorILNS_13PrimitiveTypeE42EEEEEvRNS_3COWINS_7IColumnEE11mutable_ptrIS6_EEPKT_RSt6vectorINS7_13immutable_ptrIS6_EESaISG_EEm
Line
Count
Source
211
18
                                 std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
212
654
        for (auto& then_ptr : then_columns) {
213
654
            then_ptr = then_ptr->convert_to_full_column_if_const();
214
654
        }
215
216
18
        result_column_ptr->resize(rows_count);
217
18
        auto* __restrict result_raw_data =
218
18
                assert_cast<ColumnType*, TypeCheckOnRelease::DISABLE>(result_column_ptr.get())
219
18
                        ->get_data()
220
18
                        .data();
221
222
        // set default value
223
24.7k
        for (int i = 0; i < rows_count; i++) {
224
            if constexpr (std::is_same_v<ColumnType, ColumnDate> ||
225
                          std::is_same_v<ColumnType, ColumnDateTime> ||
226
                          std::is_same_v<ColumnType, ColumnDateV2> ||
227
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
228
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
229
24.7k
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
230
24.7k
                result_raw_data[i] = ColumnType::default_value();
231
            } else {
232
                result_raw_data[i] = {};
233
            }
234
24.7k
        }
235
236
672
        for (IndexType i = 0; i < then_columns.size(); i++) {
237
654
            if (!then_columns[i]) {
238
0
                continue;
239
0
            }
240
654
            const auto* __restrict column_raw_data =
241
654
                    assert_cast<const ColumnType*, TypeCheckOnRelease::DISABLE>(
242
654
                            then_columns[i].get())
243
654
                            ->get_data()
244
654
                            .data();
245
            if constexpr (std::is_same_v<ColumnType, ColumnFloat32> ||
246
                          std::is_same_v<ColumnType, ColumnFloat64> ||
247
                          std::is_same_v<ColumnType, ColumnDate> ||
248
                          std::is_same_v<ColumnType, ColumnDateTime> ||
249
                          std::is_same_v<ColumnType, ColumnDateV2> ||
250
                          std::is_same_v<ColumnType, ColumnDateTimeV2> ||
251
                          std::is_same_v<ColumnType, ColumnTimeStampNs> ||
252
654
                          std::is_same_v<ColumnType, ColumnTimeStampTz>) {
253
                // Arithmetic masking propagates unselected NaN/Infinity and loses signed zero.
254
                // Conditional stores also let the compiler vectorize without loading from a
255
                // selected source/destination pointer, as a ternary assignment can do.
256
2.24M
                for (size_t row_idx = 0; row_idx < rows_count; row_idx++) {
257
2.23M
                    if (then_idx[row_idx] == i) {
258
24.7k
                        result_raw_data[row_idx] = column_raw_data[row_idx];
259
24.7k
                    }
260
2.23M
                }
261
            } else {
262
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
263
                    result_raw_data[row_idx] +=
264
                            typename ColumnType::value_type(then_idx[row_idx] == i) *
265
                            column_raw_data[row_idx];
266
                }
267
            }
268
654
        }
269
18
    }
270
271
    template <typename IndexType>
272
    ColumnPtr _execute_impl(const std::vector<ColumnPtr>& when_columns,
273
316
                            std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
274
316
        std::vector<IndexType> then_idx(rows_count, 0);
275
316
        IndexType* __restrict then_idx_ptr = then_idx.data();
276
549
        for (IndexType i = 0; i < when_columns.size(); i++) {
277
263
            IndexType column_idx = i + 1;
278
263
            auto [raw_when_column, is_consts] = unpack_if_const(when_columns[i]);
279
280
263
            if (is_consts) {
281
30
                if (raw_when_column->get_bool(0)) {
282
993
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
283
963
                        then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx]) * column_idx;
284
963
                    }
285
30
                    break;
286
30
                }
287
0
                continue;
288
30
            }
289
290
233
            if (is_column_nullable(*raw_when_column)) {
291
145
                const auto* column_nullable_ptr =
292
145
                        assert_cast<const ColumnNullable*, TypeCheckOnRelease::DISABLE>(
293
145
                                raw_when_column.get());
294
145
                const auto* __restrict cond_raw_data =
295
145
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
296
145
                                column_nullable_ptr->get_nested_column_ptr().get())
297
145
                                ->get_data()
298
145
                                .data();
299
145
                if (!column_nullable_ptr->has_null()) {
300
438
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
301
326
                        then_idx_ptr[row_idx] |=
302
326
                                (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
303
326
                    }
304
112
                    continue;
305
112
                }
306
33
                const auto* __restrict cond_raw_nullmap =
307
33
                        column_nullable_ptr->get_null_map_column_ptr()->get_data().data();
308
186
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
309
153
                    then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx] * cond_raw_data[row_idx] *
310
153
                                              !cond_raw_nullmap[row_idx]) *
311
153
                                             column_idx;
312
153
                }
313
88
            } else {
314
88
                const auto* __restrict cond_raw_data =
315
88
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
316
88
                                raw_when_column.get())
317
88
                                ->get_data()
318
88
                                .data();
319
16.6k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
320
16.6k
                    then_idx_ptr[row_idx] |=
321
16.6k
                            (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
322
16.6k
                }
323
88
            }
324
233
        }
325
326
316
        return _execute_update_result<IndexType>(then_idx_ptr, then_columns, rows_count);
327
316
    }
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
273
316
                            std::vector<ColumnPtr>& then_columns, size_t rows_count) const {
274
316
        std::vector<IndexType> then_idx(rows_count, 0);
275
316
        IndexType* __restrict then_idx_ptr = then_idx.data();
276
549
        for (IndexType i = 0; i < when_columns.size(); i++) {
277
263
            IndexType column_idx = i + 1;
278
263
            auto [raw_when_column, is_consts] = unpack_if_const(when_columns[i]);
279
280
263
            if (is_consts) {
281
30
                if (raw_when_column->get_bool(0)) {
282
993
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
283
963
                        then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx]) * column_idx;
284
963
                    }
285
30
                    break;
286
30
                }
287
0
                continue;
288
30
            }
289
290
233
            if (is_column_nullable(*raw_when_column)) {
291
145
                const auto* column_nullable_ptr =
292
145
                        assert_cast<const ColumnNullable*, TypeCheckOnRelease::DISABLE>(
293
145
                                raw_when_column.get());
294
145
                const auto* __restrict cond_raw_data =
295
145
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
296
145
                                column_nullable_ptr->get_nested_column_ptr().get())
297
145
                                ->get_data()
298
145
                                .data();
299
145
                if (!column_nullable_ptr->has_null()) {
300
438
                    for (int row_idx = 0; row_idx < rows_count; row_idx++) {
301
326
                        then_idx_ptr[row_idx] |=
302
326
                                (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
303
326
                    }
304
112
                    continue;
305
112
                }
306
33
                const auto* __restrict cond_raw_nullmap =
307
33
                        column_nullable_ptr->get_null_map_column_ptr()->get_data().data();
308
186
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
309
153
                    then_idx_ptr[row_idx] |= (!then_idx_ptr[row_idx] * cond_raw_data[row_idx] *
310
153
                                              !cond_raw_nullmap[row_idx]) *
311
153
                                             column_idx;
312
153
                }
313
88
            } else {
314
88
                const auto* __restrict cond_raw_data =
315
88
                        assert_cast<const ColumnUInt8*, TypeCheckOnRelease::DISABLE>(
316
88
                                raw_when_column.get())
317
88
                                ->get_data()
318
88
                                .data();
319
16.6k
                for (int row_idx = 0; row_idx < rows_count; row_idx++) {
320
16.6k
                    then_idx_ptr[row_idx] |=
321
16.6k
                            (!then_idx_ptr[row_idx]) * cond_raw_data[row_idx] * column_idx;
322
16.6k
                }
323
88
            }
324
233
        }
325
326
316
        return _execute_update_result<IndexType>(then_idx_ptr, then_columns, rows_count);
327
316
    }
328
329
    bool _has_else_expr;
330
331
    inline static const std::string FUNCTION_NAME = "case";
332
    inline static const std::string EXPR_NAME = "vcase expr";
333
};
334
} // namespace doris