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

Public Member Functions

DUCKDB_API AggregateFunctionSet (string name)
DUCKDB_API AggregateFunctionSet (AggregateFunction fun)
DUCKDB_API AggregateFunction GetFunctionByArguments (ClientContext &context, const vector< LogicalType > &arguments)
Public Member Functions inherited from duckdb::FunctionSet< AggregateFunction >
 FunctionSet (string name)
void AddFunction (AggregateFunction function)
idx_t Size ()
AggregateFunction GetFunctionByOffset (idx_t offset)
AggregateFunction & GetFunctionReferenceByOffset (idx_t offset)
bool MergeFunctionSet (FunctionSet< AggregateFunction > new_functions, bool override=false)

Additional Inherited Members

Public Attributes inherited from duckdb::FunctionSet< AggregateFunction >
string name
 The name of the function set.
vector< AggregateFunction > functions
 The set of functions.

Constructor & Destructor Documentation

◆ AggregateFunctionSet() [1/3]

duckdb::AggregateFunctionSet::AggregateFunctionSet ( )
explicit
222804 : FunctionSet("") {
222805}

◆ AggregateFunctionSet() [2/3]

duckdb::AggregateFunctionSet::AggregateFunctionSet ( string name)
explicit
222807 : FunctionSet(std::move(name)) {
222808}
string name
Definition duckdb.hpp:44066

◆ AggregateFunctionSet() [3/3]

duckdb::AggregateFunctionSet::AggregateFunctionSet ( AggregateFunction fun)
explicit
222810 : FunctionSet(std::move(fun.name)) {
222811 functions.push_back(std::move(fun));
222812}
vector< AggregateFunction > functions
Definition duckdb.hpp:44068

Member Function Documentation

◆ GetFunctionByArguments()

AggregateFunction duckdb::AggregateFunctionSet::GetFunctionByArguments ( ClientContext & context,
const vector< LogicalType > & arguments )
222815 {
222816 ErrorData error;
222817 FunctionBinder binder(context);
222818 auto index = binder.BindFunction(name, *this, arguments, error);
222819 if (!index.IsValid()) {
222820 // check if the arguments are a prefix of any of the arguments
222821 // this is used for functions such as quantile or string_agg that delete part of their arguments during bind
222822 // FIXME: we should come up with a better solution here
222823 for (auto &func : functions) {
222824 if (arguments.size() >= func.arguments.size()) {
222825 continue;
222826 }
222827 bool is_prefix = true;
222828 for (idx_t k = 0; k < arguments.size(); k++) {
222829 if (arguments[k].id() != func.arguments[k].id()) {
222830 is_prefix = false;
222831 break;
222832 }
222833 }
222834 if (is_prefix) {
222835 return func;
222836 }
222837 }
222838 throw InternalException("Failed to find function %s(%s)\n%s", name, StringUtil::ToString(arguments, ","),
222839 error.Message());
222840 }
222841 return GetFunctionByOffset(index.GetIndex());
222842}
index
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 files: