Coverage Report

Created: 2026-03-13 09:58

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exprs/vlambda_function_expr.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
#include "common/global_types.h"
20
#include "exprs/function/function.h"
21
#include "exprs/vexpr.h"
22
23
namespace doris {
24
class VLambdaFunctionExpr final : public VExpr {
25
    ENABLE_FACTORY_CREATOR(VLambdaFunctionExpr);
26
27
public:
28
978
    VLambdaFunctionExpr(const TExprNode& node) : VExpr(node) {}
29
978
    ~VLambdaFunctionExpr() override = default;
30
31
978
    Status prepare(RuntimeState* state, const RowDescriptor& desc, VExprContext* context) override {
32
978
        RETURN_IF_ERROR_OR_PREPARED(VExpr::prepare(state, desc, context));
33
978
        _prepare_finished = true;
34
978
        return Status::OK();
35
978
    }
36
37
    Status open(RuntimeState* state, VExprContext* context,
38
5.68k
                FunctionContext::FunctionStateScope scope) override {
39
5.68k
        DCHECK(_prepare_finished);
40
5.68k
        RETURN_IF_ERROR(VExpr::open(state, context, scope));
41
5.68k
        _open_finished = true;
42
5.68k
        return Status::OK();
43
5.68k
    }
44
45
    Status execute_column(VExprContext* context, const Block* block, Selector* selector,
46
4.94k
                          size_t count, ColumnPtr& result_column) const override {
47
4.94k
        DCHECK(_open_finished || block == nullptr);
48
4.94k
        return get_child(0)->execute_column(context, block, selector, count, result_column);
49
4.94k
    }
50
51
4.94k
    DataTypePtr execute_type(const Block* block) const override {
52
4.94k
        return get_child(0)->execute_type(block);
53
4.94k
    }
54
55
3.29k
    const std::string& expr_name() const override { return _expr_name; }
56
57
0
    uint64_t get_digest(uint64_t seed) const override { return 0; }
58
59
private:
60
    const std::string _expr_name = "vlambda_function_expr";
61
};
62
} // namespace doris