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

Public Member Functions

 AggregateFunction (const string &name, const vector< LogicalType > &arguments, const LogicalType &return_type, aggregate_size_t state_size, aggregate_initialize_t initialize, aggregate_update_t update, aggregate_combine_t combine, aggregate_finalize_t finalize, FunctionNullHandling null_handling=FunctionNullHandling::DEFAULT_NULL_HANDLING, aggregate_simple_update_t simple_update=nullptr, bind_aggregate_function_t bind=nullptr, aggregate_destructor_t destructor=nullptr, aggregate_statistics_t statistics=nullptr, aggregate_window_t window=nullptr, aggregate_serialize_t serialize=nullptr, aggregate_deserialize_t deserialize=nullptr)
 
 AggregateFunction (const string &name, const vector< LogicalType > &arguments, const LogicalType &return_type, aggregate_size_t state_size, aggregate_initialize_t initialize, aggregate_update_t update, aggregate_combine_t combine, aggregate_finalize_t finalize, aggregate_simple_update_t simple_update=nullptr, bind_aggregate_function_t bind=nullptr, aggregate_destructor_t destructor=nullptr, aggregate_statistics_t statistics=nullptr, aggregate_window_t window=nullptr, aggregate_serialize_t serialize=nullptr, aggregate_deserialize_t deserialize=nullptr)
 
 AggregateFunction (const vector< LogicalType > &arguments, const LogicalType &return_type, aggregate_size_t state_size, aggregate_initialize_t initialize, aggregate_update_t update, aggregate_combine_t combine, aggregate_finalize_t finalize, FunctionNullHandling null_handling=FunctionNullHandling::DEFAULT_NULL_HANDLING, aggregate_simple_update_t simple_update=nullptr, bind_aggregate_function_t bind=nullptr, aggregate_destructor_t destructor=nullptr, aggregate_statistics_t statistics=nullptr, aggregate_window_t window=nullptr, aggregate_serialize_t serialize=nullptr, aggregate_deserialize_t deserialize=nullptr)
 
 AggregateFunction (const vector< LogicalType > &arguments, const LogicalType &return_type, aggregate_size_t state_size, aggregate_initialize_t initialize, aggregate_update_t update, aggregate_combine_t combine, aggregate_finalize_t finalize, aggregate_simple_update_t simple_update=nullptr, bind_aggregate_function_t bind=nullptr, aggregate_destructor_t destructor=nullptr, aggregate_statistics_t statistics=nullptr, aggregate_window_t window=nullptr, aggregate_serialize_t serialize=nullptr, aggregate_deserialize_t deserialize=nullptr)
 
 AggregateFunction (const vector< LogicalType > &arguments, const LogicalType &return_type, aggregate_size_t state_size, aggregate_initialize_t initialize, aggregate_wininit_t window_init, aggregate_window_t window, bind_aggregate_function_t bind=nullptr, aggregate_destructor_t destructor=nullptr, aggregate_statistics_t statistics=nullptr, aggregate_serialize_t serialize=nullptr, aggregate_deserialize_t deserialize=nullptr)
 
bool HasBindCallback () const
 
bind_aggregate_function_t GetBindCallback () const
 
void SetBindCallback (bind_aggregate_function_t callback)
 
bool HasStateInitCallback () const
 
aggregate_initialize_t GetStateInitCallback () const
 
void SetStateInitCallback (aggregate_initialize_t callback)
 
bool HasStateSizeCallback () const
 
aggregate_size_t GetStateSizeCallback () const
 
void SetStateSizeCallback (aggregate_size_t callback)
 
bool HasStateDestructorCallback () const
 
aggregate_destructor_t GetStateDestructorCallback () const
 
void SetStateDestructorCallback (aggregate_destructor_t callback)
 
bool HasStateUpdateCallback () const
 
aggregate_update_t GetStateUpdateCallback () const
 
void SetStateUpdateCallback (aggregate_update_t callback)
 
bool HasStateSimpleUpdateCallback () const
 
aggregate_simple_update_t GetStateSimpleUpdateCallback () const
 
void SetStateSimpleUpdateCallback (aggregate_simple_update_t callback)
 
void SetStateCombineCallback (aggregate_combine_t callback)
 
aggregate_combine_t GetStateCombineCallback () const
 
bool HasStateCombineCallback () const
 
void SetStateFinalizeCallback (aggregate_finalize_t callback)
 
aggregate_finalize_t GetStateFinalizeCallback () const
 
bool HasStateFinalizeCallback () const
 
bool HasWindowCallback () const
 
aggregate_window_t GetWindowCallback () const
 
void SetWindowCallback (aggregate_window_t callback)
 
void SetWindowInitCallback (aggregate_wininit_t callback)
 
aggregate_wininit_t GetWindowInitCallback () const
 
bool HasWindowInitCallback () const
 
bool HasStatisticsCallback () const
 
aggregate_statistics_t GetStatisticsCallback () const
 
void SetStatisticsCallback (aggregate_statistics_t callback)
 
bool HasSerializationCallbacks () const
 
void SetSerializeCallback (aggregate_serialize_t callback)
 
void SetDeserializeCallback (aggregate_deserialize_t callback)
 
aggregate_serialize_t GetSerializeCallback () const
 
aggregate_deserialize_t GetDeserializeCallback () const
 
AggregateOrderDependent GetOrderDependent () const
 
void SetOrderDependent (AggregateOrderDependent value)
 
AggregateDistinctDependent GetDistinctDependent () const
 
void SetDistinctDependent (AggregateDistinctDependent value)
 
bool operator== (const AggregateFunction &rhs) const
 
bool operator!= (const AggregateFunction &rhs) const
 
bool CanAggregate () const
 
bool CanWindow () const
 
- Public Member Functions inherited from duckdb::BaseScalarFunction
DUCKDB_API BaseScalarFunction (string name, vector< LogicalType > arguments, LogicalType return_type, FunctionStability stability, LogicalType varargs=LogicalType(LogicalTypeId::INVALID), FunctionNullHandling null_handling=FunctionNullHandling::DEFAULT_NULL_HANDLING, FunctionErrors errors=FunctionErrors::CANNOT_ERROR)
 
void SetReturnType (LogicalType return_type_p)
 
const LogicalTypeGetReturnType () const
 
LogicalTypeGetReturnType ()
 
FunctionStability GetStability () const
 
void SetStability (FunctionStability stability_p)
 
FunctionNullHandling GetNullHandling () const
 
void SetNullHandling (FunctionNullHandling null_handling_p)
 
FunctionErrors GetErrorMode () const
 
void SetErrorMode (FunctionErrors errors_p)
 
void SetFallible ()
 Set this functions error-mode as fallible (can throw runtime errors)
 
void SetVolatile ()
 Set this functions stability as volatile (can not be cached per row)
 
void SetCollationHandling (FunctionCollationHandling collation_handling_p)
 
FunctionCollationHandling GetCollationHandling () const
 
DUCKDB_API hash_t Hash () const
 
DUCKDB_API string ToString () const override
 
- Public Member Functions inherited from duckdb::SimpleFunction
DUCKDB_API SimpleFunction (string name, vector< LogicalType > arguments, LogicalType varargs=LogicalType(LogicalTypeId::INVALID))
 
DUCKDB_API bool HasVarArgs () const
 
- Public Member Functions inherited from duckdb::Function
DUCKDB_API Function (string name)
 

Static Public Member Functions

template<class STATE , class RESULT_TYPE , class OP >
static AggregateFunction NullaryAggregate (LogicalType return_type)
 
template<class STATE , class INPUT_TYPE , class RESULT_TYPE , class OP , AggregateDestructorType destructor_type = AggregateDestructorType::STANDARD>
static AggregateFunction UnaryAggregate (const LogicalType &input_type, LogicalType return_type, FunctionNullHandling null_handling=FunctionNullHandling::DEFAULT_NULL_HANDLING)
 
template<class STATE , class INPUT_TYPE , class RESULT_TYPE , class OP , AggregateDestructorType destructor_type = AggregateDestructorType::STANDARD>
static AggregateFunction UnaryAggregateDestructor (LogicalType input_type, LogicalType return_type)
 
template<class STATE , class A_TYPE , class B_TYPE , class RESULT_TYPE , class OP , AggregateDestructorType destructor_type = AggregateDestructorType::STANDARD>
static AggregateFunction BinaryAggregate (const LogicalType &a_type, const LogicalType &b_type, LogicalType return_type)
 
template<class STATE >
static idx_t StateSize (const AggregateFunction &)
 
template<class STATE , class OP , AggregateDestructorType destructor_type = AggregateDestructorType::STANDARD>
static void StateInitialize (const AggregateFunction &, data_ptr_t state)
 
template<class STATE , class OP >
static void NullaryScatterUpdate (Vector inputs[], AggregateInputData &aggr_input_data, idx_t input_count, Vector &states, idx_t count)
 
template<class STATE , class OP >
static void NullaryUpdate (Vector inputs[], AggregateInputData &aggr_input_data, idx_t input_count, data_ptr_t state, idx_t count)
 
template<class STATE , class T , class OP >
static void UnaryScatterUpdate (Vector inputs[], AggregateInputData &aggr_input_data, idx_t input_count, Vector &states, idx_t count)
 
template<class STATE , class INPUT_TYPE , class OP >
static void UnaryUpdate (Vector inputs[], AggregateInputData &aggr_input_data, idx_t input_count, data_ptr_t state, idx_t count)
 
template<class STATE , class A_TYPE , class B_TYPE , class OP >
static void BinaryScatterUpdate (Vector inputs[], AggregateInputData &aggr_input_data, idx_t input_count, Vector &states, idx_t count)
 
template<class STATE , class A_TYPE , class B_TYPE , class OP >
static void BinaryUpdate (Vector inputs[], AggregateInputData &aggr_input_data, idx_t input_count, data_ptr_t state, idx_t count)
 
template<class STATE , class OP >
static void StateCombine (Vector &source, Vector &target, AggregateInputData &aggr_input_data, idx_t count)
 
template<class STATE , class RESULT_TYPE , class OP >
static void StateFinalize (Vector &states, AggregateInputData &aggr_input_data, Vector &result, idx_t count, idx_t offset)
 
template<class STATE , class OP >
static void StateVoidFinalize (Vector &states, AggregateInputData &aggr_input_data, Vector &result, idx_t count, idx_t offset)
 
template<class STATE , class OP >
static void StateDestroy (Vector &states, AggregateInputData &aggr_input_data, idx_t count)
 
- Static Public Member Functions inherited from duckdb::BaseScalarFunction
static BaseScalarFunction SetReturnsError (BaseScalarFunction &function)
 
- Static Public Member Functions inherited from duckdb::Function
static DUCKDB_API string CallToString (const string &catalog_name, const string &schema_name, const string &name, const vector< LogicalType > &arguments, const LogicalType &varargs=LogicalType::INVALID)
 Returns the formatted string name(arg1, arg2, ...)
 
static DUCKDB_API string CallToString (const string &catalog_name, const string &schema_name, const string &name, const vector< LogicalType > &arguments, const LogicalType &varargs, const LogicalType &return_type)
 Returns the formatted string name(arg1, arg2..) -> return_type.
 
static DUCKDB_API string CallToString (const string &catalog_name, const string &schema_name, const string &name, const vector< LogicalType > &arguments, const named_parameter_type_map_t &named_parameters)
 Returns the formatted string name(arg1, arg2.., np1=a, np2=b, ...)
 
static DUCKDB_API void EraseArgument (SimpleFunction &bound_function, vector< unique_ptr< Expression > > &arguments, idx_t argument_index)
 Used in the bind to erase an argument from a function.
 

Public Attributes

aggregate_size_t state_size
 The hashed aggregate state sizing function.
 
aggregate_initialize_t initialize
 The hashed aggregate state initialization function.
 
aggregate_update_t update
 The hashed aggregate update state function (may be null, if window is set)
 
aggregate_combine_t combine
 The hashed aggregate combine states function (may be null, if window is set)
 
aggregate_finalize_t finalize
 The hashed aggregate finalization function (may be null, if window is set)
 
aggregate_simple_update_t simple_update
 The simple aggregate update function (may be null)
 
aggregate_window_t window
 The windowed aggregate custom function (may be null)
 
aggregate_wininit_t window_init = nullptr
 The windowed aggregate custom initialization function (may be null)
 
bind_aggregate_function_t bind
 The bind function (may be null)
 
aggregate_destructor_t destructor
 The destructor method (may be null)
 
aggregate_statistics_t statistics
 The statistics propagation function (may be null)
 
aggregate_serialize_t serialize
 
aggregate_deserialize_t deserialize
 
AggregateOrderDependent order_dependent
 Whether or not the aggregate is order dependent.
 
AggregateDistinctDependent distinct_dependent
 Whether or not the aggregate is affect by distinct modifiers.
 
shared_ptr< AggregateFunctionInfofunction_info
 Additional function info, passed to the bind.
 
- Public Attributes inherited from duckdb::BaseScalarFunction
LogicalType return_type
 Return type of the function.
 
FunctionStability stability
 The stability of the function (see FunctionStability enum for more info)
 
FunctionNullHandling null_handling
 How this function handles NULL values.
 
FunctionErrors errors
 Whether or not this function can throw an error.
 
FunctionCollationHandling collation_handling
 Collation handling of the function.
 
- Public Attributes inherited from duckdb::SimpleFunction
vector< LogicalTypearguments
 The set of arguments of the function.
 
vector< LogicalTypeoriginal_arguments
 
LogicalType varargs
 
- Public Attributes inherited from duckdb::Function
string name
 The name of the function.
 
string extra_info
 Additional Information to specify function from it's name.
 
string catalog_name
 
string schema_name
 

Constructor & Destructor Documentation

◆ AggregateFunction() [1/5]

duckdb::AggregateFunction::AggregateFunction ( const string &  name,
const vector< LogicalType > &  arguments,
const LogicalType return_type,
aggregate_size_t  state_size,
aggregate_initialize_t  initialize,
aggregate_update_t  update,
aggregate_combine_t  combine,
aggregate_finalize_t  finalize,
FunctionNullHandling  null_handling = FunctionNullHandling::DEFAULT_NULL_HANDLING,
aggregate_simple_update_t  simple_update = nullptr,
bind_aggregate_function_t  bind = nullptr,
aggregate_destructor_t  destructor = nullptr,
aggregate_statistics_t  statistics = nullptr,
aggregate_window_t  window = nullptr,
aggregate_serialize_t  serialize = nullptr,
aggregate_deserialize_t  deserialize = nullptr 
)
inline
18068 : BaseScalarFunction(name, arguments, return_type, FunctionStability::CONSISTENT,
18069 LogicalType(LogicalTypeId::INVALID), null_handling),
18072 serialize(serialize), deserialize(deserialize), order_dependent(AggregateOrderDependent::ORDER_DEPENDENT),
18073 distinct_dependent(AggregateDistinctDependent::DISTINCT_DEPENDENT) {
18074 }
aggregate_statistics_t statistics
The statistics propagation function (may be null)
Definition duckdb.hpp:18206
aggregate_simple_update_t simple_update
The simple aggregate update function (may be null)
Definition duckdb.hpp:18194
aggregate_size_t state_size
The hashed aggregate state sizing function.
Definition duckdb.hpp:18184
AggregateDistinctDependent distinct_dependent
Whether or not the aggregate is affect by distinct modifiers.
Definition duckdb.hpp:18214
aggregate_destructor_t destructor
The destructor method (may be null)
Definition duckdb.hpp:18203
aggregate_initialize_t initialize
The hashed aggregate state initialization function.
Definition duckdb.hpp:18186
aggregate_update_t update
The hashed aggregate update state function (may be null, if window is set)
Definition duckdb.hpp:18188
aggregate_combine_t combine
The hashed aggregate combine states function (may be null, if window is set)
Definition duckdb.hpp:18190
aggregate_finalize_t finalize
The hashed aggregate finalization function (may be null, if window is set)
Definition duckdb.hpp:18192
bind_aggregate_function_t bind
The bind function (may be null)
Definition duckdb.hpp:18201
aggregate_window_t window
The windowed aggregate custom function (may be null)
Definition duckdb.hpp:18196
AggregateOrderDependent order_dependent
Whether or not the aggregate is order dependent.
Definition duckdb.hpp:18212
FunctionNullHandling null_handling
How this function handles NULL values.
Definition duckdb.hpp:14008
LogicalType return_type
Return type of the function.
Definition duckdb.hpp:14004
string name
The name of the function.
Definition duckdb.hpp:13881
vector< LogicalType > arguments
The set of arguments of the function.
Definition duckdb.hpp:13917

◆ AggregateFunction() [2/5]

duckdb::AggregateFunction::AggregateFunction ( const string &  name,
const vector< LogicalType > &  arguments,
const LogicalType return_type,
aggregate_size_t  state_size,
aggregate_initialize_t  initialize,
aggregate_update_t  update,
aggregate_combine_t  combine,
aggregate_finalize_t  finalize,
aggregate_simple_update_t  simple_update = nullptr,
bind_aggregate_function_t  bind = nullptr,
aggregate_destructor_t  destructor = nullptr,
aggregate_statistics_t  statistics = nullptr,
aggregate_window_t  window = nullptr,
aggregate_serialize_t  serialize = nullptr,
aggregate_deserialize_t  deserialize = nullptr 
)
inline
18083 : BaseScalarFunction(name, arguments, return_type, FunctionStability::CONSISTENT,
18084 LogicalType(LogicalTypeId::INVALID)),
18087 serialize(serialize), deserialize(deserialize), order_dependent(AggregateOrderDependent::ORDER_DEPENDENT),
18088 distinct_dependent(AggregateDistinctDependent::DISTINCT_DEPENDENT) {
18089 }

◆ AggregateFunction() [3/5]

duckdb::AggregateFunction::AggregateFunction ( const vector< LogicalType > &  arguments,
const LogicalType return_type,
aggregate_size_t  state_size,
aggregate_initialize_t  initialize,
aggregate_update_t  update,
aggregate_combine_t  combine,
aggregate_finalize_t  finalize,
FunctionNullHandling  null_handling = FunctionNullHandling::DEFAULT_NULL_HANDLING,
aggregate_simple_update_t  simple_update = nullptr,
bind_aggregate_function_t  bind = nullptr,
aggregate_destructor_t  destructor = nullptr,
aggregate_statistics_t  statistics = nullptr,
aggregate_window_t  window = nullptr,
aggregate_serialize_t  serialize = nullptr,
aggregate_deserialize_t  deserialize = nullptr 
)
inline
18099 : AggregateFunction(string(), arguments, return_type, state_size, initialize, update, combine, finalize,
18101 deserialize) {
18102 }

◆ AggregateFunction() [4/5]

duckdb::AggregateFunction::AggregateFunction ( const vector< LogicalType > &  arguments,
const LogicalType return_type,
aggregate_size_t  state_size,
aggregate_initialize_t  initialize,
aggregate_update_t  update,
aggregate_combine_t  combine,
aggregate_finalize_t  finalize,
aggregate_simple_update_t  simple_update = nullptr,
bind_aggregate_function_t  bind = nullptr,
aggregate_destructor_t  destructor = nullptr,
aggregate_statistics_t  statistics = nullptr,
aggregate_window_t  window = nullptr,
aggregate_serialize_t  serialize = nullptr,
aggregate_deserialize_t  deserialize = nullptr 
)
inline
18110 : AggregateFunction(string(), arguments, return_type, state_size, initialize, update, combine, finalize,
18111 FunctionNullHandling::DEFAULT_NULL_HANDLING, simple_update, bind, destructor, statistics,
18112 window, serialize, deserialize) {
18113 }

◆ AggregateFunction() [5/5]

duckdb::AggregateFunction::AggregateFunction ( const vector< LogicalType > &  arguments,
const LogicalType return_type,
aggregate_size_t  state_size,
aggregate_initialize_t  initialize,
aggregate_wininit_t  window_init,
aggregate_window_t  window,
bind_aggregate_function_t  bind = nullptr,
aggregate_destructor_t  destructor = nullptr,
aggregate_statistics_t  statistics = nullptr,
aggregate_serialize_t  serialize = nullptr,
aggregate_deserialize_t  deserialize = nullptr 
)
inline
18121 : BaseScalarFunction(name, arguments, return_type, FunctionStability::CONSISTENT,
18122 LogicalType(LogicalTypeId::INVALID)),
18123 state_size(state_size), initialize(initialize), update(nullptr), combine(nullptr), finalize(nullptr),
18125 statistics(statistics), serialize(serialize), deserialize(deserialize),
18126 order_dependent(AggregateOrderDependent::ORDER_DEPENDENT),
18127 distinct_dependent(AggregateDistinctDependent::DISTINCT_DEPENDENT) {
18128 }
aggregate_wininit_t window_init
The windowed aggregate custom initialization function (may be null)
Definition duckdb.hpp:18198

Member Function Documentation

◆ HasBindCallback()

bool duckdb::AggregateFunction::HasBindCallback ( ) const
inline
18131{ return bind != nullptr; }

◆ GetBindCallback()

bind_aggregate_function_t duckdb::AggregateFunction::GetBindCallback ( ) const
inline
18132{ return bind; }

◆ SetBindCallback()

void duckdb::AggregateFunction::SetBindCallback ( bind_aggregate_function_t  callback)
inline
18133{ bind = callback; }

◆ HasStateInitCallback()

bool duckdb::AggregateFunction::HasStateInitCallback ( ) const
inline
18135{ return initialize != nullptr; }

◆ GetStateInitCallback()

aggregate_initialize_t duckdb::AggregateFunction::GetStateInitCallback ( ) const
inline
18136{ return initialize; }

◆ SetStateInitCallback()

void duckdb::AggregateFunction::SetStateInitCallback ( aggregate_initialize_t  callback)
inline
18137{ initialize = callback; }

◆ HasStateSizeCallback()

bool duckdb::AggregateFunction::HasStateSizeCallback ( ) const
inline
18139{ return state_size != nullptr; }

◆ GetStateSizeCallback()

aggregate_size_t duckdb::AggregateFunction::GetStateSizeCallback ( ) const
inline
18140{ return state_size; }

◆ SetStateSizeCallback()

void duckdb::AggregateFunction::SetStateSizeCallback ( aggregate_size_t  callback)
inline
18141{ state_size = callback; }

◆ HasStateDestructorCallback()

bool duckdb::AggregateFunction::HasStateDestructorCallback ( ) const
inline
18143{ return destructor != nullptr; }

◆ GetStateDestructorCallback()

aggregate_destructor_t duckdb::AggregateFunction::GetStateDestructorCallback ( ) const
inline
18144{ return destructor; }

◆ SetStateDestructorCallback()

void duckdb::AggregateFunction::SetStateDestructorCallback ( aggregate_destructor_t  callback)
inline
18145{ destructor = callback; }

◆ HasStateUpdateCallback()

bool duckdb::AggregateFunction::HasStateUpdateCallback ( ) const
inline
18147{ return update != nullptr; }

◆ GetStateUpdateCallback()

aggregate_update_t duckdb::AggregateFunction::GetStateUpdateCallback ( ) const
inline
18148{ return update; }

◆ SetStateUpdateCallback()

void duckdb::AggregateFunction::SetStateUpdateCallback ( aggregate_update_t  callback)
inline
18149{ update = callback; }

◆ HasStateSimpleUpdateCallback()

bool duckdb::AggregateFunction::HasStateSimpleUpdateCallback ( ) const
inline
18151{ return simple_update != nullptr; }

◆ GetStateSimpleUpdateCallback()

aggregate_simple_update_t duckdb::AggregateFunction::GetStateSimpleUpdateCallback ( ) const
inline
18152{ return simple_update; }

◆ SetStateSimpleUpdateCallback()

void duckdb::AggregateFunction::SetStateSimpleUpdateCallback ( aggregate_simple_update_t  callback)
inline
18153{ simple_update = callback; }

◆ SetStateCombineCallback()

void duckdb::AggregateFunction::SetStateCombineCallback ( aggregate_combine_t  callback)
inline
18155{ combine = callback; }

◆ GetStateCombineCallback()

aggregate_combine_t duckdb::AggregateFunction::GetStateCombineCallback ( ) const
inline
18156{ return combine; }

◆ HasStateCombineCallback()

bool duckdb::AggregateFunction::HasStateCombineCallback ( ) const
inline
18157{ return combine != nullptr; }

◆ SetStateFinalizeCallback()

void duckdb::AggregateFunction::SetStateFinalizeCallback ( aggregate_finalize_t  callback)
inline
18159{ finalize = callback; }

◆ GetStateFinalizeCallback()

aggregate_finalize_t duckdb::AggregateFunction::GetStateFinalizeCallback ( ) const
inline
18160{ return finalize; }

◆ HasStateFinalizeCallback()

bool duckdb::AggregateFunction::HasStateFinalizeCallback ( ) const
inline
18161{ return finalize != nullptr; }

◆ HasWindowCallback()

bool duckdb::AggregateFunction::HasWindowCallback ( ) const
inline
18163{ return window != nullptr; }

◆ GetWindowCallback()

aggregate_window_t duckdb::AggregateFunction::GetWindowCallback ( ) const
inline
18164{ return window; }

◆ SetWindowCallback()

void duckdb::AggregateFunction::SetWindowCallback ( aggregate_window_t  callback)
inline
18165{ window = callback; }

◆ SetWindowInitCallback()

void duckdb::AggregateFunction::SetWindowInitCallback ( aggregate_wininit_t  callback)
inline
18167{ window_init = callback; }

◆ GetWindowInitCallback()

aggregate_wininit_t duckdb::AggregateFunction::GetWindowInitCallback ( ) const
inline
18168{ return window_init; }

◆ HasWindowInitCallback()

bool duckdb::AggregateFunction::HasWindowInitCallback ( ) const
inline
18169{ return window_init != nullptr; }

◆ HasStatisticsCallback()

bool duckdb::AggregateFunction::HasStatisticsCallback ( ) const
inline
18171{ return statistics != nullptr; }

◆ GetStatisticsCallback()

aggregate_statistics_t duckdb::AggregateFunction::GetStatisticsCallback ( ) const
inline
18172{ return statistics; }

◆ SetStatisticsCallback()

void duckdb::AggregateFunction::SetStatisticsCallback ( aggregate_statistics_t  callback)
inline
18173{ statistics = callback; }

◆ HasSerializationCallbacks()

bool duckdb::AggregateFunction::HasSerializationCallbacks ( ) const
inline
18175{ return serialize != nullptr && deserialize != nullptr; }

◆ SetSerializeCallback()

void duckdb::AggregateFunction::SetSerializeCallback ( aggregate_serialize_t  callback)
inline
18176{ serialize = callback; }

◆ SetDeserializeCallback()

void duckdb::AggregateFunction::SetDeserializeCallback ( aggregate_deserialize_t  callback)
inline
18177{ deserialize = callback; }

◆ GetSerializeCallback()

aggregate_serialize_t duckdb::AggregateFunction::GetSerializeCallback ( ) const
inline
18178{ return serialize; }

◆ GetDeserializeCallback()

aggregate_deserialize_t duckdb::AggregateFunction::GetDeserializeCallback ( ) const
inline
18179{ return deserialize; }

◆ GetOrderDependent()

AggregateOrderDependent duckdb::AggregateFunction::GetOrderDependent ( ) const
inline
18216 {
18217 return order_dependent;
18218 }

◆ SetOrderDependent()

void duckdb::AggregateFunction::SetOrderDependent ( AggregateOrderDependent  value)
inline
18219 {
18220 order_dependent = value;
18221 }

◆ GetDistinctDependent()

AggregateDistinctDependent duckdb::AggregateFunction::GetDistinctDependent ( ) const
inline
18222 {
18223 return distinct_dependent;
18224 }

◆ SetDistinctDependent()

void duckdb::AggregateFunction::SetDistinctDependent ( AggregateDistinctDependent  value)
inline
18225 {
18226 distinct_dependent = value;
18227 }

◆ operator==()

bool duckdb::AggregateFunction::operator== ( const AggregateFunction rhs) const
inline
18233 {
18234 return state_size == rhs.state_size && initialize == rhs.initialize && update == rhs.update &&
18235 combine == rhs.combine && finalize == rhs.finalize && window == rhs.window;
18236 }

◆ operator!=()

bool duckdb::AggregateFunction::operator!= ( const AggregateFunction rhs) const
inline
18237 {
18238 return !(*this == rhs);
18239 }

◆ CanAggregate()

bool duckdb::AggregateFunction::CanAggregate ( ) const
inline
18241 {
18242 return update || combine || finalize;
18243 }

◆ CanWindow()

bool duckdb::AggregateFunction::CanWindow ( ) const
inline
18244 {
18245 return window;
18246 }

◆ NullaryAggregate()

template<class STATE , class RESULT_TYPE , class OP >
static AggregateFunction duckdb::AggregateFunction::NullaryAggregate ( LogicalType  return_type)
inlinestatic
18250 {
18251 return AggregateFunction(
18252 {}, return_type, AggregateFunction::StateSize<STATE>, AggregateFunction::StateInitialize<STATE, OP>,
18253 AggregateFunction::NullaryScatterUpdate<STATE, OP>, AggregateFunction::StateCombine<STATE, OP>,
18254 AggregateFunction::StateFinalize<STATE, RESULT_TYPE, OP>, AggregateFunction::NullaryUpdate<STATE, OP>);
18255 }

◆ UnaryAggregate()

template<class STATE , class INPUT_TYPE , class RESULT_TYPE , class OP , AggregateDestructorType destructor_type = AggregateDestructorType::STANDARD>
static AggregateFunction duckdb::AggregateFunction::UnaryAggregate ( const LogicalType input_type,
LogicalType  return_type,
FunctionNullHandling  null_handling = FunctionNullHandling::DEFAULT_NULL_HANDLING 
)
inlinestatic
18261 {
18262 return AggregateFunction({input_type}, return_type, AggregateFunction::StateSize<STATE>,
18263 AggregateFunction::StateInitialize<STATE, OP, destructor_type>,
18264 AggregateFunction::UnaryScatterUpdate<STATE, INPUT_TYPE, OP>,
18265 AggregateFunction::StateCombine<STATE, OP>,
18266 AggregateFunction::StateFinalize<STATE, RESULT_TYPE, OP>, null_handling,
18267 AggregateFunction::UnaryUpdate<STATE, INPUT_TYPE, OP>);
18268 }

◆ UnaryAggregateDestructor()

template<class STATE , class INPUT_TYPE , class RESULT_TYPE , class OP , AggregateDestructorType destructor_type = AggregateDestructorType::STANDARD>
static AggregateFunction duckdb::AggregateFunction::UnaryAggregateDestructor ( LogicalType  input_type,
LogicalType  return_type 
)
inlinestatic
18272 {
18273 auto aggregate = UnaryAggregate<STATE, INPUT_TYPE, RESULT_TYPE, OP, destructor_type>(input_type, return_type);
18274 aggregate.destructor = AggregateFunction::StateDestroy<STATE, OP>;
18275 return aggregate;
18276 }

◆ BinaryAggregate()

template<class STATE , class A_TYPE , class B_TYPE , class RESULT_TYPE , class OP , AggregateDestructorType destructor_type = AggregateDestructorType::STANDARD>
static AggregateFunction duckdb::AggregateFunction::BinaryAggregate ( const LogicalType a_type,
const LogicalType b_type,
LogicalType  return_type 
)
inlinestatic
18281 {
18282 return AggregateFunction({a_type, b_type}, return_type, AggregateFunction::StateSize<STATE>,
18283 AggregateFunction::StateInitialize<STATE, OP, destructor_type>,
18284 AggregateFunction::BinaryScatterUpdate<STATE, A_TYPE, B_TYPE, OP>,
18285 AggregateFunction::StateCombine<STATE, OP>,
18286 AggregateFunction::StateFinalize<STATE, RESULT_TYPE, OP>,
18287 AggregateFunction::BinaryUpdate<STATE, A_TYPE, B_TYPE, OP>);
18288 }

◆ StateSize()

template<class STATE >
static idx_t duckdb::AggregateFunction::StateSize ( const AggregateFunction )
inlinestatic
18292 {
18293 return sizeof(STATE);
18294 }

◆ StateInitialize()

template<class STATE , class OP , AggregateDestructorType destructor_type = AggregateDestructorType::STANDARD>
static void duckdb::AggregateFunction::StateInitialize ( const AggregateFunction ,
data_ptr_t  state 
)
inlinestatic
18297 {
18298 // FIXME: we should remove the "destructor_type" option in the future
18299#if !defined(__GNUC__) || (__GNUC__ >= 5)
18300 static_assert(std::is_trivially_move_constructible<STATE>::value ||
18301 destructor_type == AggregateDestructorType::LEGACY,
18302 "Aggregate state must be trivially move constructible");
18303#endif
18304 OP::Initialize(*reinterpret_cast<STATE *>(state));
18305 }

◆ NullaryScatterUpdate()

template<class STATE , class OP >
static void duckdb::AggregateFunction::NullaryScatterUpdate ( Vector  inputs[],
AggregateInputData aggr_input_data,
idx_t  input_count,
Vector states,
idx_t  count 
)
inlinestatic
18309 {
18310 D_ASSERT(input_count == 0);
18311 AggregateExecutor::NullaryScatter<STATE, OP>(states, aggr_input_data, count);
18312 }

◆ NullaryUpdate()

template<class STATE , class OP >
static void duckdb::AggregateFunction::NullaryUpdate ( Vector  inputs[],
AggregateInputData aggr_input_data,
idx_t  input_count,
data_ptr_t  state,
idx_t  count 
)
inlinestatic
18316 {
18317 D_ASSERT(input_count == 0);
18318 AggregateExecutor::NullaryUpdate<STATE, OP>(state, aggr_input_data, count);
18319 }

◆ UnaryScatterUpdate()

template<class STATE , class T , class OP >
static void duckdb::AggregateFunction::UnaryScatterUpdate ( Vector  inputs[],
AggregateInputData aggr_input_data,
idx_t  input_count,
Vector states,
idx_t  count 
)
inlinestatic
18323 {
18324 D_ASSERT(input_count == 1);
18325 AggregateExecutor::UnaryScatter<STATE, T, OP>(inputs[0], states, aggr_input_data, count);
18326 }

◆ UnaryUpdate()

template<class STATE , class INPUT_TYPE , class OP >
static void duckdb::AggregateFunction::UnaryUpdate ( Vector  inputs[],
AggregateInputData aggr_input_data,
idx_t  input_count,
data_ptr_t  state,
idx_t  count 
)
inlinestatic
18330 {
18331 D_ASSERT(input_count == 1);
18332 AggregateExecutor::UnaryUpdate<STATE, INPUT_TYPE, OP>(inputs[0], aggr_input_data, state, count);
18333 }

◆ BinaryScatterUpdate()

template<class STATE , class A_TYPE , class B_TYPE , class OP >
static void duckdb::AggregateFunction::BinaryScatterUpdate ( Vector  inputs[],
AggregateInputData aggr_input_data,
idx_t  input_count,
Vector states,
idx_t  count 
)
inlinestatic
18337 {
18338 D_ASSERT(input_count == 2);
18339 AggregateExecutor::BinaryScatter<STATE, A_TYPE, B_TYPE, OP>(aggr_input_data, inputs[0], inputs[1], states,
18340 count);
18341 }

◆ BinaryUpdate()

template<class STATE , class A_TYPE , class B_TYPE , class OP >
static void duckdb::AggregateFunction::BinaryUpdate ( Vector  inputs[],
AggregateInputData aggr_input_data,
idx_t  input_count,
data_ptr_t  state,
idx_t  count 
)
inlinestatic
18345 {
18346 D_ASSERT(input_count == 2);
18347 AggregateExecutor::BinaryUpdate<STATE, A_TYPE, B_TYPE, OP>(aggr_input_data, inputs[0], inputs[1], state, count);
18348 }

◆ StateCombine()

template<class STATE , class OP >
static void duckdb::AggregateFunction::StateCombine ( Vector source,
Vector target,
AggregateInputData aggr_input_data,
idx_t  count 
)
inlinestatic
18351 {
18352 AggregateExecutor::Combine<STATE, OP>(source, target, aggr_input_data, count);
18353 }

◆ StateFinalize()

template<class STATE , class RESULT_TYPE , class OP >
static void duckdb::AggregateFunction::StateFinalize ( Vector states,
AggregateInputData aggr_input_data,
Vector result,
idx_t  count,
idx_t  offset 
)
inlinestatic
18357 {
18358 AggregateExecutor::Finalize<STATE, RESULT_TYPE, OP>(states, aggr_input_data, result, count, offset);
18359 }

◆ StateVoidFinalize()

template<class STATE , class OP >
static void duckdb::AggregateFunction::StateVoidFinalize ( Vector states,
AggregateInputData aggr_input_data,
Vector result,
idx_t  count,
idx_t  offset 
)
inlinestatic
18363 {
18364 AggregateExecutor::VoidFinalize<STATE, OP>(states, aggr_input_data, result, count, offset);
18365 }

◆ StateDestroy()

template<class STATE , class OP >
static void duckdb::AggregateFunction::StateDestroy ( Vector states,
AggregateInputData aggr_input_data,
idx_t  count 
)
inlinestatic
18368 {
18369 AggregateExecutor::Destroy<STATE, OP>(states, aggr_input_data, count);
18370 }

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