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 | | |
27 | | namespace doris { |
28 | | class RowDescriptor; |
29 | | class RuntimeState; |
30 | | class TExprNode; |
31 | | class Block; |
32 | | class VExprContext; |
33 | | } // namespace doris |
34 | | |
35 | | namespace doris::format { |
36 | | |
37 | | class DeletePredicate final : public VExpr { |
38 | | ENABLE_FACTORY_CREATOR(DeletePredicate); |
39 | | |
40 | | public: |
41 | | DeletePredicate(const std::vector<int64_t>& deleted_rows); |
42 | 22 | ~DeletePredicate() override = default; |
43 | | Status execute(VExprContext* context, Block* block, int* result_column_id) const override; |
44 | | Status execute_column_impl(VExprContext* context, const Block* block, const Selector* selector, |
45 | 1 | size_t count, ColumnPtr& result_column) const override { |
46 | 1 | return Status::InternalError("Not implement DeletePredicate::execute_column_impl"); |
47 | 1 | } |
48 | | Status prepare(RuntimeState* state, const RowDescriptor& desc, VExprContext* context) override; |
49 | | Status open(RuntimeState* state, VExprContext* context, |
50 | | FunctionContext::FunctionStateScope scope) override; |
51 | | void close(VExprContext* context, FunctionContext::FunctionStateScope scope) override; |
52 | | std::string debug_string() const override; |
53 | 0 | uint64_t get_digest(uint64_t seed) const override { return 0; } |
54 | 16 | const std::string& expr_name() const override { return _expr_name; } |
55 | | |
56 | | private: |
57 | | std::string _expr_name; |
58 | | const std::vector<int64_t>& _deleted_rows; |
59 | | }; |
60 | | } // namespace doris::format |