Coverage Report

Created: 2026-03-11 16:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/root/doris/be/src/exprs/vin_predicate.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/object_pool.h"
23
#include "common/status.h"
24
#include "exprs/function/function.h"
25
#include "exprs/function_context.h"
26
#include "exprs/vexpr.h"
27
28
namespace doris {
29
class RowDescriptor;
30
class RuntimeState;
31
class TExprNode;
32
class Block;
33
class VExprContext;
34
} // namespace doris
35
36
namespace doris {
37
class VInPredicate MOCK_REMOVE(final) : public VExpr {
38
    ENABLE_FACTORY_CREATOR(VInPredicate);
39
40
public:
41
    VInPredicate(const TExprNode& node);
42
#ifdef BE_TEST
43
12
    VInPredicate() = default;
44
#endif
45
21
    ~VInPredicate() override = default;
46
    Status execute_column(VExprContext* context, const Block* block, Selector* selector,
47
                          size_t count, ColumnPtr& result_column) const override;
48
    size_t estimate_memory(const size_t rows) override;
49
    Status prepare(RuntimeState* state, const RowDescriptor& desc, VExprContext* context) override;
50
    Status open(RuntimeState* state, VExprContext* context,
51
                FunctionContext::FunctionStateScope scope) override;
52
    void close(VExprContext* context, FunctionContext::FunctionStateScope scope) override;
53
    const std::string& expr_name() const override;
54
55
    std::string debug_string() const override;
56
57
0
    const FunctionBasePtr function() { return _function; }
58
59
22
    bool is_not_in() const { return _is_not_in; };
60
    Status evaluate_inverted_index(VExprContext* context, uint32_t segment_num_rows) override;
61
62
0
    uint64_t get_digest(uint64_t seed) const override { return 0; }
63
64
private:
65
    FunctionBasePtr _function;
66
    std::string _expr_name;
67
68
    MOCK_REMOVE(const) bool _is_not_in;
69
    static const constexpr char* function_name = "in";
70
    uint32_t _in_list_value_count_threshold = 10;
71
    bool _is_args_all_constant = false;
72
};
73
} // namespace doris