Coverage Report

Created: 2026-05-19 06:24

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/duckdb/src/planner/expression/bound_lambda_expression.cpp
Line
Count
Source
1
#include "duckdb/planner/expression/bound_lambda_expression.hpp"
2
#include "duckdb/common/string_util.hpp"
3
4
namespace duckdb {
5
6
BoundLambdaExpression::BoundLambdaExpression(ExpressionType type_p, LogicalType return_type_p,
7
                                             unique_ptr<Expression> lambda_expr_p, idx_t parameter_count_p)
8
6
    : Expression(type_p, ExpressionClass::BOUND_LAMBDA, std::move(return_type_p)),
9
6
      lambda_expr(std::move(lambda_expr_p)), parameter_count(parameter_count_p) {
10
6
}
11
12
0
string BoundLambdaExpression::ToString() const {
13
0
  return lambda_expr->ToString();
14
0
}
15
16
0
bool BoundLambdaExpression::Equals(const BaseExpression &other_p) const {
17
0
  if (!Expression::Equals(other_p)) {
18
0
    return false;
19
0
  }
20
0
  auto &other = other_p.Cast<BoundLambdaExpression>();
21
0
  if (!Expression::Equals(*lambda_expr, *other.lambda_expr)) {
22
0
    return false;
23
0
  }
24
0
  if (!Expression::ListEquals(captures, other.captures)) {
25
0
    return false;
26
0
  }
27
0
  if (parameter_count != other.parameter_count) {
28
0
    return false;
29
0
  }
30
0
  return true;
31
0
}
32
33
0
unique_ptr<Expression> BoundLambdaExpression::Copy() const {
34
0
  auto copy = make_uniq<BoundLambdaExpression>(type, return_type, lambda_expr->Copy(), parameter_count);
35
0
  for (auto &capture : captures) {
36
0
    copy->captures.push_back(capture->Copy());
37
0
  }
38
0
  return std::move(copy);
39
0
}
40
41
} // namespace duckdb