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::AggregateSortKeyHelpers Struct Reference

Static Public Member Functions

template<class STATE, class OP, OrderType ORDER_TYPE = OrderType::ASCENDING, bool IGNORE_NULLS = true>
static void UnaryUpdate (Vector inputs[], AggregateInputData &input_data, idx_t input_count, Vector &state_vector, idx_t count)

Member Function Documentation

◆ UnaryUpdate()

template<class STATE, class OP, OrderType ORDER_TYPE = OrderType::ASCENDING, bool IGNORE_NULLS = true>
void duckdb::AggregateSortKeyHelpers::UnaryUpdate ( Vector inputs[],
AggregateInputData & input_data,
idx_t input_count,
Vector & state_vector,
idx_t count )
inlinestatic
210297 {
210298 D_ASSERT(input_count == 1);
210299 auto &input = inputs[0];
210300
210301 Vector sort_key(LogicalType::BLOB);
210302 auto modifiers = OrderModifiers(ORDER_TYPE, OrderByNullType::NULLS_LAST);
210303 CreateSortKeyHelpers::CreateSortKey(input, count, modifiers, sort_key);
210304
210305 UnifiedVectorFormat idata;
210306 if (IGNORE_NULLS) {
210307 input.ToUnifiedFormat(count, idata);
210308 }
210309
210310 UnifiedVectorFormat kdata;
210311 sort_key.ToUnifiedFormat(count, kdata);
210312
210313 UnifiedVectorFormat sdata;
210314 state_vector.ToUnifiedFormat(count, sdata);
210315
210316 auto key_data = UnifiedVectorFormat::GetData<string_t>(kdata);
210317 auto states = UnifiedVectorFormat::GetData<STATE *>(sdata);
210318 for (idx_t i = 0; i < count; i++) {
210319 const auto sidx = sdata.sel->get_index(i);
210320 if (IGNORE_NULLS) {
210321 auto idx = idata.sel->get_index(i);
210322 if (!idata.validity.RowIsValid(idx)) {
210323 continue;
210324 }
210325 }
210326 const auto key_idx = kdata.sel->get_index(i);
210327 auto &state = *states[sidx];
210328 OP::template Execute<string_t, STATE, OP>(state, key_data[key_idx], input_data);
210329 }
210330 }
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

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