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

Public Member Functions

 WindowIndexTree (ClientContext &context, const vector< BoundOrderByNode > &orders, const vector< column_t > &sort_idx, const idx_t count)
 WindowIndexTree (ClientContext &context, const BoundOrderModifier &order_bys, const vector< column_t > &sort_idx, const idx_t count)
unique_ptr< LocalSinkState > GetLocalState (ExecutionContext &context) override
pair< idx_t, idx_t > SelectNth (const SubFrames &frames, idx_t n) const
Public Member Functions inherited from duckdb::WindowMergeSortTree
 WindowMergeSortTree (ClientContext &context, const vector< BoundOrderByNode > &orders, const vector< column_t > &order_idx, const idx_t count, bool unique=false)
optional_ptr< LocalSinkState > InitializeLocalSort (ExecutionContext &context) const
 Make a local sort for a thread.
virtual void Finished ()
 Thread-safe post-sort cleanup.
bool TryPrepareSortStage (WindowMergeSortTreeLocalState &lstate)
 Sort state machine.
void Build ()
 Build the MST in parallel from the sorted data.

Additional Inherited Members

Public Types inherited from duckdb::WindowMergeSortTree
using GlobalSortStatePtr = unique_ptr<GlobalSinkState>
using LocalSortStatePtr = unique_ptr<LocalSinkState>
using MergeSortTree32 = MergeSortTree<uint32_t, uint32_t>
using MergeSortTree64 = MergeSortTree<uint64_t, uint64_t>
Public Attributes inherited from duckdb::WindowMergeSortTree
const vector< column_t > order_idx
 The column indices for sorting.
vector< LogicalType > scan_types
 The sorted data schema.
vector< idx_t > scan_cols
vector< idx_t > key_cols
 The sort key columns.
unique_ptr< Sort > sort
 The sort specification.
GlobalSortStatePtr global_sink
 The sorted data.
unique_ptr< ColumnDataCollection > sorted
 The resulting sorted data.
mutex lock
 Finalize guard.
vector< LocalSortStatePtr > local_sinks
 Local sort set.
atomic< WindowMergeSortStage > build_stage
 Finalize stage.
idx_t total_tasks = 0
 Tasks launched.
idx_t tasks_assigned = 0
 Tasks launched.
atomic< idx_t > tasks_completed
 Tasks landed.
unique_ptr< MergeSortTree32 > mst32
unique_ptr< MergeSortTree64 > mst64
Protected Member Functions inherited from duckdb::WindowMergeSortTree
virtual idx_t MeasurePayloadBlocks ()

Constructor & Destructor Documentation

◆ WindowIndexTree() [1/2]

duckdb::WindowIndexTree::WindowIndexTree ( ClientContext & context,
const vector< BoundOrderByNode > & orders,
const vector< column_t > & sort_idx,
const idx_t count )
256284 : WindowMergeSortTree(context, orders, sort_idx, count) {
256285}

◆ WindowIndexTree() [2/2]

duckdb::WindowIndexTree::WindowIndexTree ( ClientContext & context,
const BoundOrderModifier & order_bys,
const vector< column_t > & sort_idx,
const idx_t count )
256289 : WindowIndexTree(context, order_bys.orders, sort_idx, count) {
256290}

Member Function Documentation

◆ GetLocalState()

unique_ptr< LocalSinkState > duckdb::WindowIndexTree::GetLocalState ( ExecutionContext & context)
overridevirtual

Implements duckdb::WindowMergeSortTree.

256292 {
256293 return make_uniq<WindowIndexTreeLocalState>(context, *this);
256294}

◆ SelectNth()

pair< idx_t, idx_t > duckdb::WindowIndexTree::SelectNth ( const SubFrames & frames,
idx_t n ) const

Find the Nth index in the set of subframes Returns {nth index, 0} or {nth offset, overflow}

256338 {
256339 if (mst32) {
256340 const auto nth = mst32->SelectNth(frames, n);
256341 if (nth.second) {
256342 return nth;
256343 } else {
256344 return {mst32->NthElement(nth.first), 0};
256345 }
256346 } else {
256347 const auto nth = mst64->SelectNth(frames, n);
256348 if (nth.second) {
256349 return nth;
256350 } else {
256351 return {mst64->NthElement(nth.first), 0};
256352 }
256353 }
256354}

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