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

Public Member Functions

 SortGlobalSourceState (const Sort &sort, ClientContext &context, SortGlobalSinkState &sink_p)
idx_t MaxThreads () override
void Destroy ()
Public Member Functions inherited from duckdb::GlobalSourceState
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const
Public Member Functions inherited from duckdb::StateWithBlockableTasks
unique_lock< mutex > Lock ()
void PreventBlocking (const unique_lock< mutex > &guard)
bool BlockTask (const unique_lock< mutex > &guard, const InterruptState &interrupt_state)
 Add a task to 'blocked_tasks' before returning SourceResultType::BLOCKED (must hold the lock).
bool CanBlock (const unique_lock< mutex > &guard) const
bool UnblockTasks (const unique_lock< mutex > &guard)
 Unblock all tasks (must hold the lock).
SinkResultType BlockSink (const unique_lock< mutex > &guard, const InterruptState &interrupt_state)
SourceResultType BlockSource (const unique_lock< mutex > &guard, const InterruptState &interrupt_state)
void VerifyLock (const unique_lock< mutex > &guard) const

Public Attributes

SortGlobalSinkState & sink
 The global sink state.
SortedRunMerger merger
 Sorted run merger and associated global state.
unique_ptr< GlobalSourceState > merger_global_state
unique_ptr< BatchedDataCollection > column_data
 Materialized column data (optional).

Constructor & Destructor Documentation

◆ SortGlobalSourceState()

duckdb::SortGlobalSourceState::SortGlobalSourceState ( const Sort & sort,
ClientContext & context,
SortGlobalSinkState & sink_p )
inline
103470 : sink(sink_p), merger(sort, std::move(sink.sorted_runs), sink.partition_size, sink.external, false),
103471 merger_global_state(merger.total_count == 0 ? nullptr : merger.GetGlobalSourceState(context)) {
103472 // TODO: we want to pass "sort.is_index_sort" instead of just "false" here
103473 // so that we can do an approximate sort, but that causes issues in the ART
103474 }
SortedRunMerger merger
Sorted run merger and associated global state.
Definition duckdb.cpp:103494
SortGlobalSinkState & sink
The global sink state.
Definition duckdb.cpp:103492

Member Function Documentation

◆ MaxThreads()

idx_t duckdb::SortGlobalSourceState::MaxThreads ( )
inlineoverridevirtual

Reimplemented from duckdb::GlobalSourceState.

103477 {
103478 return merger_global_state ? merger_global_state->MaxThreads() : 1;
103479 }

◆ Destroy()

void duckdb::SortGlobalSourceState::Destroy ( )
inline
103481 {
103482 if (!merger_global_state) {
103483 return;
103484 }
103485 auto guard = merger_global_state->Lock();
103486 merger.sorted_runs.clear();
103487 sink.temporary_memory_state.reset();
103488 }

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