Coverage Report

Created: 2026-07-11 19:13

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/format_v2/expr/delete_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_context.h"
25
#include "exprs/vexpr.h"
26
#include "roaring/roaring64map.hh"
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::format {
37
38
class DeletePredicate final : public VExpr {
39
    ENABLE_FACTORY_CREATOR(DeletePredicate);
40
41
public:
42
    DeletePredicate(const std::vector<int64_t>& deleted_rows);
43
    DeletePredicate(const roaring::Roaring64Map& deletion_vector);
44
28
    ~DeletePredicate() override = default;
45
    Status execute(VExprContext* context, Block* block, int* result_column_id) const override;
46
    Status execute_column_impl(VExprContext* context, const Block* block, const Selector* selector,
47
1
                               size_t count, ColumnPtr& result_column) const override {
48
1
        return Status::InternalError("Not implement DeletePredicate::execute_column_impl");
49
1
    }
50
    Status prepare(RuntimeState* state, const RowDescriptor& desc, VExprContext* context) override;
51
    Status open(RuntimeState* state, VExprContext* context,
52
                FunctionContext::FunctionStateScope scope) override;
53
    void close(VExprContext* context, FunctionContext::FunctionStateScope scope) override;
54
    std::string debug_string() const override;
55
0
    uint64_t get_digest(uint64_t seed) const override { return 0; }
56
23
    const std::string& expr_name() const override { return _expr_name; }
57
58
private:
59
    std::string _expr_name;
60
    const std::vector<int64_t>* _deleted_rows = nullptr;
61
    const roaring::Roaring64Map* _deletion_vector = nullptr;
62
};
63
} // namespace doris::format