Coverage Report

Created: 2026-03-15 17:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exprs/function/function_fake.cpp
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
#include "exprs/function/function_fake.h"
19
20
#include <glog/logging.h>
21
22
#include <algorithm>
23
#include <boost/iterator/iterator_facade.hpp>
24
#include <memory>
25
#include <ostream>
26
#include <string>
27
28
#include "core/data_type/data_type_array.h"
29
#include "core/data_type/data_type_jsonb.h"
30
#include "core/data_type/data_type_map.h"
31
#include "core/data_type/data_type_nullable.h"
32
#include "core/data_type/data_type_number.h"
33
#include "core/data_type/data_type_string.h"
34
#include "core/data_type/data_type_struct.h"
35
#include "core/data_type/data_type_variant.h"
36
#include "exprs/aggregate/aggregate_function.h"
37
#include "exprs/function/function_helpers.h"
38
#include "exprs/function/simple_function_factory.h"
39
#include "exprs/table_function/table_function.h"
40
41
namespace doris {
42
43
template <typename ReturnType, bool AlwaysNullable = false, bool VARIADIC = false>
44
struct FunctionFakeBaseImpl {
45
0
    static DataTypePtr get_return_type_impl(const DataTypes& arguments) {
46
0
        if constexpr (AlwaysNullable) {
47
0
            return make_nullable(std::make_shared<ReturnType>());
48
0
        }
49
0
        return std::make_shared<ReturnType>();
50
0
    }
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE2EEELb0ELb0EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeStringELb0ELb0EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeStringELb1ELb0EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEELb0ELb0EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEELb1ELb0EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEELb0ELb0EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEELb1ELb0EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_13DataTypeJsonbELb0ELb1EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_13DataTypeJsonbELb1ELb1EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeStringELb0ELb1EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeStringELb1ELb1EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEELb0ELb0EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEELb1ELb0EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS9_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_15DataTypeVariantELb0ELb0EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_15DataTypeVariantELb1ELb0EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS7_EE
51
18
    static DataTypes get_variadic_argument_types() {
52
18
        if constexpr (VARIADIC) {
53
4
            return {std::make_shared<ReturnType>()};
54
14
        } else {
55
14
            return {};
56
14
        }
57
18
    }
_ZN5doris20FunctionFakeBaseImplINS_14DataTypeStringELb0ELb0EE27get_variadic_argument_typesEv
Line
Count
Source
51
2
    static DataTypes get_variadic_argument_types() {
52
        if constexpr (VARIADIC) {
53
            return {std::make_shared<ReturnType>()};
54
2
        } else {
55
2
            return {};
56
2
        }
57
2
    }
_ZN5doris20FunctionFakeBaseImplINS_14DataTypeStringELb1ELb0EE27get_variadic_argument_typesEv
Line
Count
Source
51
2
    static DataTypes get_variadic_argument_types() {
52
        if constexpr (VARIADIC) {
53
            return {std::make_shared<ReturnType>()};
54
2
        } else {
55
2
            return {};
56
2
        }
57
2
    }
_ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEELb0ELb0EE27get_variadic_argument_typesEv
Line
Count
Source
51
1
    static DataTypes get_variadic_argument_types() {
52
        if constexpr (VARIADIC) {
53
            return {std::make_shared<ReturnType>()};
54
1
        } else {
55
1
            return {};
56
1
        }
57
1
    }
_ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEELb1ELb0EE27get_variadic_argument_typesEv
Line
Count
Source
51
1
    static DataTypes get_variadic_argument_types() {
52
        if constexpr (VARIADIC) {
53
            return {std::make_shared<ReturnType>()};
54
1
        } else {
55
1
            return {};
56
1
        }
57
1
    }
_ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEELb0ELb0EE27get_variadic_argument_typesEv
Line
Count
Source
51
2
    static DataTypes get_variadic_argument_types() {
52
        if constexpr (VARIADIC) {
53
            return {std::make_shared<ReturnType>()};
54
2
        } else {
55
2
            return {};
56
2
        }
57
2
    }
_ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEELb1ELb0EE27get_variadic_argument_typesEv
Line
Count
Source
51
2
    static DataTypes get_variadic_argument_types() {
52
        if constexpr (VARIADIC) {
53
            return {std::make_shared<ReturnType>()};
54
2
        } else {
55
2
            return {};
56
2
        }
57
2
    }
_ZN5doris20FunctionFakeBaseImplINS_13DataTypeJsonbELb0ELb1EE27get_variadic_argument_typesEv
Line
Count
Source
51
1
    static DataTypes get_variadic_argument_types() {
52
1
        if constexpr (VARIADIC) {
53
1
            return {std::make_shared<ReturnType>()};
54
        } else {
55
            return {};
56
        }
57
1
    }
_ZN5doris20FunctionFakeBaseImplINS_13DataTypeJsonbELb1ELb1EE27get_variadic_argument_typesEv
Line
Count
Source
51
1
    static DataTypes get_variadic_argument_types() {
52
1
        if constexpr (VARIADIC) {
53
1
            return {std::make_shared<ReturnType>()};
54
        } else {
55
            return {};
56
        }
57
1
    }
_ZN5doris20FunctionFakeBaseImplINS_14DataTypeStringELb0ELb1EE27get_variadic_argument_typesEv
Line
Count
Source
51
1
    static DataTypes get_variadic_argument_types() {
52
1
        if constexpr (VARIADIC) {
53
1
            return {std::make_shared<ReturnType>()};
54
        } else {
55
            return {};
56
        }
57
1
    }
_ZN5doris20FunctionFakeBaseImplINS_14DataTypeStringELb1ELb1EE27get_variadic_argument_typesEv
Line
Count
Source
51
1
    static DataTypes get_variadic_argument_types() {
52
1
        if constexpr (VARIADIC) {
53
1
            return {std::make_shared<ReturnType>()};
54
        } else {
55
            return {};
56
        }
57
1
    }
_ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEELb0ELb0EE27get_variadic_argument_typesEv
Line
Count
Source
51
1
    static DataTypes get_variadic_argument_types() {
52
        if constexpr (VARIADIC) {
53
            return {std::make_shared<ReturnType>()};
54
1
        } else {
55
1
            return {};
56
1
        }
57
1
    }
_ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEELb1ELb0EE27get_variadic_argument_typesEv
Line
Count
Source
51
1
    static DataTypes get_variadic_argument_types() {
52
        if constexpr (VARIADIC) {
53
            return {std::make_shared<ReturnType>()};
54
1
        } else {
55
1
            return {};
56
1
        }
57
1
    }
_ZN5doris20FunctionFakeBaseImplINS_15DataTypeVariantELb0ELb0EE27get_variadic_argument_typesEv
Line
Count
Source
51
1
    static DataTypes get_variadic_argument_types() {
52
        if constexpr (VARIADIC) {
53
            return {std::make_shared<ReturnType>()};
54
1
        } else {
55
1
            return {};
56
1
        }
57
1
    }
_ZN5doris20FunctionFakeBaseImplINS_15DataTypeVariantELb1ELb0EE27get_variadic_argument_typesEv
Line
Count
Source
51
1
    static DataTypes get_variadic_argument_types() {
52
        if constexpr (VARIADIC) {
53
            return {std::make_shared<ReturnType>()};
54
1
        } else {
55
1
            return {};
56
1
        }
57
1
    }
58
0
    static std::string get_error_msg() { return "Fake function do not support execute"; }
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeStringELb0ELb0EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeStringELb1ELb0EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEELb0ELb0EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEELb1ELb0EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEELb0ELb0EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEELb1ELb0EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_13DataTypeJsonbELb0ELb1EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_13DataTypeJsonbELb1ELb1EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeStringELb0ELb1EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeStringELb1ELb1EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEELb0ELb0EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEELb1ELb0EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_15DataTypeVariantELb0ELb0EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris20FunctionFakeBaseImplINS_15DataTypeVariantELb1ELb0EE13get_error_msgB5cxx11Ev
59
};
60
61
struct FunctionExplode {
62
0
    static DataTypePtr get_return_type_impl(const DataTypes& arguments) {
63
0
        DCHECK(arguments[0]->get_primitive_type() == TYPE_ARRAY)
64
0
                << arguments[0]->get_name() << " not supported";
65
0
        return make_nullable(
66
0
                check_and_get_data_type<DataTypeArray>(arguments[0].get())->get_nested_type());
67
0
    }
68
2
    static DataTypes get_variadic_argument_types() { return {}; }
69
0
    static std::string get_error_msg() { return "Fake function do not support execute"; }
70
};
71
72
struct FunctionExplodeV2 {
73
2
    static DataTypePtr get_return_type_impl(const DataTypes& arguments) {
74
2
        DataTypes fieldTypes(arguments.size());
75
4
        for (int i = 0; i < arguments.size(); i++) {
76
2
            if (arguments[i]->get_primitive_type() == PrimitiveType::TYPE_VARIANT) {
77
0
                if (arguments[i]->is_nullable()) {
78
0
                    fieldTypes[i] = arguments[i];
79
0
                } else {
80
0
                    fieldTypes[i] = make_nullable(arguments[i]);
81
0
                }
82
2
            } else {
83
2
                auto nestedType = check_and_get_data_type<DataTypeArray>(arguments[i].get())
84
2
                                          ->get_nested_type();
85
2
                if (nestedType->is_nullable()) {
86
2
                    fieldTypes[i] = nestedType;
87
2
                } else {
88
0
                    fieldTypes[i] = make_nullable(nestedType);
89
0
                }
90
2
            }
91
2
        }
92
93
2
        if (fieldTypes.size() > 1) {
94
0
            return make_nullable(std::make_shared<DataTypeStruct>(fieldTypes));
95
2
        } else {
96
2
            return make_nullable(fieldTypes[0]);
97
2
        }
98
2
    }
99
3
    static DataTypes get_variadic_argument_types() { return {}; }
100
0
    static std::string get_error_msg() { return "Fake function do not support execute"; }
101
};
102
103
// explode map: make map k,v as struct field
104
struct FunctionExplodeMap {
105
0
    static DataTypePtr get_return_type_impl(const DataTypes& arguments) {
106
0
        DCHECK(arguments[0]->get_primitive_type() == TYPE_MAP)
107
0
                << arguments[0]->get_name() << " not supported";
108
0
        DataTypes fieldTypes(2);
109
0
        fieldTypes[0] = check_and_get_data_type<DataTypeMap>(arguments[0].get())->get_key_type();
110
0
        fieldTypes[1] = check_and_get_data_type<DataTypeMap>(arguments[0].get())->get_value_type();
111
0
        return make_nullable(std::make_shared<DataTypeStruct>(fieldTypes));
112
0
    }
113
2
    static DataTypes get_variadic_argument_types() { return {}; }
114
0
    static std::string get_error_msg() { return "Fake function do not support execute"; }
115
};
116
117
template <bool AlwaysNullable = false>
118
struct FunctionPoseExplode {
119
0
    static DataTypePtr get_return_type_impl(const DataTypes& arguments) {
120
0
        DataTypes fieldTypes(arguments.size() + 1);
121
0
        fieldTypes[0] = std::make_shared<DataTypeInt32>();
122
0
        for (int i = 0; i < arguments.size(); i++) {
123
0
            DCHECK_EQ(arguments[i]->get_primitive_type(), TYPE_ARRAY)
124
0
                    << arguments[i]->get_name() << " not supported";
125
0
            auto nestedType =
126
0
                    check_and_get_data_type<DataTypeArray>(arguments[i].get())->get_nested_type();
127
0
            fieldTypes[i + 1] = make_nullable(nestedType);
128
0
        }
129
0
        auto struct_type = std::make_shared<DataTypeStruct>(fieldTypes);
130
0
        if constexpr (AlwaysNullable) {
131
0
            return make_nullable(struct_type);
132
0
        } else {
133
0
            return struct_type;
134
0
        }
135
0
    }
Unexecuted instantiation: _ZN5doris19FunctionPoseExplodeILb0EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE
Unexecuted instantiation: _ZN5doris19FunctionPoseExplodeILb1EE20get_return_type_implERKSt6vectorISt10shared_ptrIKNS_9IDataTypeEESaIS6_EE
136
2
    static DataTypes get_variadic_argument_types() { return {}; }
_ZN5doris19FunctionPoseExplodeILb0EE27get_variadic_argument_typesEv
Line
Count
Source
136
1
    static DataTypes get_variadic_argument_types() { return {}; }
_ZN5doris19FunctionPoseExplodeILb1EE27get_variadic_argument_typesEv
Line
Count
Source
136
1
    static DataTypes get_variadic_argument_types() { return {}; }
137
0
    static std::string get_error_msg() { return "Fake function do not support execute"; }
Unexecuted instantiation: _ZN5doris19FunctionPoseExplodeILb0EE13get_error_msgB5cxx11Ev
Unexecuted instantiation: _ZN5doris19FunctionPoseExplodeILb1EE13get_error_msgB5cxx11Ev
138
};
139
140
// explode json-object: expands json-object to struct with a pair of key and value in column string
141
struct FunctionExplodeJsonObject {
142
0
    static DataTypePtr get_return_type_impl(const DataTypes& arguments) {
143
0
        DCHECK_EQ(arguments[0]->get_primitive_type(), PrimitiveType::TYPE_JSONB)
144
0
                << " explode json object " << arguments[0]->get_name() << " not supported";
145
0
        DataTypes fieldTypes(2);
146
0
        fieldTypes[0] = make_nullable(std::make_shared<DataTypeString>());
147
0
        fieldTypes[1] = make_nullable(std::make_shared<DataTypeJsonb>());
148
0
        return make_nullable(std::make_shared<DataTypeStruct>(fieldTypes));
149
0
    }
150
2
    static DataTypes get_variadic_argument_types() { return {}; }
151
0
    static std::string get_error_msg() { return "Fake function do not support execute"; }
152
};
153
154
struct FunctionEsquery {
155
0
    static DataTypePtr get_return_type_impl(const DataTypes& arguments) {
156
0
        return FunctionFakeBaseImpl<DataTypeUInt8>::get_return_type_impl(arguments);
157
0
    }
158
1
    static DataTypes get_variadic_argument_types() { return {}; }
159
0
    static std::string get_error_msg() { return "esquery only supported on es table"; }
160
};
161
162
template <typename FunctionImpl>
163
1
void register_function(SimpleFunctionFactory& factory, const std::string& name) {
164
1
    factory.register_function<FunctionFake<FunctionImpl>>(name);
165
1
};
166
167
template <typename FunctionImpl>
168
void register_table_function_expand(SimpleFunctionFactory& factory, const std::string& name,
169
3
                                    const std::string& suffix) {
170
3
    factory.register_function<FunctionFake<FunctionImpl>>(name);
171
3
    factory.register_function<FunctionFake<FunctionImpl>>(name + suffix);
172
3
};
_ZN5doris30register_table_function_expandINS_17FunctionExplodeV2EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_
Line
Count
Source
169
1
                                    const std::string& suffix) {
170
1
    factory.register_function<FunctionFake<FunctionImpl>>(name);
171
1
    factory.register_function<FunctionFake<FunctionImpl>>(name + suffix);
172
1
};
_ZN5doris30register_table_function_expandINS_18FunctionExplodeMapEEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_
Line
Count
Source
169
1
                                    const std::string& suffix) {
170
1
    factory.register_function<FunctionFake<FunctionImpl>>(name);
171
1
    factory.register_function<FunctionFake<FunctionImpl>>(name + suffix);
172
1
};
_ZN5doris30register_table_function_expandINS_25FunctionExplodeJsonObjectEEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_
Line
Count
Source
169
1
                                    const std::string& suffix) {
170
1
    factory.register_function<FunctionFake<FunctionImpl>>(name);
171
1
    factory.register_function<FunctionFake<FunctionImpl>>(name + suffix);
172
1
};
173
174
template <typename FunctionImpl>
175
void register_table_alternative_function_expand(SimpleFunctionFactory& factory,
176
                                                const std::string& name,
177
1
                                                const std::string& suffix) {
178
1
    factory.register_alternative_function<FunctionFake<FunctionImpl>>(name);
179
1
    factory.register_alternative_function<FunctionFake<FunctionImpl>>(name + suffix);
180
1
};
181
182
template <typename ReturnType, bool VARIADIC>
183
void register_table_function_expand_default(SimpleFunctionFactory& factory, const std::string& name,
184
8
                                            const std::string& suffix) {
185
8
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, false, VARIADIC>>>(
186
8
            name);
187
8
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, true, VARIADIC>>>(
188
8
            name + suffix);
189
8
};
_ZN5doris38register_table_function_expand_defaultINS_14DataTypeStringELb0EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_
Line
Count
Source
184
2
                                            const std::string& suffix) {
185
2
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, false, VARIADIC>>>(
186
2
            name);
187
2
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, true, VARIADIC>>>(
188
2
            name + suffix);
189
2
};
_ZN5doris38register_table_function_expand_defaultINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEELb0EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_
Line
Count
Source
184
1
                                            const std::string& suffix) {
185
1
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, false, VARIADIC>>>(
186
1
            name);
187
1
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, true, VARIADIC>>>(
188
1
            name + suffix);
189
1
};
_ZN5doris38register_table_function_expand_defaultINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEELb0EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_
Line
Count
Source
184
2
                                            const std::string& suffix) {
185
2
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, false, VARIADIC>>>(
186
2
            name);
187
2
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, true, VARIADIC>>>(
188
2
            name + suffix);
189
2
};
_ZN5doris38register_table_function_expand_defaultINS_13DataTypeJsonbELb1EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_
Line
Count
Source
184
1
                                            const std::string& suffix) {
185
1
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, false, VARIADIC>>>(
186
1
            name);
187
1
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, true, VARIADIC>>>(
188
1
            name + suffix);
189
1
};
_ZN5doris38register_table_function_expand_defaultINS_14DataTypeStringELb1EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_
Line
Count
Source
184
1
                                            const std::string& suffix) {
185
1
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, false, VARIADIC>>>(
186
1
            name);
187
1
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, true, VARIADIC>>>(
188
1
            name + suffix);
189
1
};
_ZN5doris38register_table_function_expand_defaultINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEELb0EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_
Line
Count
Source
184
1
                                            const std::string& suffix) {
185
1
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, false, VARIADIC>>>(
186
1
            name);
187
1
    factory.register_function<FunctionFake<FunctionFakeBaseImpl<ReturnType, true, VARIADIC>>>(
188
1
            name + suffix);
189
1
};
190
191
template <typename ReturnType, bool VARIADIC>
192
void register_table_alternative_function_expand_default(SimpleFunctionFactory& factory,
193
                                                        const std::string& name,
194
1
                                                        const std::string& suffix) {
195
1
    factory.register_alternative_function<
196
1
            FunctionFake<FunctionFakeBaseImpl<ReturnType, false, VARIADIC>>>(name);
197
1
    factory.register_alternative_function<
198
1
            FunctionFake<FunctionFakeBaseImpl<ReturnType, true, VARIADIC>>>(name + suffix);
199
1
};
200
201
template <typename FunctionImpl>
202
3
void register_table_function_expand_outer(SimpleFunctionFactory& factory, const std::string& name) {
203
3
    register_table_function_expand<FunctionImpl>(factory, name, COMBINATOR_SUFFIX_OUTER);
204
3
};
_ZN5doris36register_table_function_expand_outerINS_17FunctionExplodeV2EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
Line
Count
Source
202
1
void register_table_function_expand_outer(SimpleFunctionFactory& factory, const std::string& name) {
203
1
    register_table_function_expand<FunctionImpl>(factory, name, COMBINATOR_SUFFIX_OUTER);
204
1
};
_ZN5doris36register_table_function_expand_outerINS_18FunctionExplodeMapEEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
Line
Count
Source
202
1
void register_table_function_expand_outer(SimpleFunctionFactory& factory, const std::string& name) {
203
1
    register_table_function_expand<FunctionImpl>(factory, name, COMBINATOR_SUFFIX_OUTER);
204
1
};
_ZN5doris36register_table_function_expand_outerINS_25FunctionExplodeJsonObjectEEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
Line
Count
Source
202
1
void register_table_function_expand_outer(SimpleFunctionFactory& factory, const std::string& name) {
203
1
    register_table_function_expand<FunctionImpl>(factory, name, COMBINATOR_SUFFIX_OUTER);
204
1
};
205
206
template <typename FunctionImpl>
207
void register_table_alternative_function_expand_outer(SimpleFunctionFactory& factory,
208
1
                                                      const std::string& name) {
209
1
    register_table_alternative_function_expand<FunctionImpl>(factory, name,
210
1
                                                             COMBINATOR_SUFFIX_OUTER);
211
1
};
212
213
template <typename ReturnType, bool VARIADIC>
214
void register_table_function_expand_outer_default(SimpleFunctionFactory& factory,
215
8
                                                  const std::string& name) {
216
8
    register_table_function_expand_default<ReturnType, VARIADIC>(factory, name,
217
8
                                                                 COMBINATOR_SUFFIX_OUTER);
218
8
};
_ZN5doris44register_table_function_expand_outer_defaultINS_14DataTypeStringELb0EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
Line
Count
Source
215
2
                                                  const std::string& name) {
216
2
    register_table_function_expand_default<ReturnType, VARIADIC>(factory, name,
217
2
                                                                 COMBINATOR_SUFFIX_OUTER);
218
2
};
_ZN5doris44register_table_function_expand_outer_defaultINS_14DataTypeNumberILNS_13PrimitiveTypeE5EEELb0EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
Line
Count
Source
215
1
                                                  const std::string& name) {
216
1
    register_table_function_expand_default<ReturnType, VARIADIC>(factory, name,
217
1
                                                                 COMBINATOR_SUFFIX_OUTER);
218
1
};
_ZN5doris44register_table_function_expand_outer_defaultINS_14DataTypeNumberILNS_13PrimitiveTypeE6EEELb0EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
Line
Count
Source
215
2
                                                  const std::string& name) {
216
2
    register_table_function_expand_default<ReturnType, VARIADIC>(factory, name,
217
2
                                                                 COMBINATOR_SUFFIX_OUTER);
218
2
};
_ZN5doris44register_table_function_expand_outer_defaultINS_13DataTypeJsonbELb1EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
Line
Count
Source
215
1
                                                  const std::string& name) {
216
1
    register_table_function_expand_default<ReturnType, VARIADIC>(factory, name,
217
1
                                                                 COMBINATOR_SUFFIX_OUTER);
218
1
};
_ZN5doris44register_table_function_expand_outer_defaultINS_14DataTypeStringELb1EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
Line
Count
Source
215
1
                                                  const std::string& name) {
216
1
    register_table_function_expand_default<ReturnType, VARIADIC>(factory, name,
217
1
                                                                 COMBINATOR_SUFFIX_OUTER);
218
1
};
_ZN5doris44register_table_function_expand_outer_defaultINS_14DataTypeNumberILNS_13PrimitiveTypeE9EEELb0EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
Line
Count
Source
215
1
                                                  const std::string& name) {
216
1
    register_table_function_expand_default<ReturnType, VARIADIC>(factory, name,
217
1
                                                                 COMBINATOR_SUFFIX_OUTER);
218
1
};
219
220
template <typename ReturnType, bool VARIADIC>
221
void register_table_alternative_function_expand_outer_default(SimpleFunctionFactory& factory,
222
1
                                                              const std::string& name) {
223
1
    register_table_alternative_function_expand_default<ReturnType, VARIADIC>(
224
1
            factory, name, COMBINATOR_SUFFIX_OUTER);
225
1
};
226
227
template <typename FunctionImpl>
228
void register_table_function_with_impl(SimpleFunctionFactory& factory, const std::string& name,
229
3
                                       const std::string& suffix = "") {
230
3
    factory.register_function<FunctionFake<FunctionImpl>>(name + suffix);
231
3
};
_ZN5doris33register_table_function_with_implINS_19FunctionPoseExplodeILb0EEEEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_
Line
Count
Source
229
1
                                       const std::string& suffix = "") {
230
1
    factory.register_function<FunctionFake<FunctionImpl>>(name + suffix);
231
1
};
_ZN5doris33register_table_function_with_implINS_19FunctionPoseExplodeILb1EEEEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_
Line
Count
Source
229
1
                                       const std::string& suffix = "") {
230
1
    factory.register_function<FunctionFake<FunctionImpl>>(name + suffix);
231
1
};
_ZN5doris33register_table_function_with_implINS_17FunctionExplodeV2EEEvRNS_21SimpleFunctionFactoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_
Line
Count
Source
229
1
                                       const std::string& suffix = "") {
230
1
    factory.register_function<FunctionFake<FunctionImpl>>(name + suffix);
231
1
};
232
233
1
void register_function_fake(SimpleFunctionFactory& factory) {
234
1
    register_function<FunctionEsquery>(factory, "esquery");
235
236
1
    register_table_function_expand_outer<FunctionExplodeV2>(factory, "explode");
237
1
    register_table_alternative_function_expand_outer<FunctionExplode>(factory, "explode");
238
239
1
    register_table_function_expand_outer<FunctionExplodeMap>(factory, "explode_map");
240
241
1
    register_table_function_expand_outer<FunctionExplodeJsonObject>(factory, "explode_json_object");
242
1
    register_table_function_expand_outer_default<DataTypeString, false>(factory, "explode_split");
243
1
    register_table_function_expand_outer_default<DataTypeInt32, false>(factory, "explode_numbers");
244
1
    register_table_function_expand_outer_default<DataTypeInt64, false>(factory,
245
1
                                                                       "explode_json_array_int");
246
1
    register_table_function_expand_outer_default<DataTypeString, false>(
247
1
            factory, "explode_json_array_string");
248
1
    register_table_function_expand_outer_default<DataTypeJsonb, true>(factory,
249
1
                                                                      "explode_json_array_json");
250
1
    register_table_function_expand_outer_default<DataTypeString, true>(factory,
251
1
                                                                       "explode_json_array_json");
252
1
    register_table_function_expand_outer_default<DataTypeFloat64, false>(
253
1
            factory, "explode_json_array_double");
254
1
    register_table_function_expand_outer_default<DataTypeInt64, false>(factory, "explode_bitmap");
255
1
    register_table_function_with_impl<FunctionPoseExplode<false>>(factory, "posexplode");
256
1
    register_table_function_with_impl<FunctionPoseExplode<true>>(factory, "posexplode",
257
1
                                                                 COMBINATOR_SUFFIX_OUTER);
258
1
    register_table_alternative_function_expand_outer_default<DataTypeVariant, false>(
259
1
            factory, "explode_variant_array");
260
1
    register_table_function_with_impl<FunctionExplodeV2>(factory, "explode_variant_array");
261
1
}
262
263
} // namespace doris