Coverage Report

Created: 2026-01-14 00:04

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/root/doris/be/src/vec/exprs/vexpr.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 "vec/exprs/vexpr.h"
19
20
#include <fmt/format.h>
21
#include <gen_cpp/Exprs_types.h>
22
#include <gen_cpp/FrontendService_types.h>
23
#include <thrift/protocol/TDebugProtocol.h>
24
25
#include <algorithm>
26
#include <boost/algorithm/string/split.hpp>
27
#include <boost/iterator/iterator_facade.hpp>
28
#include <cstdint>
29
#include <memory>
30
#include <stack>
31
#include <string_view>
32
#include <utility>
33
34
#include "common/config.h"
35
#include "common/exception.h"
36
#include "common/status.h"
37
#include "olap/inverted_index_parser.h"
38
#include "olap/rowset/segment_v2/ann_index/ann_search_params.h"
39
#include "olap/rowset/segment_v2/ann_index/ann_topn_runtime.h"
40
#include "olap/rowset/segment_v2/column_reader.h"
41
#include "pipeline/pipeline_task.h"
42
#include "runtime/define_primitive_type.h"
43
#include "vec/columns/column_vector.h"
44
#include "vec/core/field.h"
45
#include "vec/data_types/data_type_array.h"
46
#include "vec/data_types/data_type_decimal.h"
47
#include "vec/data_types/data_type_factory.hpp"
48
#include "vec/data_types/data_type_nullable.h"
49
#include "vec/data_types/data_type_number.h"
50
#include "vec/exprs/varray_literal.h"
51
#include "vec/exprs/vcase_expr.h"
52
#include "vec/exprs/vcast_expr.h"
53
#include "vec/exprs/vcolumn_ref.h"
54
#include "vec/exprs/vcompound_pred.h"
55
#include "vec/exprs/vcondition_expr.h"
56
#include "vec/exprs/vectorized_fn_call.h"
57
#include "vec/exprs/vexpr_context.h"
58
#include "vec/exprs/vexpr_fwd.h"
59
#include "vec/exprs/vin_predicate.h"
60
#include "vec/exprs/vinfo_func.h"
61
#include "vec/exprs/virtual_slot_ref.h"
62
#include "vec/exprs/vlambda_function_call_expr.h"
63
#include "vec/exprs/vlambda_function_expr.h"
64
#include "vec/exprs/vliteral.h"
65
#include "vec/exprs/vmap_literal.h"
66
#include "vec/exprs/vmatch_predicate.h"
67
#include "vec/exprs/vsearch.h"
68
#include "vec/exprs/vslot_ref.h"
69
#include "vec/exprs/vstruct_literal.h"
70
#include "vec/runtime/timestamptz_value.h"
71
#include "vec/utils/util.hpp"
72
73
namespace doris {
74
#include "common/compile_check_begin.h"
75
76
class RowDescriptor;
77
class RuntimeState;
78
79
// NOLINTBEGIN(readability-function-cognitive-complexity)
80
// NOLINTBEGIN(readability-function-size)
81
TExprNode create_texpr_node_from(const void* data, const PrimitiveType& type, int precision,
82
17
                                 int scale) {
83
17
    TExprNode node;
84
85
17
    switch (type) {
86
0
    case TYPE_BOOLEAN: {
87
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_BOOLEAN>(data, &node));
88
0
        break;
89
0
    }
90
0
    case TYPE_TINYINT: {
91
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_TINYINT>(data, &node));
92
0
        break;
93
0
    }
94
0
    case TYPE_SMALLINT: {
95
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_SMALLINT>(data, &node));
96
0
        break;
97
0
    }
98
5
    case TYPE_INT: {
99
5
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_INT>(data, &node));
100
5
        break;
101
5
    }
102
11
    case TYPE_BIGINT: {
103
11
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_BIGINT>(data, &node));
104
11
        break;
105
11
    }
106
11
    case TYPE_LARGEINT: {
107
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_LARGEINT>(data, &node));
108
0
        break;
109
0
    }
110
0
    case TYPE_FLOAT: {
111
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_FLOAT>(data, &node));
112
0
        break;
113
0
    }
114
0
    case TYPE_DOUBLE: {
115
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DOUBLE>(data, &node));
116
0
        break;
117
0
    }
118
0
    case TYPE_DATEV2: {
119
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DATEV2>(data, &node));
120
0
        break;
121
0
    }
122
0
    case TYPE_DATETIMEV2: {
123
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DATETIMEV2>(data, &node, precision, scale));
124
0
        break;
125
0
    }
126
0
    case TYPE_DATE: {
127
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DATE>(data, &node));
128
0
        break;
129
0
    }
130
0
    case TYPE_DATETIME: {
131
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DATETIME>(data, &node));
132
0
        break;
133
0
    }
134
0
    case TYPE_DECIMALV2: {
135
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DECIMALV2>(data, &node, precision, scale));
136
0
        break;
137
0
    }
138
0
    case TYPE_DECIMAL32: {
139
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DECIMAL32>(data, &node, precision, scale));
140
0
        break;
141
0
    }
142
0
    case TYPE_DECIMAL64: {
143
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DECIMAL64>(data, &node, precision, scale));
144
0
        break;
145
0
    }
146
0
    case TYPE_DECIMAL128I: {
147
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DECIMAL128I>(data, &node, precision, scale));
148
0
        break;
149
0
    }
150
0
    case TYPE_DECIMAL256: {
151
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DECIMAL256>(data, &node, precision, scale));
152
0
        break;
153
0
    }
154
0
    case TYPE_CHAR: {
155
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_CHAR>(data, &node));
156
0
        break;
157
0
    }
158
0
    case TYPE_VARCHAR: {
159
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_VARCHAR>(data, &node));
160
0
        break;
161
0
    }
162
0
    case TYPE_STRING: {
163
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_STRING>(data, &node));
164
0
        break;
165
0
    }
166
0
    case TYPE_IPV4: {
167
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_IPV4>(data, &node));
168
0
        break;
169
0
    }
170
0
    case TYPE_IPV6: {
171
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_IPV6>(data, &node));
172
0
        break;
173
0
    }
174
0
    case TYPE_TIMEV2: {
175
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_TIMEV2>(data, &node, precision, scale));
176
0
        break;
177
0
    }
178
1
    case TYPE_TIMESTAMPTZ: {
179
1
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_TIMESTAMPTZ>(data, &node, precision, scale));
180
1
        break;
181
1
    }
182
1
    default:
183
0
        throw Exception(ErrorCode::INTERNAL_ERROR, "runtime filter meet invalid type {}",
184
0
                        int(type));
185
17
    }
186
17
    return node;
187
17
}
188
189
TExprNode create_texpr_node_from(const vectorized::Field& field, const PrimitiveType& type,
190
23
                                 int precision, int scale) {
191
23
    TExprNode node;
192
23
    switch (type) {
193
1
    case TYPE_BOOLEAN: {
194
1
        const auto& storage =
195
1
                static_cast<bool>(field.get<typename PrimitiveTypeTraits<TYPE_BOOLEAN>::CppType>());
196
1
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_BOOLEAN>(&storage, &node));
197
1
        break;
198
1
    }
199
1
    case TYPE_TINYINT: {
200
0
        const auto& storage = static_cast<int8_t>(
201
0
                field.get<typename PrimitiveTypeTraits<TYPE_TINYINT>::CppType>());
202
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_TINYINT>(&storage, &node));
203
0
        break;
204
0
    }
205
1
    case TYPE_SMALLINT: {
206
1
        const auto& storage = static_cast<int16_t>(
207
1
                field.get<typename PrimitiveTypeTraits<TYPE_SMALLINT>::CppType>());
208
1
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_SMALLINT>(&storage, &node));
209
1
        break;
210
1
    }
211
1
    case TYPE_INT: {
212
1
        const auto& storage =
213
1
                static_cast<int32_t>(field.get<typename PrimitiveTypeTraits<TYPE_INT>::CppType>());
214
1
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_INT>(&storage, &node));
215
1
        break;
216
1
    }
217
1
    case TYPE_BIGINT: {
218
1
        const auto& storage = static_cast<int64_t>(
219
1
                field.get<typename PrimitiveTypeTraits<TYPE_BIGINT>::CppType>());
220
1
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_BIGINT>(&storage, &node));
221
1
        break;
222
1
    }
223
1
    case TYPE_LARGEINT: {
224
1
        const auto& storage = static_cast<int128_t>(
225
1
                field.get<typename PrimitiveTypeTraits<TYPE_LARGEINT>::CppType>());
226
1
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_LARGEINT>(&storage, &node));
227
1
        break;
228
1
    }
229
1
    case TYPE_FLOAT: {
230
1
        const auto& storage =
231
1
                static_cast<float>(field.get<typename PrimitiveTypeTraits<TYPE_FLOAT>::CppType>());
232
1
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_FLOAT>(&storage, &node));
233
1
        break;
234
1
    }
235
1
    case TYPE_DOUBLE: {
236
1
        const auto& storage = static_cast<double>(
237
1
                field.get<typename PrimitiveTypeTraits<TYPE_DOUBLE>::CppType>());
238
1
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DOUBLE>(&storage, &node));
239
1
        break;
240
1
    }
241
1
    case TYPE_DATEV2: {
242
1
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_DATEV2>::CppType>();
243
244
1
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DATEV2>(&storage, &node));
245
1
        break;
246
1
    }
247
1
    case TYPE_DATETIMEV2: {
248
1
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_DATETIMEV2>::CppType>();
249
1
        THROW_IF_ERROR(
250
1
                create_texpr_literal_node<TYPE_DATETIMEV2>(&storage, &node, precision, scale));
251
1
        break;
252
1
    }
253
1
    case TYPE_TIMESTAMPTZ: {
254
1
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_TIMESTAMPTZ>::CppType>();
255
256
1
        THROW_IF_ERROR(
257
1
                create_texpr_literal_node<TYPE_TIMESTAMPTZ>(&storage, &node, precision, scale));
258
1
        break;
259
1
    }
260
1
    case TYPE_DATE: {
261
1
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_DATE>::CppType>();
262
1
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DATE>(&storage, &node));
263
1
        break;
264
1
    }
265
1
    case TYPE_DATETIME: {
266
1
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_DATETIME>::CppType>();
267
1
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_DATETIME>(&storage, &node));
268
1
        break;
269
1
    }
270
1
    case TYPE_DECIMALV2: {
271
1
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_DECIMALV2>::CppType>();
272
273
1
        THROW_IF_ERROR(
274
1
                create_texpr_literal_node<TYPE_DECIMALV2>(&storage, &node, precision, scale));
275
1
        break;
276
1
    }
277
2
    case TYPE_DECIMAL32: {
278
2
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_DECIMAL32>::CppType>();
279
2
        THROW_IF_ERROR(
280
2
                create_texpr_literal_node<TYPE_DECIMAL32>(&storage, &node, precision, scale));
281
2
        break;
282
2
    }
283
2
    case TYPE_DECIMAL64: {
284
2
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_DECIMAL64>::CppType>();
285
2
        THROW_IF_ERROR(
286
2
                create_texpr_literal_node<TYPE_DECIMAL64>(&storage, &node, precision, scale));
287
2
        break;
288
2
    }
289
2
    case TYPE_DECIMAL128I: {
290
2
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_DECIMAL128I>::CppType>();
291
2
        THROW_IF_ERROR(
292
2
                create_texpr_literal_node<TYPE_DECIMAL128I>(&storage, &node, precision, scale));
293
2
        break;
294
2
    }
295
2
    case TYPE_DECIMAL256: {
296
2
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_DECIMAL256>::CppType>();
297
2
        THROW_IF_ERROR(
298
2
                create_texpr_literal_node<TYPE_DECIMAL256>(&storage, &node, precision, scale));
299
2
        break;
300
2
    }
301
2
    case TYPE_CHAR: {
302
0
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_CHAR>::CppType>();
303
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_CHAR>(&storage, &node));
304
0
        break;
305
0
    }
306
0
    case TYPE_VARCHAR: {
307
0
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_VARCHAR>::CppType>();
308
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_VARCHAR>(&storage, &node));
309
0
        break;
310
0
    }
311
1
    case TYPE_STRING: {
312
1
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_STRING>::CppType>();
313
1
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_STRING>(&storage, &node));
314
1
        break;
315
1
    }
316
1
    case TYPE_IPV4: {
317
0
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_IPV4>::CppType>();
318
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_IPV4>(&storage, &node));
319
0
        break;
320
0
    }
321
0
    case TYPE_IPV6: {
322
0
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_IPV6>::CppType>();
323
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_IPV6>(&storage, &node));
324
0
        break;
325
0
    }
326
1
    case TYPE_TIMEV2: {
327
1
        const auto& storage = field.get<typename PrimitiveTypeTraits<TYPE_TIMEV2>::CppType>();
328
1
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_TIMEV2>(&storage, &node));
329
1
        break;
330
1
    }
331
1
    case TYPE_VARBINARY: {
332
0
        const auto& svf = field.get<typename PrimitiveTypeTraits<TYPE_VARBINARY>::CppType>();
333
0
        THROW_IF_ERROR(create_texpr_literal_node<TYPE_VARBINARY>(&svf, &node));
334
0
        break;
335
0
    }
336
0
    default:
337
0
        throw Exception(ErrorCode::INTERNAL_ERROR, "runtime filter meet invalid type {}",
338
0
                        int(type));
339
23
    }
340
23
    return node;
341
23
}
342
343
// NOLINTEND(readability-function-size)
344
// NOLINTEND(readability-function-cognitive-complexity)
345
} // namespace doris
346
347
namespace doris::vectorized {
348
349
0
bool VExpr::is_acting_on_a_slot(const VExpr& expr) {
350
0
    const auto& children = expr.children();
351
352
0
    auto is_a_slot = std::any_of(children.begin(), children.end(),
353
0
                                 [](const auto& child) { return is_acting_on_a_slot(*child); });
354
355
0
    return is_a_slot ? true
356
0
                     : (expr.node_type() == TExprNodeType::SLOT_REF ||
357
0
                        expr.node_type() == TExprNodeType::VIRTUAL_SLOT_REF);
358
0
}
359
360
VExpr::VExpr(const TExprNode& node)
361
400k
        : _node_type(node.node_type),
362
400k
          _opcode(node.__isset.opcode ? node.opcode : TExprOpcode::INVALID_OPCODE) {
363
400k
    if (node.__isset.fn) {
364
72
        _fn = node.fn;
365
72
    }
366
367
400k
    bool is_nullable = true;
368
400k
    if (node.__isset.is_nullable) {
369
396k
        is_nullable = node.is_nullable;
370
396k
    }
371
    // If we define null literal ,should make nullable data type to get correct field instead of undefined ptr
372
400k
    if (node.node_type == TExprNodeType::NULL_LITERAL) {
373
1
        CHECK(is_nullable);
374
1
    }
375
400k
    _data_type = get_data_type_with_default_argument(
376
400k
            DataTypeFactory::instance().create_data_type(node.type, is_nullable));
377
400k
}
378
379
0
VExpr::VExpr(const VExpr& vexpr) = default;
380
381
VExpr::VExpr(DataTypePtr type, bool is_slotref)
382
9
        : _opcode(TExprOpcode::INVALID_OPCODE),
383
9
          _data_type(get_data_type_with_default_argument(type)) {
384
9
    if (is_slotref) {
385
0
        _node_type = TExprNodeType::SLOT_REF;
386
0
    }
387
9
}
388
389
258k
Status VExpr::prepare(RuntimeState* state, const RowDescriptor& row_desc, VExprContext* context) {
390
258k
    ++context->_depth_num;
391
258k
    if (context->_depth_num > config::max_depth_of_expr_tree) {
392
0
        return Status::Error<ErrorCode::EXCEEDED_LIMIT>(
393
0
                "The depth of the expression tree is too big, make it less than {}",
394
0
                config::max_depth_of_expr_tree);
395
0
    }
396
397
258k
    for (auto& i : _children) {
398
232
        RETURN_IF_ERROR(i->prepare(state, row_desc, context));
399
232
    }
400
258k
    --context->_depth_num;
401
#ifndef BE_TEST
402
    _enable_inverted_index_query = state->query_options().enable_inverted_index_query;
403
#endif
404
258k
    return Status::OK();
405
258k
}
406
407
Status VExpr::open(RuntimeState* state, VExprContext* context,
408
512k
                   FunctionContext::FunctionStateScope scope) {
409
512k
    for (auto& i : _children) {
410
66
        RETURN_IF_ERROR(i->open(state, context, scope));
411
66
    }
412
512k
    if (scope == FunctionContext::FRAGMENT_LOCAL) {
413
258k
        RETURN_IF_ERROR(VExpr::get_const_col(context, nullptr));
414
258k
    }
415
512k
    return Status::OK();
416
512k
}
417
418
514k
void VExpr::close(VExprContext* context, FunctionContext::FunctionStateScope scope) {
419
514k
    for (auto& i : _children) {
420
273
        i->close(context, scope);
421
273
    }
422
514k
}
423
424
// NOLINTBEGIN(readability-function-size)
425
400k
Status VExpr::create_expr(const TExprNode& expr_node, VExprSPtr& expr) {
426
400k
    try {
427
400k
        switch (expr_node.node_type) {
428
0
        case TExprNodeType::BOOL_LITERAL:
429
31
        case TExprNodeType::INT_LITERAL:
430
31
        case TExprNodeType::LARGE_INT_LITERAL:
431
32
        case TExprNodeType::IPV4_LITERAL:
432
32
        case TExprNodeType::IPV6_LITERAL:
433
143
        case TExprNodeType::FLOAT_LITERAL:
434
144
        case TExprNodeType::DECIMAL_LITERAL:
435
147
        case TExprNodeType::DATE_LITERAL:
436
147
        case TExprNodeType::TIMEV2_LITERAL:
437
153
        case TExprNodeType::STRING_LITERAL:
438
153
        case TExprNodeType::JSON_LITERAL:
439
153
        case TExprNodeType::VARBINARY_LITERAL:
440
154
        case TExprNodeType::NULL_LITERAL: {
441
154
            expr = VLiteral::create_shared(expr_node);
442
154
            break;
443
153
        }
444
13
        case TExprNodeType::ARRAY_LITERAL: {
445
13
            expr = VArrayLiteral::create_shared(expr_node);
446
13
            break;
447
153
        }
448
0
        case TExprNodeType::MAP_LITERAL: {
449
0
            expr = VMapLiteral::create_shared(expr_node);
450
0
            break;
451
153
        }
452
0
        case TExprNodeType::STRUCT_LITERAL: {
453
0
            expr = VStructLiteral::create_shared(expr_node);
454
0
            break;
455
153
        }
456
400k
        case TExprNodeType::SLOT_REF: {
457
400k
            if (expr_node.slot_ref.__isset.is_virtual_slot && expr_node.slot_ref.is_virtual_slot) {
458
11
                expr = VirtualSlotRef::create_shared(expr_node);
459
11
                expr->_node_type = TExprNodeType::VIRTUAL_SLOT_REF;
460
400k
            } else {
461
400k
                expr = VSlotRef::create_shared(expr_node);
462
400k
            }
463
400k
            break;
464
153
        }
465
0
        case TExprNodeType::COLUMN_REF: {
466
0
            expr = VColumnRef::create_shared(expr_node);
467
0
            break;
468
153
        }
469
17
        case TExprNodeType::COMPOUND_PRED: {
470
17
            expr = VCompoundPred::create_shared(expr_node);
471
17
            break;
472
153
        }
473
0
        case TExprNodeType::LAMBDA_FUNCTION_EXPR: {
474
0
            expr = VLambdaFunctionExpr::create_shared(expr_node);
475
0
            break;
476
153
        }
477
0
        case TExprNodeType::LAMBDA_FUNCTION_CALL_EXPR: {
478
0
            expr = VLambdaFunctionCallExpr::create_shared(expr_node);
479
0
            break;
480
153
        }
481
0
        case TExprNodeType::ARITHMETIC_EXPR:
482
44
        case TExprNodeType::BINARY_PRED:
483
45
        case TExprNodeType::NULL_AWARE_BINARY_PRED:
484
45
        case TExprNodeType::COMPUTE_FUNCTION_CALL: {
485
45
            expr = VectorizedFnCall::create_shared(expr_node);
486
45
            break;
487
45
        }
488
21
        case TExprNodeType::FUNCTION_CALL: {
489
21
            if (expr_node.fn.name.function_name == "if") {
490
0
                expr = VectorizedIfExpr::create_shared(expr_node);
491
0
                break;
492
21
            } else if (expr_node.fn.name.function_name == "ifnull" ||
493
21
                       expr_node.fn.name.function_name == "nvl") {
494
0
                expr = VectorizedIfNullExpr::create_shared(expr_node);
495
0
                break;
496
21
            } else if (expr_node.fn.name.function_name == "coalesce") {
497
0
                expr = VectorizedCoalesceExpr::create_shared(expr_node);
498
0
                break;
499
0
            }
500
21
            expr = VectorizedFnCall::create_shared(expr_node);
501
21
            break;
502
21
        }
503
0
        case TExprNodeType::MATCH_PRED: {
504
0
            expr = VMatchPredicate::create_shared(expr_node);
505
0
            break;
506
21
        }
507
2
        case TExprNodeType::CAST_EXPR: {
508
2
            expr = VCastExpr::create_shared(expr_node);
509
2
            break;
510
21
        }
511
0
        case TExprNodeType::TRY_CAST_EXPR: {
512
0
            expr = TryCastExpr::create_shared(expr_node);
513
0
            break;
514
21
        }
515
5
        case TExprNodeType::IN_PRED: {
516
5
            expr = VInPredicate::create_shared(expr_node);
517
5
            break;
518
21
        }
519
0
        case TExprNodeType::CASE_EXPR: {
520
0
            if (!expr_node.__isset.case_expr) {
521
0
                return Status::InternalError("Case expression not set in thrift node");
522
0
            }
523
0
            expr = VCaseExpr::create_shared(expr_node);
524
0
            break;
525
0
        }
526
0
        case TExprNodeType::INFO_FUNC: {
527
0
            expr = VInfoFunc::create_shared(expr_node);
528
0
            break;
529
0
        }
530
0
        case TExprNodeType::SEARCH_EXPR: {
531
0
            expr = VSearchExpr::create_shared(expr_node);
532
0
            break;
533
0
        }
534
0
        default:
535
0
            return Status::InternalError("Unknown expr node type: {}", expr_node.node_type);
536
400k
        }
537
400k
    } catch (const Exception& e) {
538
0
        if (e.code() == ErrorCode::INTERNAL_ERROR) {
539
0
            return Status::InternalError("Create Expr failed because {}\nTExprNode={}", e.what(),
540
0
                                         apache::thrift::ThriftDebugString(expr_node));
541
0
        }
542
0
        return Status::Error<false>(e.code(), "Create Expr failed because {}", e.what());
543
0
        LOG(WARNING) << "create expr failed, TExprNode={}, reason={}"
544
0
                     << apache::thrift::ThriftDebugString(expr_node) << e.what();
545
0
    }
546
400k
    if (!expr->data_type()) {
547
0
        return Status::InvalidArgument("Unknown expr type: {}", expr_node.node_type);
548
0
    }
549
400k
    return Status::OK();
550
400k
}
551
// NOLINTEND(readability-function-size)
552
553
Status VExpr::create_tree_from_thrift(const std::vector<TExprNode>& nodes, int* node_idx,
554
400k
                                      VExprSPtr& root_expr, VExprContextSPtr& ctx) {
555
    // propagate error case
556
400k
    if (*node_idx >= nodes.size()) {
557
0
        return Status::InternalError("Failed to reconstruct expression tree from thrift.");
558
0
    }
559
560
    // create root expr
561
400k
    int root_children = nodes[*node_idx].num_children;
562
400k
    VExprSPtr root;
563
400k
    RETURN_IF_ERROR(create_expr(nodes[*node_idx], root));
564
400k
    DCHECK(root != nullptr);
565
400k
    root_expr = root;
566
400k
    ctx = std::make_shared<VExprContext>(root);
567
    // short path for leaf node
568
400k
    if (root_children <= 0) {
569
399k
        return Status::OK();
570
399k
    }
571
572
    // non-recursive traversal
573
45
    using VExprSPtrCountPair = std::pair<VExprSPtr, int>;
574
45
    std::stack<std::shared_ptr<VExprSPtrCountPair>> s;
575
45
    s.emplace(std::make_shared<VExprSPtrCountPair>(root, root_children));
576
312
    while (!s.empty()) {
577
        // copy the shared ptr resource to avoid dangling reference
578
267
        auto parent = s.top();
579
        // Decrement or pop
580
267
        if (parent->second > 1) {
581
173
            parent->second -= 1;
582
173
        } else {
583
94
            s.pop();
584
94
        }
585
586
267
        DCHECK(parent->first != nullptr);
587
267
        if (++*node_idx >= nodes.size()) {
588
0
            return Status::InternalError("Failed to reconstruct expression tree from thrift.");
589
0
        }
590
591
267
        VExprSPtr expr;
592
267
        RETURN_IF_ERROR(create_expr(nodes[*node_idx], expr));
593
267
        DCHECK(expr != nullptr);
594
267
        parent->first->add_child(expr);
595
        // push to stack if has children
596
267
        int num_children = nodes[*node_idx].num_children;
597
267
        if (num_children > 0) {
598
49
            s.emplace(std::make_shared<VExprSPtrCountPair>(expr, num_children));
599
49
        }
600
267
    }
601
45
    return Status::OK();
602
45
}
603
604
400k
Status VExpr::create_expr_tree(const TExpr& texpr, VExprContextSPtr& ctx) {
605
400k
    if (texpr.nodes.empty()) {
606
7
        ctx = nullptr;
607
7
        return Status::OK();
608
7
    }
609
400k
    int node_idx = 0;
610
400k
    VExprSPtr e;
611
400k
    Status status = create_tree_from_thrift(texpr.nodes, &node_idx, e, ctx);
612
400k
    if (status.ok() && node_idx + 1 != texpr.nodes.size()) {
613
0
        status = Status::InternalError(
614
0
                "Expression tree only partially reconstructed. Not all thrift nodes were "
615
0
                "used.");
616
0
    }
617
400k
    if (!status.ok()) {
618
0
        LOG(ERROR) << "Could not construct expr tree.\n"
619
0
                   << status << "\n"
620
0
                   << apache::thrift::ThriftDebugString(texpr);
621
0
    }
622
400k
    return status;
623
400k
}
624
625
28.1k
Status VExpr::create_expr_trees(const std::vector<TExpr>& texprs, VExprContextSPtrs& ctxs) {
626
28.1k
    ctxs.clear();
627
70.0k
    for (const auto& texpr : texprs) {
628
70.0k
        VExprContextSPtr ctx;
629
70.0k
        RETURN_IF_ERROR(create_expr_tree(texpr, ctx));
630
70.0k
        ctxs.push_back(ctx);
631
70.0k
    }
632
28.1k
    return Status::OK();
633
28.1k
}
634
635
Status VExpr::check_expr_output_type(const VExprContextSPtrs& ctxs,
636
24.0k
                                     const RowDescriptor& output_row_desc) {
637
24.0k
    if (ctxs.empty()) {
638
2
        return Status::OK();
639
2
    }
640
24.0k
    auto name_and_types = VectorizedUtils::create_name_and_data_types(output_row_desc);
641
24.0k
    if (ctxs.size() != name_and_types.size()) {
642
0
        return Status::InternalError(
643
0
                "output type size not match expr size {} , expected output size {} ", ctxs.size(),
644
0
                name_and_types.size());
645
0
    }
646
65.9k
    auto check_type_can_be_converted = [](DataTypePtr& from, DataTypePtr& to) -> bool {
647
65.9k
        if (to->equals(*from)) {
648
65.9k
            return true;
649
65.9k
        }
650
0
        if (to->is_nullable() && !from->is_nullable()) {
651
0
            return remove_nullable(to)->equals(*from);
652
0
        }
653
0
        return false;
654
0
    };
655
89.9k
    for (int i = 0; i < ctxs.size(); i++) {
656
65.9k
        auto real_expr_type = get_data_type_with_default_argument(ctxs[i]->root()->data_type());
657
65.9k
        auto&& [name, expected_type] = name_and_types[i];
658
65.9k
        if (!check_type_can_be_converted(real_expr_type, expected_type)) {
659
0
            return Status::InternalError(
660
0
                    "output type not match expr type, col name {} , expected type {} , real type "
661
0
                    "{}",
662
0
                    name, expected_type->get_name(), real_expr_type->get_name());
663
0
        }
664
65.9k
    }
665
24.0k
    return Status::OK();
666
24.0k
}
667
668
Status VExpr::prepare(const VExprContextSPtrs& ctxs, RuntimeState* state,
669
148k
                      const RowDescriptor& row_desc) {
670
258k
    for (auto ctx : ctxs) {
671
258k
        RETURN_IF_ERROR(ctx->prepare(state, row_desc));
672
258k
    }
673
148k
    return Status::OK();
674
148k
}
675
676
148k
Status VExpr::open(const VExprContextSPtrs& ctxs, RuntimeState* state) {
677
258k
    for (const auto& ctx : ctxs) {
678
258k
        RETURN_IF_ERROR(ctx->open(state));
679
258k
    }
680
148k
    return Status::OK();
681
148k
}
682
683
Status VExpr::clone_if_not_exists(const VExprContextSPtrs& ctxs, RuntimeState* state,
684
0
                                  VExprContextSPtrs& new_ctxs) {
685
0
    if (!new_ctxs.empty()) {
686
        // 'ctxs' was already cloned into '*new_ctxs', nothing to do.
687
0
        DCHECK_EQ(new_ctxs.size(), ctxs.size());
688
0
        for (auto& new_ctx : new_ctxs) {
689
0
            DCHECK(new_ctx->_is_clone);
690
0
        }
691
0
        return Status::OK();
692
0
    }
693
0
    new_ctxs.resize(ctxs.size());
694
0
    for (int i = 0; i < ctxs.size(); ++i) {
695
0
        RETURN_IF_ERROR(ctxs[i]->clone(state, new_ctxs[i]));
696
0
    }
697
0
    return Status::OK();
698
0
}
699
700
7
std::string VExpr::debug_string() const {
701
    // TODO: implement partial debug string for member vars
702
7
    std::stringstream out;
703
7
    out << " type=" << _data_type->get_name();
704
705
7
    if (!_children.empty()) {
706
0
        out << " children=" << debug_string(_children);
707
0
    }
708
709
7
    return out.str();
710
7
}
711
712
0
std::string VExpr::debug_string(const VExprSPtrs& exprs) {
713
0
    std::stringstream out;
714
0
    out << "[";
715
716
0
    for (int i = 0; i < exprs.size(); ++i) {
717
0
        out << (i == 0 ? "" : " ") << exprs[i]->debug_string();
718
0
    }
719
720
0
    out << "]";
721
0
    return out.str();
722
0
}
723
724
0
std::string VExpr::debug_string(const VExprContextSPtrs& ctxs) {
725
0
    VExprSPtrs exprs;
726
0
    for (const auto& ctx : ctxs) {
727
0
        exprs.push_back(ctx->root());
728
0
    }
729
0
    return debug_string(exprs);
730
0
}
731
732
530
bool VExpr::is_constant() const {
733
530
    return std::all_of(_children.begin(), _children.end(),
734
530
                       [](const VExprSPtr& expr) { return expr->is_constant(); });
735
530
}
736
737
Status VExpr::get_const_col(VExprContext* context,
738
258k
                            std::shared_ptr<ColumnPtrWrapper>* column_wrapper) {
739
258k
    if (!is_constant()) {
740
258k
        return Status::OK();
741
258k
    }
742
743
112
    if (_constant_col != nullptr) {
744
27
        DCHECK(column_wrapper != nullptr);
745
27
        *column_wrapper = _constant_col;
746
27
        return Status::OK();
747
27
    }
748
749
85
    ColumnPtr result;
750
85
    RETURN_IF_ERROR(execute_column(context, nullptr, 1, result));
751
85
    _constant_col = std::make_shared<ColumnPtrWrapper>(result);
752
85
    if (column_wrapper != nullptr) {
753
0
        *column_wrapper = _constant_col;
754
0
    }
755
756
85
    return Status::OK();
757
85
}
758
759
79
void VExpr::register_function_context(RuntimeState* state, VExprContext* context) {
760
79
    std::vector<DataTypePtr> arg_types;
761
156
    for (auto& i : _children) {
762
156
        arg_types.push_back(i->data_type());
763
156
    }
764
765
79
    _fn_context_index = context->register_function_context(state, _data_type, arg_types);
766
79
}
767
768
Status VExpr::init_function_context(RuntimeState* state, VExprContext* context,
769
                                    FunctionContext::FunctionStateScope scope,
770
39
                                    const FunctionBasePtr& function) const {
771
39
    FunctionContext* fn_ctx = context->fn_context(_fn_context_index);
772
39
    if (scope == FunctionContext::FRAGMENT_LOCAL) {
773
27
        std::vector<std::shared_ptr<ColumnPtrWrapper>> constant_cols;
774
52
        for (auto c : _children) {
775
52
            std::shared_ptr<ColumnPtrWrapper> const_col;
776
52
            RETURN_IF_ERROR(c->get_const_col(context, &const_col));
777
52
            constant_cols.push_back(const_col);
778
52
        }
779
27
        fn_ctx->set_constant_cols(constant_cols);
780
27
    }
781
782
39
    if (scope == FunctionContext::FRAGMENT_LOCAL) {
783
27
        RETURN_IF_ERROR(function->open(fn_ctx, FunctionContext::FRAGMENT_LOCAL));
784
27
    }
785
39
    RETURN_IF_ERROR(function->open(fn_ctx, FunctionContext::THREAD_LOCAL));
786
39
    return Status::OK();
787
39
}
788
789
void VExpr::close_function_context(VExprContext* context, FunctionContext::FunctionStateScope scope,
790
148
                                   const FunctionBasePtr& function) const {
791
148
    if (_fn_context_index != -1) {
792
41
        FunctionContext* fn_ctx = context->fn_context(_fn_context_index);
793
        // `close_function_context` is called in VExprContext's destructor so do not throw exceptions here.
794
41
        static_cast<void>(function->close(fn_ctx, FunctionContext::THREAD_LOCAL));
795
41
        if (scope == FunctionContext::FRAGMENT_LOCAL) {
796
29
            static_cast<void>(function->close(fn_ctx, FunctionContext::FRAGMENT_LOCAL));
797
29
        }
798
41
    }
799
148
}
800
801
0
Status VExpr::check_constant(const Block& block, ColumnNumbers arguments) const {
802
0
    if (is_constant() && !VectorizedUtils::all_arguments_are_constant(block, arguments)) {
803
0
        return Status::InternalError("const check failed, expr={}", debug_string());
804
0
    }
805
0
    return Status::OK();
806
0
}
807
808
0
uint64_t VExpr::get_digest(uint64_t seed) const {
809
0
    auto digest = seed;
810
0
    for (auto child : _children) {
811
0
        digest = child->get_digest(digest);
812
0
        if (digest == 0) {
813
0
            return 0;
814
0
        }
815
0
    }
816
817
0
    auto& fn_name = _fn.name.function_name;
818
0
    if (!fn_name.empty()) {
819
0
        digest = HashUtil::hash64(fn_name.c_str(), fn_name.size(), digest);
820
0
    } else {
821
0
        digest = HashUtil::hash64((const char*)&_node_type, sizeof(_node_type), digest);
822
0
        digest = HashUtil::hash64((const char*)&_opcode, sizeof(_opcode), digest);
823
0
    }
824
0
    return digest;
825
0
}
826
827
0
ColumnPtr VExpr::get_result_from_const(size_t count) const {
828
0
    return ColumnConst::create(_constant_col->column_ptr, count);
829
0
}
830
831
Status VExpr::_evaluate_inverted_index(VExprContext* context, const FunctionBasePtr& function,
832
1
                                       uint32_t segment_num_rows) {
833
    // Pre-allocate vectors based on an estimated or known size
834
1
    std::vector<segment_v2::IndexIterator*> iterators;
835
1
    std::vector<vectorized::IndexFieldNameAndTypePair> data_type_with_names;
836
1
    std::vector<int> column_ids;
837
1
    vectorized::ColumnsWithTypeAndName arguments;
838
1
    VExprSPtrs children_exprs;
839
840
    // Reserve space to avoid multiple reallocations
841
1
    const size_t estimated_size = get_num_children();
842
1
    iterators.reserve(estimated_size);
843
1
    data_type_with_names.reserve(estimated_size);
844
1
    column_ids.reserve(estimated_size);
845
1
    children_exprs.reserve(estimated_size);
846
847
1
    auto index_context = context->get_index_context();
848
849
    // if child is cast expr, we need to ensure target data type is the same with storage data type.
850
    // or they are all string type
851
    // and if data type is array, we need to get the nested data type to ensure that.
852
2
    for (const auto& child : children()) {
853
2
        if (child->node_type() == TExprNodeType::CAST_EXPR) {
854
1
            auto* cast_expr = assert_cast<VCastExpr*>(child.get());
855
1
            DCHECK_EQ(cast_expr->get_num_children(), 1);
856
1
            if (cast_expr->get_child(0)->is_slot_ref()) {
857
0
                auto* column_slot_ref = assert_cast<VSlotRef*>(cast_expr->get_child(0).get());
858
0
                auto column_id = column_slot_ref->column_id();
859
0
                const auto* storage_name_type =
860
0
                        context->get_index_context()->get_storage_name_and_type_by_column_id(
861
0
                                column_id);
862
0
                auto storage_type = remove_nullable(storage_name_type->second);
863
0
                auto target_type = remove_nullable(cast_expr->get_target_type());
864
0
                auto origin_primitive_type = storage_type->get_primitive_type();
865
0
                auto target_primitive_type = target_type->get_primitive_type();
866
0
                if (is_complex_type(storage_type->get_primitive_type())) {
867
0
                    if (storage_type->get_primitive_type() == TYPE_ARRAY &&
868
0
                        target_type->get_primitive_type() == TYPE_ARRAY) {
869
0
                        auto nested_storage_type =
870
0
                                (assert_cast<const DataTypeArray*>(storage_type.get()))
871
0
                                        ->get_nested_type();
872
0
                        origin_primitive_type = nested_storage_type->get_primitive_type();
873
0
                        auto nested_target_type =
874
0
                                (assert_cast<const DataTypeArray*>(target_type.get()))
875
0
                                        ->get_nested_type();
876
0
                        target_primitive_type = nested_target_type->get_primitive_type();
877
0
                    } else {
878
0
                        continue;
879
0
                    }
880
0
                }
881
0
                if (origin_primitive_type != TYPE_VARIANT &&
882
0
                    (storage_type->equals(*target_type) ||
883
0
                     (is_string_type(target_primitive_type) &&
884
0
                      is_string_type(origin_primitive_type)))) {
885
0
                    children_exprs.emplace_back(expr_without_cast(child));
886
0
                }
887
1
            } else {
888
1
                return Status::OK(); // for example: cast("abc") as ipv4 case
889
1
            }
890
1
        } else {
891
1
            children_exprs.emplace_back(child);
892
1
        }
893
2
    }
894
895
0
    if (children_exprs.empty()) {
896
0
        return Status::OK(); // Early exit if no children to process
897
0
    }
898
899
0
    for (const auto& child : children_exprs) {
900
0
        if (child->is_slot_ref()) {
901
0
            auto* column_slot_ref = assert_cast<VSlotRef*>(child.get());
902
0
            auto column_id = column_slot_ref->column_id();
903
0
            auto* iter = context->get_index_context()->get_inverted_index_iterator_by_column_id(
904
0
                    column_id);
905
            //column does not have inverted index
906
0
            if (iter == nullptr) {
907
0
                continue;
908
0
            }
909
0
            const auto* storage_name_type =
910
0
                    context->get_index_context()->get_storage_name_and_type_by_column_id(column_id);
911
0
            if (storage_name_type == nullptr) {
912
0
                auto err_msg = fmt::format(
913
0
                        "storage_name_type cannot be found for column {} while in {} "
914
0
                        "evaluate_inverted_index",
915
0
                        column_id, expr_name());
916
0
                LOG(ERROR) << err_msg;
917
0
                return Status::InternalError(err_msg);
918
0
            }
919
0
            iterators.emplace_back(iter);
920
0
            data_type_with_names.emplace_back(*storage_name_type);
921
0
            column_ids.emplace_back(column_id);
922
0
        } else if (child->is_literal()) {
923
0
            auto* column_literal = assert_cast<VLiteral*>(child.get());
924
0
            arguments.emplace_back(column_literal->get_column_ptr(),
925
0
                                   column_literal->get_data_type(), column_literal->expr_name());
926
0
        } else if (child->can_push_down_to_index()) {
927
0
            RETURN_IF_ERROR(child->evaluate_inverted_index(context, segment_num_rows));
928
0
        } else {
929
0
            return Status::OK(); // others cases
930
0
        }
931
0
    }
932
933
    // is null or is not null has no arguments
934
0
    if (iterators.empty() || (arguments.empty() && !(function->get_name() == "is_not_null_pred" ||
935
0
                                                     function->get_name() == "is_null_pred"))) {
936
0
        return Status::OK(); // Nothing to evaluate or no literals to compare against
937
0
    }
938
939
0
    const InvertedIndexAnalyzerCtx* analyzer_ctx = nullptr;
940
0
    if (auto index_ctx = context->get_index_context(); index_ctx != nullptr) {
941
0
        analyzer_ctx = index_ctx->get_analyzer_ctx_for_expr(this);
942
0
    }
943
944
0
    auto result_bitmap = segment_v2::InvertedIndexResultBitmap();
945
0
    auto res = function->evaluate_inverted_index(arguments, data_type_with_names, iterators,
946
0
                                                 segment_num_rows, analyzer_ctx, result_bitmap);
947
0
    if (!res.ok()) {
948
0
        return res;
949
0
    }
950
0
    if (!result_bitmap.is_empty()) {
951
0
        index_context->set_index_result_for_expr(this, result_bitmap);
952
0
        for (int column_id : column_ids) {
953
0
            index_context->set_true_for_index_status(this, column_id);
954
0
        }
955
0
    }
956
0
    return Status::OK();
957
0
}
958
959
0
size_t VExpr::estimate_memory(const size_t rows) {
960
0
    if (is_const_and_have_executed()) {
961
0
        return 0;
962
0
    }
963
964
0
    size_t estimate_size = 0;
965
0
    for (auto& child : _children) {
966
0
        estimate_size += child->estimate_memory(rows);
967
0
    }
968
969
0
    if (_data_type->have_maximum_size_of_value()) {
970
0
        estimate_size += rows * _data_type->get_size_of_value_in_memory();
971
0
    } else {
972
0
        estimate_size += rows * 64; /// TODO: need a more reasonable value
973
0
    }
974
0
    return estimate_size;
975
0
}
976
977
11
bool VExpr::fast_execute(VExprContext* context, ColumnPtr& result_column) const {
978
11
    if (context->get_index_context() &&
979
11
        context->get_index_context()->get_index_result_column().contains(this)) {
980
        // prepare a column to save result
981
1
        result_column = context->get_index_context()->get_index_result_column()[this];
982
1
        if (_data_type->is_nullable()) {
983
1
            result_column = make_nullable(result_column);
984
1
        }
985
1
        return true;
986
1
    }
987
10
    return false;
988
11
}
989
990
0
bool VExpr::equals(const VExpr& other) {
991
0
    return false;
992
0
}
993
994
Status VExpr::evaluate_ann_range_search(
995
        const segment_v2::AnnRangeSearchRuntime& runtime,
996
        const std::vector<std::unique_ptr<segment_v2::IndexIterator>>& index_iterators,
997
        const std::vector<ColumnId>& idx_to_cid,
998
        const std::vector<std::unique_ptr<segment_v2::ColumnIterator>>& column_iterators,
999
0
        roaring::Roaring& row_bitmap, AnnIndexStats& ann_index_stats) {
1000
0
    return Status::OK();
1001
0
}
1002
1003
void VExpr::prepare_ann_range_search(const doris::VectorSearchUserParams& params,
1004
                                     segment_v2::AnnRangeSearchRuntime& range_search_runtime,
1005
0
                                     bool& suitable_for_ann_index) {
1006
0
    if (!suitable_for_ann_index) {
1007
0
        return;
1008
0
    }
1009
0
    for (auto& child : _children) {
1010
0
        child->prepare_ann_range_search(params, range_search_runtime, suitable_for_ann_index);
1011
0
        if (!suitable_for_ann_index) {
1012
0
            return;
1013
0
        }
1014
0
    }
1015
0
}
1016
1017
2
bool VExpr::ann_range_search_executedd() {
1018
2
    return _has_been_executed;
1019
2
}
1020
1021
2
bool VExpr::ann_dist_is_fulfilled() const {
1022
2
    return _virtual_column_is_fulfilled;
1023
2
}
1024
1025
#include "common/compile_check_end.h"
1026
} // namespace doris::vectorized