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

Public Member Functions

 WindowPeerLocalState (ExecutionContext &context, const WindowPeerGlobalState &gpstate)
void Sink (ExecutionContext &context, DataChunk &sink_chunk, DataChunk &coll_chunk, idx_t input_idx, OperatorSinkInput &sink) override
 Accumulate the secondary sort values.
void Finalize (ExecutionContext &context, CollectionPtr collection, OperatorSinkInput &sink) override
 Finish the sinking and prepare to scan.
void NextRank (idx_t partition_begin, idx_t peer_begin, idx_t row_idx)
Public Member Functions inherited from duckdb::WindowExecutorBoundsLocalState
 WindowExecutorBoundsLocalState (ExecutionContext &context, const WindowExecutorGlobalState &gstate)
virtual void UpdateBounds (WindowExecutorGlobalState &gstate, idx_t row_idx, DataChunk &eval_chunk, optional_ptr< WindowCursor > range)
Public Member Functions inherited from duckdb::WindowExecutorLocalState
 WindowExecutorLocalState (ExecutionContext &context, const WindowExecutorGlobalState &gstate)
Public Member Functions inherited from duckdb::LocalSinkState
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Public Attributes

idx_t row_idx = DConstants::INVALID_INDEX
uint64_t dense_rank = 1
uint64_t rank_equal = 0
uint64_t rank = 1
const WindowPeerGlobalState & gpstate
 The corresponding global peer state.
unique_ptr< LocalSinkState > local_tree
 The optional sorting state for secondary sorts.
Public Attributes inherited from duckdb::WindowExecutorBoundsLocalState
const ValidityMask & partition_mask
const ValidityMask & order_mask
DataChunk bounds
WindowBoundariesState state
Public Attributes inherited from duckdb::WindowExecutorLocalState
unique_ptr< WindowCursor > range_cursor
 The state used for reading the range collection.
Public Attributes inherited from duckdb::LocalSinkState
SourcePartitionInfo partition_info
 Source partition info.

Additional Inherited Members

Public Types inherited from duckdb::WindowExecutorLocalState
using CollectionPtr = optional_ptr<WindowCollection>

Constructor & Destructor Documentation

◆ WindowPeerLocalState()

duckdb::WindowPeerLocalState::WindowPeerLocalState ( ExecutionContext & context,
const WindowPeerGlobalState & gpstate )
inline
257053 : WindowExecutorBoundsLocalState(context, gpstate), gpstate(gpstate) {
257054 if (gpstate.token_tree) {
257055 local_tree = gpstate.token_tree->GetLocalState(context);
257056 }
257057 }
const WindowPeerGlobalState & gpstate
The corresponding global peer state.
Definition duckdb.cpp:257073
unique_ptr< LocalSinkState > local_tree
The optional sorting state for secondary sorts.
Definition duckdb.cpp:257075

Member Function Documentation

◆ Sink()

void duckdb::WindowPeerLocalState::Sink ( ExecutionContext & context,
DataChunk & sink_chunk,
DataChunk & coll_chunk,
idx_t input_idx,
OperatorSinkInput & sink )
overridevirtual

Accumulate the secondary sort values.

Reimplemented from duckdb::WindowExecutorLocalState.

257079 {
257080 WindowExecutorBoundsLocalState::Sink(context, sink_chunk, coll_chunk, input_idx, sink);
257081
257082 if (local_tree) {
257083 auto &local_tokens = local_tree->Cast<WindowMergeSortTreeLocalState>();
257084 local_tokens.Sink(context, sink_chunk, input_idx, nullptr, 0, sink.interrupt_state);
257085 }
257086}
Here is the call graph for this function:

◆ Finalize()

void duckdb::WindowPeerLocalState::Finalize ( ExecutionContext & context,
CollectionPtr collection,
OperatorSinkInput & sink )
overridevirtual

Finish the sinking and prepare to scan.

Reimplemented from duckdb::WindowExecutorLocalState.

257088 {
257089 WindowExecutorBoundsLocalState::Finalize(context, collection, sink);
257090
257091 if (local_tree) {
257092 auto &local_tokens = local_tree->Cast<WindowMergeSortTreeLocalState>();
257093 local_tokens.Finalize(context, sink.interrupt_state);
257094 local_tokens.window_tree.Build();
257095 }
257096}
Here is the call graph for this function:

◆ NextRank()

void duckdb::WindowPeerLocalState::NextRank ( idx_t partition_begin,
idx_t peer_begin,
idx_t row_idx )
257098 {
257099 if (partition_begin == row_idx) {
257100 dense_rank = 1;
257101 rank = 1;
257102 rank_equal = 0;
257103 } else if (peer_begin == row_idx) {
257104 dense_rank++;
257105 rank += rank_equal;
257106 rank_equal = 0;
257107 }
257108 rank_equal++;
257109}

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