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

Public Member Functions

 UngroupedAggregateLocalSinkState (const PhysicalUngroupedAggregate &op, const vector< LogicalType > &child_types, UngroupedAggregateGlobalSinkState &gstate_p, ExecutionContext &context)
void InitializeDistinctAggregates (const PhysicalUngroupedAggregate &op, const UngroupedAggregateGlobalSinkState &gstate, ExecutionContext &context)
Public Member Functions inherited from duckdb::LocalSinkState
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Public Attributes

LocalUngroupedAggregateState state
 The local aggregate state.
UngroupedAggregateExecuteState execute_state
 The ungrouped aggregate execute state.
vector< unique_ptr< LocalSinkState > > radix_states
 The local sink states of the distinct aggregates hash tables.
Public Attributes inherited from duckdb::LocalSinkState
SourcePartitionInfo partition_info
 Source partition info.

Constructor & Destructor Documentation

◆ UngroupedAggregateLocalSinkState()

duckdb::UngroupedAggregateLocalSinkState::UngroupedAggregateLocalSinkState ( const PhysicalUngroupedAggregate & op,
const vector< LogicalType > & child_types,
UngroupedAggregateGlobalSinkState & gstate_p,
ExecutionContext & context )
inline
162812 : state(gstate_p.state), execute_state(context.client, op.aggregates, child_types) {
162813 auto &gstate = gstate_p.Cast<UngroupedAggregateGlobalSinkState>();
162814 InitializeDistinctAggregates(op, gstate, context);
162815 }
UngroupedAggregateExecuteState execute_state
The ungrouped aggregate execute state.
Definition duckdb.cpp:162820
LocalUngroupedAggregateState state
The local aggregate state.
Definition duckdb.cpp:162818

Member Function Documentation

◆ InitializeDistinctAggregates()

void duckdb::UngroupedAggregateLocalSinkState::InitializeDistinctAggregates ( const PhysicalUngroupedAggregate & op,
const UngroupedAggregateGlobalSinkState & gstate,
ExecutionContext & context )
inline
162826 {
162827 if (!op.distinct_data) {
162828 return;
162829 }
162830 auto &data = *op.distinct_data;
162831 auto &state = *gstate.distinct_state;
162832 D_ASSERT(!data.radix_tables.empty());
162833
162834 const idx_t aggregate_count = state.radix_states.size();
162835 radix_states.resize(aggregate_count);
162836
162837 auto &distinct_info = *op.distinct_collection_info;
162838
162839 for (auto &idx : distinct_info.indices) {
162840 idx_t table_idx = distinct_info.table_map[idx];
162841 if (data.radix_tables[table_idx] == nullptr) {
162842 // This aggregate has identical input as another aggregate, so no table is created for it
162843 continue;
162844 }
162845 auto &radix_table = *data.radix_tables[table_idx];
162846 radix_states[table_idx] = radix_table.GetLocalSinkState(context);
162847 }
162848 }
vector< unique_ptr< LocalSinkState > > radix_states
The local sink states of the distinct aggregates hash tables.
Definition duckdb.cpp:162822
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

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