Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::BoundLambdaExpression Class Reference
Inheritance diagram for duckdb::BoundLambdaExpression:
Collaboration diagram for duckdb::BoundLambdaExpression:

Public Member Functions

 BoundLambdaExpression (ExpressionType type_p, LogicalType return_type_p, unique_ptr< Expression > lambda_expr_p, idx_t parameter_count_p)
string ToString () const override
 Convert the Expression to a String.
bool Equals (const BaseExpression &other) const override
 Returns true if this expression is equal to another expression.
unique_ptr< Expression > Copy () const override
 Create a copy of this expression.
void Serialize (Serializer &serializer) const override
Public Member Functions inherited from duckdb::Expression
 Expression (ExpressionType type, ExpressionClass expression_class, LogicalType return_type)
bool IsAggregate () const override
 Returns true if this expression is an aggregate or not.
bool IsWindow () const override
 Returns true if the expression has a window function or not.
bool HasSubquery () const override
 Returns true if the query contains a subquery.
bool IsScalar () const override
 Returns true if expression does not contain a group ref or col ref or parameter.
bool HasParameter () const override
 Returns true if the expression has a parameter.
virtual bool IsVolatile () const
virtual bool IsConsistent () const
virtual bool PropagatesNullValues () const
virtual bool IsFoldable () const
virtual bool CanThrow () const
hash_t Hash () const override
bool Equals (const BaseExpression &other) const override
 Returns true if this expression is equal to another expression.
Public Member Functions inherited from duckdb::BaseExpression
 BaseExpression (ExpressionType type, ExpressionClass expression_class)
 Create an Expression.
ExpressionClass GetExpressionClass () const
 Returns the class of the expression.
ExpressionType GetExpressionType () const
 Returns the type of the expression.
void SetExpressionTypeUnsafe (ExpressionType new_type)
optional_idx GetQueryLocation () const
 Returns the location in the query (if any).
void SetQueryLocation (optional_idx location)
 Sets the location in the query.
bool HasAlias () const
 Returns true if the expression has a non-empty alias.
const string & GetAlias () const
 Returns the alias of the expression.
void SetAlias (const string &alias_p)
 Sets the alias of the expression.
void SetAlias (string &&alias_p)
 Sets the alias of the expression.
void ClearAlias ()
 Clears the alias of the expression.
virtual string GetName () const
 Get the name of the expression.
void Print () const
 Print the expression to stdout.
bool operator== (const BaseExpression &rhs) const
virtual void Verify () const
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Static Public Member Functions

static unique_ptr< Expression > Deserialize (Deserializer &deserializer)
Static Public Member Functions inherited from duckdb::Expression
static bool Equals (const Expression &left, const Expression &right)
static bool Equals (const unique_ptr< Expression > &left, const unique_ptr< Expression > &right)
static bool ListEquals (const vector< unique_ptr< Expression > > &left, const vector< unique_ptr< Expression > > &right)
static unique_ptr< Expression > Deserialize (Deserializer &deserializer)
Static Public Member Functions inherited from duckdb::BaseExpression
static bool Equals (const BaseExpression &left, const BaseExpression &right)

Public Attributes

unique_ptr< Expression > lambda_expr
 The lambda expression that we'll use in the expression executor during execution.
vector< unique_ptr< Expression > > captures
idx_t parameter_count
 The number of lhs parameters of the lambda function.
Public Attributes inherited from duckdb::Expression
LogicalType return_type
 The return type of the expression.
unique_ptr< BaseStatistics > verification_stats
 Expression statistics (if any) - ONLY USED FOR VERIFICATION.
Public Attributes inherited from duckdb::BaseExpression
ExpressionType type
 Type of the expression.
ExpressionClass expression_class
 The expression class of the node.
string alias
 The alias of the expression,.
optional_idx query_location
 The location in the query (if any).

Static Public Attributes

static constexpr const ExpressionClass TYPE = ExpressionClass::BOUND_LAMBDA

Additional Inherited Members

Protected Member Functions inherited from duckdb::Expression
void CopyProperties (const Expression &other)

Constructor & Destructor Documentation

◆ BoundLambdaExpression()

duckdb::BoundLambdaExpression::BoundLambdaExpression ( ExpressionType type_p,
LogicalType return_type_p,
unique_ptr< Expression > lambda_expr_p,
idx_t parameter_count_p )
376538 : Expression(type_p, ExpressionClass::BOUND_LAMBDA, std::move(return_type_p)),
376539 lambda_expr(std::move(lambda_expr_p)), parameter_count(parameter_count_p) {
376540}
unique_ptr< Expression > lambda_expr
The lambda expression that we'll use in the expression executor during execution.
Definition duckdb.cpp:1003
idx_t parameter_count
The number of lhs parameters of the lambda function.
Definition duckdb.cpp:1008

Member Function Documentation

◆ ToString()

string duckdb::BoundLambdaExpression::ToString ( ) const
overridevirtual

Convert the Expression to a String.

Implements duckdb::BaseExpression.

376542 {
376543 return lambda_expr->ToString();
376544}

◆ Equals()

bool duckdb::BoundLambdaExpression::Equals ( const BaseExpression & other) const
overridevirtual

Returns true if this expression is equal to another expression.

Reimplemented from duckdb::BaseExpression.

376546 {
376547 if (!Expression::Equals(other_p)) {
376548 return false;
376549 }
376550 auto &other = other_p.Cast<BoundLambdaExpression>();
376551 if (!Expression::Equals(*lambda_expr, *other.lambda_expr)) {
376552 return false;
376553 }
376554 if (!Expression::ListEquals(captures, other.captures)) {
376555 return false;
376556 }
376557 if (parameter_count != other.parameter_count) {
376558 return false;
376559 }
376560 return true;
376561}
vector< unique_ptr< Expression > > captures
Definition duckdb.cpp:1006
bool Equals(const BaseExpression &other) const override
Returns true if this expression is equal to another expression.
Definition duckdb.hpp:17762
Here is the call graph for this function:

◆ Copy()

unique_ptr< Expression > duckdb::BoundLambdaExpression::Copy ( ) const
overridevirtual

Create a copy of this expression.

Implements duckdb::Expression.

376563 {
376564 auto copy = make_uniq<BoundLambdaExpression>(type, return_type, lambda_expr->Copy(), parameter_count);
376565 for (auto &capture : captures) {
376566 copy->captures.push_back(capture->Copy());
376567 }
376568 return std::move(copy);
376569}
ExpressionType type
Type of the expression.
Definition duckdb.hpp:13287
LogicalType return_type
The return type of the expression.
Definition duckdb.hpp:17743

◆ Serialize()

void duckdb::BoundLambdaExpression::Serialize ( Serializer & serializer) const
overridevirtual

Reimplemented from duckdb::Expression.

416110 {
416111 Expression::Serialize(serializer);
416112 serializer.WriteProperty<LogicalType>(200, "return_type", return_type);
416113 serializer.WritePropertyWithDefault<unique_ptr<Expression>>(201, "lambda_expr", lambda_expr);
416114 serializer.WritePropertyWithDefault<vector<unique_ptr<Expression>>>(202, "captures", captures);
416115 serializer.WritePropertyWithDefault<idx_t>(203, "parameter_count", parameter_count);
416116}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ Deserialize()

unique_ptr< Expression > duckdb::BoundLambdaExpression::Deserialize ( Deserializer & deserializer)
static
416118 {
416119 auto return_type = deserializer.ReadProperty<LogicalType>(200, "return_type");
416120 auto lambda_expr = deserializer.ReadPropertyWithDefault<unique_ptr<Expression>>(201, "lambda_expr");
416121 auto captures = deserializer.ReadPropertyWithDefault<vector<unique_ptr<Expression>>>(202, "captures");
416122 auto parameter_count = deserializer.ReadPropertyWithDefault<idx_t>(203, "parameter_count");
416123 auto result = duckdb::unique_ptr<BoundLambdaExpression>(new BoundLambdaExpression(deserializer.Get<ExpressionType>(), std::move(return_type), std::move(lambda_expr), parameter_count));
416124 result->captures = std::move(captures);
416125 return std::move(result);
416126}

Member Data Documentation

◆ captures

vector<unique_ptr<Expression> > duckdb::BoundLambdaExpression::captures

Non-lambda constants, column references, and outer lambda parameters that we need to pass into the execution chunk


The documentation for this class was generated from the following file: