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::ExpressionState Struct Reference
Inheritance diagram for duckdb::ExpressionState:
Collaboration diagram for duckdb::ExpressionState:

Public Member Functions

 ExpressionState (const Expression &expr, ExpressionExecutorState &root)
void AddChild (Expression &child_expr)
void Finalize ()
Allocator & GetAllocator ()
bool HasContext ()
DUCKDB_API ClientContext & GetContext ()
void Verify (ExpressionExecutorState &root)
virtual void ResetDictionaryStates ()
 Reset any cached dictionary expression states in this expression state and its children.
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Public Attributes

const Expression & expr
ExpressionExecutorState & root
vector< unique_ptr< ExpressionState > > child_states
vector< LogicalType > types
DataChunk intermediate_chunk
vector< bool > initialize

Constructor & Destructor Documentation

◆ ExpressionState()

duckdb::ExpressionState::ExpressionState ( const Expression & expr,
ExpressionExecutorState & root )
150283 : expr(expr), root(root) {
150284}

◆ ~ExpressionState()

virtual duckdb::ExpressionState::~ExpressionState ( )
inlinevirtual
14038 {
14039 }

Member Function Documentation

◆ AddChild()

void duckdb::ExpressionState::AddChild ( Expression & child_expr)
150250 {
150251 types.push_back(child_expr.return_type);
150252 auto child_state = ExpressionExecutor::InitializeState(child_expr, root);
150253 child_states.push_back(std::move(child_state));
150254
150255 auto expr_class = child_expr.GetExpressionClass();
150256 auto initialize_child = expr_class != ExpressionClass::BOUND_REF && expr_class != ExpressionClass::BOUND_CONSTANT &&
150257 expr_class != ExpressionClass::BOUND_PARAMETER;
150258 initialize.push_back(initialize_child);
150259}
static unique_ptr< ExpressionState > InitializeState(const Expression &expr, ExpressionExecutorState &state)
Initialize the state of a given expression.
Definition duckdb.cpp:150065

◆ Finalize()

void duckdb::ExpressionState::Finalize ( )
150261 {
150262 if (types.empty()) {
150263 return;
150264 }
150265 intermediate_chunk.Initialize(GetAllocator(), types, initialize);
150266}

◆ GetAllocator()

Allocator & duckdb::ExpressionState::GetAllocator ( )
150268 {
150269 return root.executor->GetAllocator();
150270}

◆ HasContext()

bool duckdb::ExpressionState::HasContext ( )
150272 {
150273 return root.executor->HasContext();
150274}

◆ GetContext()

ClientContext & duckdb::ExpressionState::GetContext ( )
150276 {
150277 if (!HasContext()) {
150278 throw BinderException("Cannot use %s in this context", (expr.Cast<BoundFunctionExpression>()).function.name);
150279 }
150280 return root.executor->GetContext();
150281}

◆ Verify()

void duckdb::ExpressionState::Verify ( ExpressionExecutorState & root)
150289 {
150290 D_ASSERT(&root_executor == &root);
150291 for (auto &entry : child_states) {
150292 entry->Verify(root_executor);
150293 }
150294}

◆ ResetDictionaryStates()

void duckdb::ExpressionState::ResetDictionaryStates ( )
virtual

Reset any cached dictionary expression states in this expression state and its children.

Reimplemented in duckdb::ExecuteFunctionState.

150296 {
150297 for (const auto &child : child_states) {
150298 child->ResetDictionaryStates();
150299 }
150300}

◆ Cast() [1/2]

template<class TARGET>
TARGET & duckdb::ExpressionState::Cast ( )
inline
14062 {
14063 DynamicCastCheck<TARGET>(this);
14064 return reinterpret_cast<TARGET &>(*this);
14065 }

◆ Cast() [2/2]

template<class TARGET>
const TARGET & duckdb::ExpressionState::Cast ( ) const
inline
14067 {
14068 DynamicCastCheck<TARGET>(this);
14069 return reinterpret_cast<const TARGET &>(*this);
14070 }

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