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::DistinctAggregateState Struct Reference
Collaboration diagram for duckdb::DistinctAggregateState:

Public Member Functions

 DistinctAggregateState (const DistinctAggregateData &data, ClientContext &client)
 Stateful data for the distinct aggregates.

Public Attributes

ExpressionExecutor child_executor
 The executor.
vector< unique_ptr< GlobalSinkState > > radix_states
 The global sink states of the hash tables.
vector< unique_ptr< DataChunk > > distinct_output_chunks
 Output chunks to receive distinct data from hashtables.

Constructor & Destructor Documentation

◆ DistinctAggregateState()

duckdb::DistinctAggregateState::DistinctAggregateState ( const DistinctAggregateData & data,
ClientContext & client )

Stateful data for the distinct aggregates.

This table is unused because the aggregate shares its data with another

159668 : child_executor(client) {
159669 radix_states.resize(data.info.table_count);
159670 distinct_output_chunks.resize(data.info.table_count);
159671
159672 idx_t aggregate_count = data.info.aggregates.size();
159673 for (idx_t i = 0; i < aggregate_count; i++) {
159674 auto &aggregate = data.info.aggregates[i]->Cast<BoundAggregateExpression>();
159675
159676 // Initialize the child executor and get the payload types for every aggregate
159677 for (auto &child : aggregate.children) {
159678 child_executor.AddExpression(*child);
159679 }
159680 if (!aggregate.IsDistinct()) {
159681 continue;
159682 }
159683 D_ASSERT(data.info.table_map.count(i));
159684 idx_t table_idx = data.info.table_map.at(i);
159685 if (data.radix_tables[table_idx] == nullptr) {
159687 continue;
159688 }
159689
159690 // Get the global sinkstate for the aggregate
159691 auto &radix_table = *data.radix_tables[table_idx];
159692 radix_states[table_idx] = radix_table.GetGlobalSinkState(client);
159693
159694 // Fill the chunk_types (group_by + children)
159695 vector<LogicalType> chunk_types;
159696 for (auto &group_type : data.grouped_aggregate_data[table_idx]->group_types) {
159697 chunk_types.push_back(group_type);
159698 }
159699
159700 // This is used in Finalize to get the data from the radix table
159701 distinct_output_chunks[table_idx] = make_uniq<DataChunk>();
159702 distinct_output_chunks[table_idx]->Initialize(client, chunk_types);
159703 }
159704}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
vector< unique_ptr< DataChunk > > distinct_output_chunks
Output chunks to receive distinct data from hashtables.
Definition duckdb.cpp:99225
ExpressionExecutor child_executor
The executor.
Definition duckdb.cpp:99221
vector< unique_ptr< GlobalSinkState > > radix_states
The global sink states of the hash tables.
Definition duckdb.cpp:99223

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