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::SelectBindState Struct Reference

Bind state during a SelectNode. More...

Collaboration diagram for duckdb::SelectBindState:

Public Member Functions

unique_ptr< ParsedExpression > BindAlias (idx_t index)
void SetExpressionIsVolatile (idx_t index)
void SetExpressionHasSubquery (idx_t index)
bool AliasHasSubquery (idx_t index) const
void AddExpandedColumn (idx_t expand_count)
void AddRegularColumn ()
idx_t GetFinalIndex (idx_t index) const

Public Attributes

case_insensitive_map_t< idx_t > alias_map
parsed_expression_map_t< idx_t > projection_map
vector< unique_ptr< ParsedExpression > > original_expressions

Private Attributes

unordered_set< idx_t > referenced_aliases
 The set of referenced aliases.
unordered_set< idx_t > volatile_expressions
 The set of expressions that is volatile.
unordered_set< idx_t > subquery_expressions
 The set of expressions that contains a subquery.
vector< idx_t > expanded_column_indices
 Column indices after expansion of Expanded expressions (e.g. UNNEST(STRUCT) clauses).

Detailed Description

Bind state during a SelectNode.

Member Function Documentation

◆ BindAlias()

unique_ptr< ParsedExpression > duckdb::SelectBindState::BindAlias ( idx_t index)
378496 {
378497 if (volatile_expressions.find(index) != volatile_expressions.end()) {
378498 throw BinderException("Alias \"%s\" referenced - but the expression has side "
378499 "effects. This is not yet supported.",
378500 original_expressions[index]->GetAlias());
378501 }
378502 referenced_aliases.insert(index);
378503 return original_expressions[index]->Copy();
378504}
index
unordered_set< idx_t > volatile_expressions
The set of expressions that is volatile.
Definition duckdb.cpp:297878
vector< unique_ptr< ParsedExpression > > original_expressions
Definition duckdb.cpp:297860
unordered_set< idx_t > referenced_aliases
The set of referenced aliases.
Definition duckdb.cpp:297876

◆ SetExpressionIsVolatile()

void duckdb::SelectBindState::SetExpressionIsVolatile ( idx_t index)
378506 {
378507 // check if this expression has been referenced before
378508 if (referenced_aliases.find(index) != referenced_aliases.end()) {
378509 throw BinderException("Alias \"%s\" referenced - but the expression has side "
378510 "effects. This is not yet supported.",
378511 original_expressions[index]->GetAlias());
378512 }
378513 volatile_expressions.insert(index);
378514}

◆ SetExpressionHasSubquery()

void duckdb::SelectBindState::SetExpressionHasSubquery ( idx_t index)
378516 {
378517 subquery_expressions.insert(index);
378518}
unordered_set< idx_t > subquery_expressions
The set of expressions that contains a subquery.
Definition duckdb.cpp:297880

◆ AliasHasSubquery()

bool duckdb::SelectBindState::AliasHasSubquery ( idx_t index) const
378520 {
378521 return subquery_expressions.find(index) != subquery_expressions.end();
378522}

◆ AddExpandedColumn()

void duckdb::SelectBindState::AddExpandedColumn ( idx_t expand_count)
378524 {
378525 if (expanded_column_indices.empty()) {
378526 expanded_column_indices.push_back(0);
378527 }
378528 expanded_column_indices.push_back(expanded_column_indices.back() + expand_count);
378529}
vector< idx_t > expanded_column_indices
Column indices after expansion of Expanded expressions (e.g. UNNEST(STRUCT) clauses).
Definition duckdb.cpp:297882

◆ AddRegularColumn()

void duckdb::SelectBindState::AddRegularColumn ( )
378531 {
378532 AddExpandedColumn(1);
378533}

◆ GetFinalIndex()

idx_t duckdb::SelectBindState::GetFinalIndex ( idx_t index) const
378535 {
378536 if (index >= expanded_column_indices.size()) {
378537 return index;
378538 }
378540}

Member Data Documentation

◆ original_expressions

vector<unique_ptr<ParsedExpression> > duckdb::SelectBindState::original_expressions

The original unparsed expressions. This is exported after binding, because the binding might change the expressions (e.g. when a * clause is present)


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