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

Public Member Functions

 Executor (ClientContext &context)
 
void Initialize (PhysicalOperator &physical_plan)
 
void Initialize (unique_ptr< PhysicalOperator > physical_plan)
 
void CancelTasks ()
 
PendingExecutionResult ExecuteTask (bool dry_run=false)
 
void WaitForTask ()
 
void SignalTaskRescheduled (lock_guard< mutex > &)
 
void Reset ()
 
vector< LogicalTypeGetTypes ()
 
void PushError (ErrorData exception)
 Push a new error.
 
ErrorData GetError ()
 
bool HasError ()
 True if an error has been thrown.
 
void ThrowException ()
 
void WorkOnTasks ()
 Work on tasks for this specific executor, until there are no tasks remaining.
 
void Flush (ThreadContext &context)
 Flush a thread context into the client context.
 
void RescheduleTask (shared_ptr< Task > &task)
 Reschedules a task that was blocked.
 
void AddToBeRescheduled (shared_ptr< Task > &task)
 Add the task to be rescheduled.
 
idx_t GetPipelinesProgress (ProgressData &progress)
 Returns the progress of the pipelines.
 
void CompletePipeline ()
 
ProducerTokenGetToken ()
 
void AddEvent (shared_ptr< Event > event)
 
void AddRecursiveCTE (PhysicalOperator &rec_cte)
 
void ReschedulePipelines (const vector< shared_ptr< MetaPipeline > > &pipelines, vector< shared_ptr< Event > > &events)
 
bool HasResultCollector ()
 Whether or not the root of the pipeline is a result collector object.
 
bool HasStreamingResultCollector ()
 Whether or not the root of the pipeline is a streaming result collector object.
 
unique_ptr< QueryResultGetResult ()
 Returns the query result - can only be used if HasResultCollector returns true.
 
bool ExecutionIsFinished ()
 Returns true if all pipelines have been completed.
 
void RegisterTask ()
 
void UnregisterTask ()
 
idx_t GetTotalPipelines () const
 
idx_t GetCompletedPipelines () const
 

Static Public Member Functions

static ExecutorGet (ClientContext &context)
 

Public Attributes

ClientContextcontext
 

Static Public Attributes

static constexpr idx_t WAIT_TIME = 20
 

Private Member Functions

bool ResultCollectorIsBlocked ()
 Check if the streaming query result is waiting to be fetched from, must hold the 'executor_lock'.
 
void InitializeInternal (PhysicalOperator &physical_plan)
 
void ScheduleEvents (const vector< shared_ptr< MetaPipeline > > &meta_pipelines)
 
void ScheduleEventsInternal (ScheduleEventData &event_data)
 
void SchedulePipeline (const shared_ptr< MetaPipeline > &pipeline, ScheduleEventData &event_data)
 
bool NextExecutor ()
 
shared_ptr< PipelineCreateChildPipeline (Pipeline &current, PhysicalOperator &op)
 
void VerifyPipeline (Pipeline &pipeline)
 
void VerifyPipelines ()
 

Static Private Member Functions

static void VerifyScheduledEvents (const ScheduleEventData &event_data)
 
static void VerifyScheduledEventsInternal (const idx_t i, const vector< reference< Event > > &vertices, vector< bool > &visited, vector< bool > &recursion_stack)
 

Private Attributes

optional_ptr< PhysicalOperatorphysical_plan
 
unique_ptr< PhysicalOperatorowned_plan
 
mutex executor_lock
 
vector< shared_ptr< Pipeline > > pipelines
 All pipelines of the query plan.
 
vector< shared_ptr< Pipeline > > root_pipelines
 The root pipelines of the query.
 
vector< reference< PhysicalOperator > > recursive_ctes
 The recursive CTE's in this query plan.
 
unique_ptr< PipelineExecutor > root_executor
 The pipeline executor for the root pipeline.
 
idx_t root_pipeline_idx
 The current root pipeline index.
 
unique_ptr< ProducerTokenproducer
 The producer of this query.
 
vector< shared_ptr< Event > > events
 List of events.
 
shared_ptr< QueryProfilerprofiler
 The query profiler.
 
TaskErrorManager error_manager
 Task error manager.
 
atomic< idx_tcompleted_pipelines
 The amount of completed pipelines of the query.
 
idx_t total_pipelines
 The total amount of pipelines in the query.
 
bool cancelled
 Whether or not execution is cancelled.
 
PendingExecutionResult execution_result
 The last pending execution result (if any)
 
shared_ptr< Tasktask
 The current task in process (if any)
 
unordered_map< Task *, shared_ptr< Task > > to_be_rescheduled_tasks
 Task that have been descheduled.
 
std::condition_variable task_reschedule
 The semaphore to signal task rescheduling.
 
atomic< idx_texecutor_tasks
 Currently alive executor tasks.
 
atomic< idx_tblocked_thread_time
 Total time blocked while waiting on tasks. In ticks. One tick corresponds to WAIT_TIME.
 

Friends

class Pipeline
 
class PipelineTask
 
class PipelineBuildState
 

Member Function Documentation

◆ ThrowException()

void duckdb::Executor::ThrowException ( )

Throw the exception that was pushed using PushError. Should only be called if HasError returns true

◆ CompletePipeline()

void duckdb::Executor::CompletePipeline ( )
inline
27036 {
27038 }
atomic< idx_t > completed_pipelines
The amount of completed pipelines of the query.
Definition duckdb.hpp:27118

◆ GetToken()

ProducerToken & duckdb::Executor::GetToken ( )
inline
27039 {
27040 return *producer;
27041 }
unique_ptr< ProducerToken > producer
The producer of this query.
Definition duckdb.hpp:27109

◆ RegisterTask()

void duckdb::Executor::RegisterTask ( )
inline
27057 {
27059 }
atomic< idx_t > executor_tasks
Currently alive executor tasks.
Definition duckdb.hpp:27135

◆ UnregisterTask()

void duckdb::Executor::UnregisterTask ( )
inline
27060 {
27062 }

◆ GetTotalPipelines()

idx_t duckdb::Executor::GetTotalPipelines ( ) const
inline
27064 {
27065 return total_pipelines;
27066 }
idx_t total_pipelines
The total amount of pipelines in the query.
Definition duckdb.hpp:27120

◆ GetCompletedPipelines()

idx_t duckdb::Executor::GetCompletedPipelines ( ) const
inline
27068 {
27069 return completed_pipelines.load();
27070 }

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