Skip to content

Commit efb29d4

Browse files
committed
vendor: Update vendored sources to duckdb/duckdb@6f15d58
support 'categories' label in function catalog (duckdb/duckdb#15654)
1 parent 25fcfc5 commit efb29d4

39 files changed

+460
-65
lines changed

src/duckdb/extension/core_functions/function_list.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,26 @@ namespace duckdb {
2525

2626
// Scalar Function
2727
#define DUCKDB_SCALAR_FUNCTION_BASE(_PARAM, _NAME, _ALIAS_OF) \
28-
{ _NAME, _ALIAS_OF, _PARAM::Parameters, _PARAM::Description, _PARAM::Example, _PARAM::GetFunction, nullptr, nullptr, nullptr }
28+
{ _NAME, _ALIAS_OF, _PARAM::Parameters, _PARAM::Description, _PARAM::Example, _PARAM::Categories, _PARAM::GetFunction, nullptr, nullptr, nullptr }
2929
#define DUCKDB_SCALAR_FUNCTION(_PARAM) DUCKDB_SCALAR_FUNCTION_BASE(_PARAM, _PARAM::Name, _PARAM::Name)
3030
#define DUCKDB_SCALAR_FUNCTION_ALIAS(_PARAM) DUCKDB_SCALAR_FUNCTION_BASE(_PARAM::ALIAS, _PARAM::Name, _PARAM::ALIAS::Name)
3131
// Scalar Function Set
3232
#define DUCKDB_SCALAR_FUNCTION_SET_BASE(_PARAM, _NAME, _ALIAS_OF) \
33-
{ _NAME, _ALIAS_OF, _PARAM::Parameters, _PARAM::Description, _PARAM::Example, nullptr, _PARAM::GetFunctions, nullptr, nullptr }
33+
{ _NAME, _ALIAS_OF, _PARAM::Parameters, _PARAM::Description, _PARAM::Example, _PARAM::Categories, nullptr, _PARAM::GetFunctions, nullptr, nullptr }
3434
#define DUCKDB_SCALAR_FUNCTION_SET(_PARAM) DUCKDB_SCALAR_FUNCTION_SET_BASE(_PARAM, _PARAM::Name, _PARAM::Name)
3535
#define DUCKDB_SCALAR_FUNCTION_SET_ALIAS(_PARAM) DUCKDB_SCALAR_FUNCTION_SET_BASE(_PARAM::ALIAS, _PARAM::Name, _PARAM::ALIAS::Name)
3636
// Aggregate Function
3737
#define DUCKDB_AGGREGATE_FUNCTION_BASE(_PARAM, _NAME, _ALIAS_OF) \
38-
{ _NAME, _ALIAS_OF, _PARAM::Parameters, _PARAM::Description, _PARAM::Example, nullptr, nullptr, _PARAM::GetFunction, nullptr }
38+
{ _NAME, _ALIAS_OF, _PARAM::Parameters, _PARAM::Description, _PARAM::Example, _PARAM::Categories, nullptr, nullptr, _PARAM::GetFunction, nullptr }
3939
#define DUCKDB_AGGREGATE_FUNCTION(_PARAM) DUCKDB_AGGREGATE_FUNCTION_BASE(_PARAM, _PARAM::Name, _PARAM::Name)
4040
#define DUCKDB_AGGREGATE_FUNCTION_ALIAS(_PARAM) DUCKDB_AGGREGATE_FUNCTION_BASE(_PARAM::ALIAS, _PARAM::Name, _PARAM::ALIAS::Name)
4141
// Aggregate Function Set
4242
#define DUCKDB_AGGREGATE_FUNCTION_SET_BASE(_PARAM, _NAME, _ALIAS_OF) \
43-
{ _NAME, _ALIAS_OF, _PARAM::Parameters, _PARAM::Description, _PARAM::Example, nullptr, nullptr, nullptr, _PARAM::GetFunctions }
43+
{ _NAME, _ALIAS_OF, _PARAM::Parameters, _PARAM::Description, _PARAM::Example, _PARAM::Categories, nullptr, nullptr, nullptr, _PARAM::GetFunctions }
4444
#define DUCKDB_AGGREGATE_FUNCTION_SET(_PARAM) DUCKDB_AGGREGATE_FUNCTION_SET_BASE(_PARAM, _PARAM::Name, _PARAM::Name)
4545
#define DUCKDB_AGGREGATE_FUNCTION_SET_ALIAS(_PARAM) DUCKDB_AGGREGATE_FUNCTION_SET_BASE(_PARAM::ALIAS, _PARAM::Name, _PARAM::ALIAS::Name)
4646
#define FINAL_FUNCTION \
47-
{ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }
47+
{ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }
4848

4949
// this list is generated by scripts/generate_functions.py
5050
static const StaticFunctionDefinition core_functions[] = {

src/duckdb/extension/core_functions/include/core_functions/aggregate/algebraic_functions.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct AvgFun {
2020
static constexpr const char *Parameters = "x";
2121
static constexpr const char *Description = "Calculates the average value for all tuples in x.";
2222
static constexpr const char *Example = "SUM(x) / COUNT(*)";
23+
static constexpr const char *Categories = "";
2324

2425
static AggregateFunctionSet GetFunctions();
2526
};
@@ -35,6 +36,7 @@ struct CorrFun {
3536
static constexpr const char *Parameters = "y,x";
3637
static constexpr const char *Description = "Returns the correlation coefficient for non-null pairs in a group.";
3738
static constexpr const char *Example = "COVAR_POP(y, x) / (STDDEV_POP(x) * STDDEV_POP(y))";
39+
static constexpr const char *Categories = "";
3840

3941
static AggregateFunction GetFunction();
4042
};
@@ -44,6 +46,7 @@ struct CovarPopFun {
4446
static constexpr const char *Parameters = "y,x";
4547
static constexpr const char *Description = "Returns the population covariance of input values.";
4648
static constexpr const char *Example = "(SUM(x*y) - SUM(x) * SUM(y) / COUNT(*)) / COUNT(*)";
49+
static constexpr const char *Categories = "";
4750

4851
static AggregateFunction GetFunction();
4952
};
@@ -53,6 +56,7 @@ struct CovarSampFun {
5356
static constexpr const char *Parameters = "y,x";
5457
static constexpr const char *Description = "Returns the sample covariance for non-null pairs in a group.";
5558
static constexpr const char *Example = "(SUM(x*y) - SUM(x) * SUM(y) / COUNT(*)) / (COUNT(*) - 1)";
59+
static constexpr const char *Categories = "";
5660

5761
static AggregateFunction GetFunction();
5862
};
@@ -62,6 +66,7 @@ struct FAvgFun {
6266
static constexpr const char *Parameters = "x";
6367
static constexpr const char *Description = "Calculates the average using a more accurate floating point summation (Kahan Sum)";
6468
static constexpr const char *Example = "favg(A)";
69+
static constexpr const char *Categories = "";
6570

6671
static AggregateFunction GetFunction();
6772
};
@@ -71,6 +76,7 @@ struct StandardErrorOfTheMeanFun {
7176
static constexpr const char *Parameters = "x";
7277
static constexpr const char *Description = "Returns the standard error of the mean";
7378
static constexpr const char *Example = "";
79+
static constexpr const char *Categories = "";
7480

7581
static AggregateFunction GetFunction();
7682
};
@@ -80,6 +86,7 @@ struct StdDevPopFun {
8086
static constexpr const char *Parameters = "x";
8187
static constexpr const char *Description = "Returns the population standard deviation.";
8288
static constexpr const char *Example = "sqrt(var_pop(x))";
89+
static constexpr const char *Categories = "";
8390

8491
static AggregateFunction GetFunction();
8592
};
@@ -89,6 +96,7 @@ struct StdDevSampFun {
8996
static constexpr const char *Parameters = "x";
9097
static constexpr const char *Description = "Returns the sample standard deviation";
9198
static constexpr const char *Example = "sqrt(var_samp(x))";
99+
static constexpr const char *Categories = "";
92100

93101
static AggregateFunction GetFunction();
94102
};
@@ -104,6 +112,7 @@ struct VarPopFun {
104112
static constexpr const char *Parameters = "x";
105113
static constexpr const char *Description = "Returns the population variance.";
106114
static constexpr const char *Example = "";
115+
static constexpr const char *Categories = "";
107116

108117
static AggregateFunction GetFunction();
109118
};
@@ -113,6 +122,7 @@ struct VarSampFun {
113122
static constexpr const char *Parameters = "x";
114123
static constexpr const char *Description = "Returns the sample variance of all input values.";
115124
static constexpr const char *Example = "(SUM(x^2) - SUM(x)^2 / COUNT(x)) / (COUNT(x) - 1)";
125+
static constexpr const char *Categories = "";
116126

117127
static AggregateFunction GetFunction();
118128
};

src/duckdb/extension/core_functions/include/core_functions/aggregate/distributive_functions.hpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct ApproxCountDistinctFun {
2020
static constexpr const char *Parameters = "any";
2121
static constexpr const char *Description = "Computes the approximate count of distinct elements using HyperLogLog.";
2222
static constexpr const char *Example = "approx_count_distinct(A)";
23+
static constexpr const char *Categories = "";
2324

2425
static AggregateFunction GetFunction();
2526
};
@@ -29,6 +30,7 @@ struct ArgMinFun {
2930
static constexpr const char *Parameters = "arg,val";
3031
static constexpr const char *Description = "Finds the row with the minimum val. Calculates the non-NULL arg expression at that row.";
3132
static constexpr const char *Example = "arg_min(A,B)";
33+
static constexpr const char *Categories = "";
3234

3335
static AggregateFunctionSet GetFunctions();
3436
};
@@ -50,6 +52,7 @@ struct ArgMinNullFun {
5052
static constexpr const char *Parameters = "arg,val";
5153
static constexpr const char *Description = "Finds the row with the minimum val. Calculates the arg expression at that row.";
5254
static constexpr const char *Example = "arg_min_null(A,B)";
55+
static constexpr const char *Categories = "";
5356

5457
static AggregateFunctionSet GetFunctions();
5558
};
@@ -59,6 +62,7 @@ struct ArgMaxFun {
5962
static constexpr const char *Parameters = "arg,val";
6063
static constexpr const char *Description = "Finds the row with the maximum val. Calculates the non-NULL arg expression at that row.";
6164
static constexpr const char *Example = "arg_max(A,B)";
65+
static constexpr const char *Categories = "";
6266

6367
static AggregateFunctionSet GetFunctions();
6468
};
@@ -80,6 +84,7 @@ struct ArgMaxNullFun {
8084
static constexpr const char *Parameters = "arg,val";
8185
static constexpr const char *Description = "Finds the row with the maximum val. Calculates the arg expression at that row.";
8286
static constexpr const char *Example = "arg_max_null(A,B)";
87+
static constexpr const char *Categories = "";
8388

8489
static AggregateFunctionSet GetFunctions();
8590
};
@@ -89,6 +94,7 @@ struct BitAndFun {
8994
static constexpr const char *Parameters = "arg";
9095
static constexpr const char *Description = "Returns the bitwise AND of all bits in a given expression.";
9196
static constexpr const char *Example = "bit_and(A)";
97+
static constexpr const char *Categories = "";
9298

9399
static AggregateFunctionSet GetFunctions();
94100
};
@@ -98,6 +104,7 @@ struct BitOrFun {
98104
static constexpr const char *Parameters = "arg";
99105
static constexpr const char *Description = "Returns the bitwise OR of all bits in a given expression.";
100106
static constexpr const char *Example = "bit_or(A)";
107+
static constexpr const char *Categories = "";
101108

102109
static AggregateFunctionSet GetFunctions();
103110
};
@@ -107,6 +114,7 @@ struct BitXorFun {
107114
static constexpr const char *Parameters = "arg";
108115
static constexpr const char *Description = "Returns the bitwise XOR of all bits in a given expression.";
109116
static constexpr const char *Example = "bit_xor(A)";
117+
static constexpr const char *Categories = "";
110118

111119
static AggregateFunctionSet GetFunctions();
112120
};
@@ -116,6 +124,7 @@ struct BitstringAggFun {
116124
static constexpr const char *Parameters = "arg";
117125
static constexpr const char *Description = "Returns a bitstring with bits set for each distinct value.";
118126
static constexpr const char *Example = "bitstring_agg(A)";
127+
static constexpr const char *Categories = "";
119128

120129
static AggregateFunctionSet GetFunctions();
121130
};
@@ -125,6 +134,7 @@ struct BoolAndFun {
125134
static constexpr const char *Parameters = "arg";
126135
static constexpr const char *Description = "Returns TRUE if every input value is TRUE, otherwise FALSE.";
127136
static constexpr const char *Example = "bool_and(A)";
137+
static constexpr const char *Categories = "";
128138

129139
static AggregateFunction GetFunction();
130140
};
@@ -134,6 +144,7 @@ struct BoolOrFun {
134144
static constexpr const char *Parameters = "arg";
135145
static constexpr const char *Description = "Returns TRUE if any input value is TRUE, otherwise FALSE.";
136146
static constexpr const char *Example = "bool_or(A)";
147+
static constexpr const char *Categories = "";
137148

138149
static AggregateFunction GetFunction();
139150
};
@@ -143,6 +154,7 @@ struct CountIfFun {
143154
static constexpr const char *Parameters = "arg";
144155
static constexpr const char *Description = "Counts the total number of TRUE values for a boolean column";
145156
static constexpr const char *Example = "count_if(A)";
157+
static constexpr const char *Categories = "";
146158

147159
static AggregateFunction GetFunction();
148160
};
@@ -158,6 +170,7 @@ struct EntropyFun {
158170
static constexpr const char *Parameters = "x";
159171
static constexpr const char *Description = "Returns the log-2 entropy of count input-values.";
160172
static constexpr const char *Example = "";
173+
static constexpr const char *Categories = "";
161174

162175
static AggregateFunctionSet GetFunctions();
163176
};
@@ -167,6 +180,7 @@ struct KahanSumFun {
167180
static constexpr const char *Parameters = "arg";
168181
static constexpr const char *Description = "Calculates the sum using a more accurate floating point summation (Kahan Sum).";
169182
static constexpr const char *Example = "kahan_sum(A)";
183+
static constexpr const char *Categories = "";
170184

171185
static AggregateFunction GetFunction();
172186
};
@@ -188,6 +202,7 @@ struct KurtosisFun {
188202
static constexpr const char *Parameters = "x";
189203
static constexpr const char *Description = "Returns the excess kurtosis (Fisher’s definition) of all input values, with a bias correction according to the sample size";
190204
static constexpr const char *Example = "";
205+
static constexpr const char *Categories = "";
191206

192207
static AggregateFunction GetFunction();
193208
};
@@ -197,6 +212,7 @@ struct KurtosisPopFun {
197212
static constexpr const char *Parameters = "x";
198213
static constexpr const char *Description = "Returns the excess kurtosis (Fisher’s definition) of all input values, without bias correction";
199214
static constexpr const char *Example = "";
215+
static constexpr const char *Categories = "";
200216

201217
static AggregateFunction GetFunction();
202218
};
@@ -206,6 +222,7 @@ struct ProductFun {
206222
static constexpr const char *Parameters = "arg";
207223
static constexpr const char *Description = "Calculates the product of all tuples in arg.";
208224
static constexpr const char *Example = "product(A)";
225+
static constexpr const char *Categories = "";
209226

210227
static AggregateFunction GetFunction();
211228
};
@@ -215,6 +232,7 @@ struct SkewnessFun {
215232
static constexpr const char *Parameters = "x";
216233
static constexpr const char *Description = "Returns the skewness of all input values.";
217234
static constexpr const char *Example = "skewness(A)";
235+
static constexpr const char *Categories = "";
218236

219237
static AggregateFunction GetFunction();
220238
};
@@ -224,6 +242,7 @@ struct StringAggFun {
224242
static constexpr const char *Parameters = "str,arg";
225243
static constexpr const char *Description = "Concatenates the column string values with an optional separator.";
226244
static constexpr const char *Example = "string_agg(A, '-')";
245+
static constexpr const char *Categories = "";
227246

228247
static AggregateFunctionSet GetFunctions();
229248
};
@@ -245,6 +264,7 @@ struct SumFun {
245264
static constexpr const char *Parameters = "arg";
246265
static constexpr const char *Description = "Calculates the sum value for all tuples in arg.";
247266
static constexpr const char *Example = "sum(A)";
267+
static constexpr const char *Categories = "";
248268

249269
static AggregateFunctionSet GetFunctions();
250270
};
@@ -254,6 +274,7 @@ struct SumNoOverflowFun {
254274
static constexpr const char *Parameters = "arg";
255275
static constexpr const char *Description = "Internal only. Calculates the sum value for all tuples in arg without overflow checks.";
256276
static constexpr const char *Example = "sum_no_overflow(A)";
277+
static constexpr const char *Categories = "";
257278

258279
static AggregateFunctionSet GetFunctions();
259280
};

src/duckdb/extension/core_functions/include/core_functions/aggregate/holistic_functions.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct ApproxQuantileFun {
2020
static constexpr const char *Parameters = "x,pos";
2121
static constexpr const char *Description = "Computes the approximate quantile using T-Digest.";
2222
static constexpr const char *Example = "approx_quantile(x, 0.5)";
23+
static constexpr const char *Categories = "";
2324

2425
static AggregateFunctionSet GetFunctions();
2526
};
@@ -29,6 +30,7 @@ struct MadFun {
2930
static constexpr const char *Parameters = "x";
3031
static constexpr const char *Description = "Returns the median absolute deviation for the values within x. NULL values are ignored. Temporal types return a positive INTERVAL. ";
3132
static constexpr const char *Example = "mad(x)";
33+
static constexpr const char *Categories = "";
3234

3335
static AggregateFunctionSet GetFunctions();
3436
};
@@ -38,6 +40,7 @@ struct MedianFun {
3840
static constexpr const char *Parameters = "x";
3941
static constexpr const char *Description = "Returns the middle value of the set. NULL values are ignored. For even value counts, interpolate-able types (numeric, date/time) return the average of the two middle values. Non-interpolate-able types (everything else) return the lower of the two middle values.";
4042
static constexpr const char *Example = "median(x)";
43+
static constexpr const char *Categories = "";
4144

4245
static AggregateFunctionSet GetFunctions();
4346
};
@@ -47,6 +50,7 @@ struct ModeFun {
4750
static constexpr const char *Parameters = "x";
4851
static constexpr const char *Description = "Returns the most frequent value for the values within x. NULL values are ignored.";
4952
static constexpr const char *Example = "";
53+
static constexpr const char *Categories = "";
5054

5155
static AggregateFunctionSet GetFunctions();
5256
};
@@ -56,6 +60,7 @@ struct QuantileDiscFun {
5660
static constexpr const char *Parameters = "x,pos";
5761
static constexpr const char *Description = "Returns the exact quantile number between 0 and 1 . If pos is a LIST of FLOATs, then the result is a LIST of the corresponding exact quantiles.";
5862
static constexpr const char *Example = "quantile_disc(x, 0.5)";
63+
static constexpr const char *Categories = "";
5964

6065
static AggregateFunctionSet GetFunctions();
6166
};
@@ -71,6 +76,7 @@ struct QuantileContFun {
7176
static constexpr const char *Parameters = "x,pos";
7277
static constexpr const char *Description = "Returns the interpolated quantile number between 0 and 1 . If pos is a LIST of FLOATs, then the result is a LIST of the corresponding interpolated quantiles. ";
7378
static constexpr const char *Example = "quantile_cont(x, 0.5)";
79+
static constexpr const char *Categories = "";
7480

7581
static AggregateFunctionSet GetFunctions();
7682
};
@@ -80,6 +86,7 @@ struct ReservoirQuantileFun {
8086
static constexpr const char *Parameters = "x,quantile,sample_size";
8187
static constexpr const char *Description = "Gives the approximate quantile using reservoir sampling, the sample size is optional and uses 8192 as a default size.";
8288
static constexpr const char *Example = "reservoir_quantile(A,0.5,1024)";
89+
static constexpr const char *Categories = "";
8390

8491
static AggregateFunctionSet GetFunctions();
8592
};
@@ -89,6 +96,7 @@ struct ApproxTopKFun {
8996
static constexpr const char *Parameters = "val,k";
9097
static constexpr const char *Description = "Finds the k approximately most occurring values in the data set";
9198
static constexpr const char *Example = "approx_top_k(x, 5)";
99+
static constexpr const char *Categories = "";
92100

93101
static AggregateFunction GetFunction();
94102
};

src/duckdb/extension/core_functions/include/core_functions/aggregate/nested_functions.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct HistogramFun {
2020
static constexpr const char *Parameters = "arg";
2121
static constexpr const char *Description = "Returns a LIST of STRUCTs with the fields bucket and count.";
2222
static constexpr const char *Example = "histogram(A)";
23+
static constexpr const char *Categories = "";
2324

2425
static AggregateFunctionSet GetFunctions();
2526
static AggregateFunction GetHistogramUnorderedMap(LogicalType &type);
@@ -31,6 +32,7 @@ struct HistogramExactFun {
3132
static constexpr const char *Parameters = "arg,bins";
3233
static constexpr const char *Description = "Returns a LIST of STRUCTs with the fields bucket and count matching the buckets exactly.";
3334
static constexpr const char *Example = "histogram_exact(A, [0, 1, 2])";
35+
static constexpr const char *Categories = "";
3436

3537
static AggregateFunction GetFunction();
3638
};
@@ -40,6 +42,7 @@ struct ListFun {
4042
static constexpr const char *Parameters = "arg";
4143
static constexpr const char *Description = "Returns a LIST containing all the values of a column.";
4244
static constexpr const char *Example = "list(A)";
45+
static constexpr const char *Categories = "";
4346

4447
static AggregateFunction GetFunction();
4548
};

0 commit comments

Comments
 (0)