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::BoundExpression Class Reference
Inheritance diagram for duckdb::BoundExpression:
Collaboration diagram for duckdb::BoundExpression:

Public Member Functions

 BoundExpression (unique_ptr< Expression > expr)
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.
hash_t Hash () const override
unique_ptr< ParsedExpression > Copy () const override
 Create a copy of this expression.
void Serialize (Serializer &serializer) const override
Public Member Functions inherited from duckdb::ParsedExpression
 ParsedExpression (ExpressionType type, ExpressionClass expression_class)
 Create an Expression.
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.
bool Equals (const BaseExpression &other) const override
 Returns true if this expression is equal to another expression.
hash_t Hash () const override
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 > & GetExpression (ParsedExpression &expr)
Static Public Member Functions inherited from duckdb::ParsedExpression
static unique_ptr< ParsedExpression > Deserialize (Deserializer &deserializer)
static bool Equals (const unique_ptr< ParsedExpression > &left, const unique_ptr< ParsedExpression > &right)
static bool ListEquals (const vector< unique_ptr< ParsedExpression > > &left, const vector< unique_ptr< ParsedExpression > > &right)
Static Public Member Functions inherited from duckdb::BaseExpression
static bool Equals (const BaseExpression &left, const BaseExpression &right)

Public Attributes

unique_ptr< Expression > expr
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_EXPRESSION

Additional Inherited Members

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

Detailed Description

BoundExpression is an intermediate dummy class used by the binder. It is a ParsedExpression but holds an Expression. It represents a successfully bound expression. It is used in the Binder to prevent re-binding of already bound parts when dealing with subqueries.

Constructor & Destructor Documentation

◆ BoundExpression()

duckdb::BoundExpression::BoundExpression ( unique_ptr< Expression > expr)
explicit
376210 : ParsedExpression(ExpressionType::INVALID, ExpressionClass::BOUND_EXPRESSION), expr(std::move(expr_p)) {
376211 this->alias = expr->GetAlias();
376212}
string alias
The alias of the expression,.
Definition duckdb.hpp:13293
ParsedExpression(ExpressionType type, ExpressionClass expression_class)
Create an Expression.
Definition duckdb.hpp:13557

Member Function Documentation

◆ GetExpression()

unique_ptr< Expression > & duckdb::BoundExpression::GetExpression ( ParsedExpression & expr)
static
376214 {
376215 auto &bound_expr = expr.Cast<BoundExpression>();
376216 if (!bound_expr.expr) {
376217 throw InternalException("BoundExpression::GetExpression called on empty bound expression");
376218 }
376219 return bound_expr.expr;
376220}

◆ ToString()

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

Convert the Expression to a String.

Implements duckdb::BaseExpression.

376222 {
376223 if (!expr) {
376224 throw InternalException("ToString(): BoundExpression does not have a child");
376225 }
376226 return expr->ToString();
376227}

◆ Equals()

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

Returns true if this expression is equal to another expression.

Reimplemented from duckdb::BaseExpression.

376229 {
376230 return false;
376231}

◆ Hash()

hash_t duckdb::BoundExpression::Hash ( ) const
overridevirtual

Creates a hash value of this expression. It is important that if two expressions are identical (i.e. Expression::Equals() returns true), that their hash value is identical as well.

Implements duckdb::BaseExpression.

376232 {
376233 return 0;
376234}

◆ Copy()

unique_ptr< ParsedExpression > duckdb::BoundExpression::Copy ( ) const
overridevirtual

Create a copy of this expression.

Implements duckdb::ParsedExpression.

376236 {
376237 throw SerializationException("Cannot copy bound expression");
376238}

◆ Serialize()

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

Reimplemented from duckdb::ParsedExpression.

376240 {
376241 throw SerializationException("Cannot serialize bound expression");
376242}

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