1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/function/scalar/generic_functions.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/function/scalar_function.hpp"
12#include "duckdb/function/function_set.hpp"
13#include "duckdb/function/built_in_functions.hpp"
14
15namespace duckdb {
16class BoundFunctionExpression;
17
18struct ConstantOrNull {
19 static ScalarFunction GetFunction(const LogicalType &return_type);
20 static unique_ptr<FunctionData> Bind(Value value);
21 static bool IsConstantOrNull(BoundFunctionExpression &expr, const Value &val);
22 static void RegisterFunction(BuiltinFunctions &set);
23};
24
25struct ExportAggregateFunctionBindData : public FunctionData {
26 unique_ptr<BoundAggregateExpression> aggregate;
27 explicit ExportAggregateFunctionBindData(unique_ptr<Expression> aggregate_p);
28 unique_ptr<FunctionData> Copy() const override;
29 bool Equals(const FunctionData &other_p) const override;
30};
31
32struct ExportAggregateFunction {
33 static unique_ptr<BoundAggregateExpression> Bind(unique_ptr<BoundAggregateExpression> child_aggregate);
34 static ScalarFunction GetCombine();
35 static ScalarFunction GetFinalize();
36 static void RegisterFunction(BuiltinFunctions &set);
37};
38
39} // namespace duckdb
40