Skip to content

Commit 3df1351

Browse files
Update vendored DuckDB sources to 963000678a
1 parent df18b67 commit 3df1351

File tree

203 files changed

+1534
-842
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+1534
-842
lines changed

src/duckdb/extension/core_functions/aggregate/algebraic/avg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ unique_ptr<FunctionData> BindDecimalAvg(ClientContext &context, AggregateFunctio
272272
function = GetAverageAggregate(decimal_type.InternalType());
273273
function.name = "avg";
274274
function.arguments[0] = decimal_type;
275-
function.return_type = LogicalType::DOUBLE;
275+
function.SetReturnType(LogicalType::DOUBLE);
276276
return make_uniq<AverageDecimalBindData>(
277277
Hugeint::Cast<double>(Hugeint::POWERS_OF_TEN[DecimalType::GetScale(decimal_type)]));
278278
}

src/duckdb/extension/core_functions/aggregate/distributive/approx_count.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ AggregateFunction GetApproxCountDistinctFunction(const LogicalType &input_type)
9090
AggregateFunction::StateCombine<ApproxDistinctCountState, ApproxCountDistinctFunction>,
9191
AggregateFunction::StateFinalize<ApproxDistinctCountState, int64_t, ApproxCountDistinctFunction>,
9292
ApproxCountDistinctSimpleUpdateFunction);
93-
fun.null_handling = FunctionNullHandling::SPECIAL_HANDLING;
93+
fun.SetNullHandling(FunctionNullHandling::SPECIAL_HANDLING);
9494
return fun;
9595
}
9696

src/duckdb/extension/core_functions/aggregate/distributive/arg_min_max.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ struct ArgMinMaxBase {
191191
ExpressionBinder::PushCollation(context, arguments[1], arguments[1]->return_type);
192192
}
193193
function.arguments[0] = arguments[0]->return_type;
194-
function.return_type = arguments[0]->return_type;
194+
function.SetReturnType(arguments[0]->return_type);
195195

196196
auto function_data = make_uniq<ArgMinMaxFunctionData>(NULL_HANDLING);
197197
return unique_ptr<FunctionData>(std::move(function_data));
@@ -354,7 +354,7 @@ struct VectorArgMinMaxBase : ArgMinMaxBase<COMPARATOR> {
354354
ExpressionBinder::PushCollation(context, arguments[1], arguments[1]->return_type);
355355
}
356356
function.arguments[0] = arguments[0]->return_type;
357-
function.return_type = arguments[0]->return_type;
357+
function.SetReturnType(arguments[0]->return_type);
358358

359359
auto function_data = make_uniq<ArgMinMaxFunctionData>(NULL_HANDLING);
360360
return unique_ptr<FunctionData>(std::move(function_data));
@@ -551,7 +551,7 @@ unique_ptr<FunctionData> BindDecimalArgMinMax(ClientContext &context, AggregateF
551551
auto name = std::move(function.name);
552552
function = GetDecimalArgMinMaxFunction<OP>(by_type, decimal_type, NULL_HANDLING);
553553
function.name = std::move(name);
554-
function.return_type = decimal_type;
554+
function.SetReturnType(decimal_type);
555555

556556
auto function_data = make_uniq<ArgMinMaxFunctionData>(NULL_HANDLING);
557557
return unique_ptr<FunctionData>(std::move(function_data));
@@ -859,7 +859,7 @@ unique_ptr<FunctionData> ArgMinMaxNBind(ClientContext &context, AggregateFunctio
859859

860860
const auto val_type = arguments[0]->return_type.InternalType();
861861
const auto arg_type = arguments[1]->return_type.InternalType();
862-
function.return_type = LogicalType::LIST(arguments[0]->return_type);
862+
function.SetReturnType(LogicalType::LIST(arguments[0]->return_type));
863863

864864
// Specialize the function based on the input types
865865
auto function_data = make_uniq<ArgMinMaxFunctionData>(NULL_HANDLING, NULLS_LAST);

src/duckdb/extension/core_functions/aggregate/distributive/kurtosis.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ AggregateFunction KurtosisFun::GetFunction() {
106106
auto result =
107107
AggregateFunction::UnaryAggregate<KurtosisState, double, double, KurtosisOperation<KurtosisFlagBiasCorrection>>(
108108
LogicalType::DOUBLE, LogicalType::DOUBLE);
109-
result.errors = FunctionErrors::CAN_THROW_RUNTIME_ERROR;
109+
result.SetFallible();
110110
return result;
111111
}
112112

113113
AggregateFunction KurtosisPopFun::GetFunction() {
114114
auto result = AggregateFunction::UnaryAggregate<KurtosisState, double, double,
115115
KurtosisOperation<KurtosisFlagNoBiasCorrection>>(
116116
LogicalType::DOUBLE, LogicalType::DOUBLE);
117-
result.errors = FunctionErrors::CAN_THROW_RUNTIME_ERROR;
117+
result.SetFallible();
118118
return result;
119119
}
120120

src/duckdb/extension/core_functions/aggregate/distributive/sum.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void SumNoOverflowSerialize(Serializer &serializer, const optional_ptr<FunctionD
8484
}
8585

8686
unique_ptr<FunctionData> SumNoOverflowDeserialize(Deserializer &deserializer, AggregateFunction &function) {
87-
function.return_type = deserializer.Get<const LogicalType &>();
87+
function.SetReturnType(deserializer.Get<const LogicalType &>());
8888
return nullptr;
8989
}
9090

@@ -207,7 +207,7 @@ unique_ptr<FunctionData> BindDecimalSum(ClientContext &context, AggregateFunctio
207207
function = GetSumAggregate(decimal_type.InternalType());
208208
function.name = "sum";
209209
function.arguments[0] = decimal_type;
210-
function.return_type = LogicalType::DECIMAL(Decimal::MAX_WIDTH_DECIMAL, DecimalType::GetScale(decimal_type));
210+
function.SetReturnType(LogicalType::DECIMAL(Decimal::MAX_WIDTH_DECIMAL, DecimalType::GetScale(decimal_type)));
211211
function.order_dependent = AggregateOrderDependent::NOT_ORDER_DEPENDENT;
212212
return nullptr;
213213
}

src/duckdb/extension/core_functions/aggregate/holistic/approx_top_k.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ unique_ptr<FunctionData> ApproxTopKBind(ClientContext &context, AggregateFunctio
398398
function.update = ApproxTopKUpdate<string_t, HistogramStringFunctor>;
399399
function.finalize = ApproxTopKFinalize<HistogramStringFunctor>;
400400
}
401-
function.return_type = LogicalType::LIST(arguments[0]->return_type);
401+
function.SetReturnType(LogicalType::LIST(arguments[0]->return_type));
402402
return nullptr;
403403
}
404404

src/duckdb/extension/core_functions/aggregate/holistic/mad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ AggregateFunction GetMedianAbsoluteDeviationAggregateFunctionInternal(const Logi
316316

317317
AggregateFunction GetMedianAbsoluteDeviationAggregateFunction(const LogicalType &type) {
318318
auto result = GetMedianAbsoluteDeviationAggregateFunctionInternal(type);
319-
result.errors = FunctionErrors::CAN_THROW_RUNTIME_ERROR;
319+
result.SetFallible();
320320
return result;
321321
}
322322

src/duckdb/extension/core_functions/aggregate/holistic/mode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ AggregateFunction GetTypedEntropyFunction(const LogicalType &type) {
518518
auto func =
519519
AggregateFunction::UnaryAggregateDestructor<STATE, INPUT_TYPE, double, OP, AggregateDestructorType::LEGACY>(
520520
type, LogicalType::DOUBLE);
521-
func.null_handling = FunctionNullHandling::SPECIAL_HANDLING;
521+
func.SetNullHandling(FunctionNullHandling::SPECIAL_HANDLING);
522522
return func;
523523
}
524524

@@ -530,7 +530,7 @@ AggregateFunction GetFallbackEntropyFunction(const LogicalType &type) {
530530
AggregateSortKeyHelpers::UnaryUpdate<STATE, OP>, AggregateFunction::StateCombine<STATE, OP>,
531531
AggregateFunction::StateFinalize<STATE, double, OP>, nullptr);
532532
func.destructor = AggregateFunction::StateDestroy<STATE, OP>;
533-
func.null_handling = FunctionNullHandling::SPECIAL_HANDLING;
533+
func.SetNullHandling(FunctionNullHandling::SPECIAL_HANDLING);
534534
return func;
535535
}
536536

src/duckdb/extension/core_functions/aggregate/nested/histogram.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ unique_ptr<FunctionData> HistogramBindFunction(ClientContext &context, Aggregate
214214
throw ParameterNotResolvedException();
215215
}
216216
function = GetHistogramFunction<IS_ORDERED>(arguments[0]->return_type);
217-
return make_uniq<VariableReturnBindData>(function.return_type);
217+
return make_uniq<VariableReturnBindData>(function.GetReturnType());
218218
}
219219

220220
} // namespace

src/duckdb/extension/core_functions/aggregate/nested/list.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ void ListCombineFunction(Vector &states_vector, Vector &combined, AggregateInput
177177

178178
unique_ptr<FunctionData> ListBindFunction(ClientContext &context, AggregateFunction &function,
179179
vector<unique_ptr<Expression>> &arguments) {
180-
function.return_type = LogicalType::LIST(arguments[0]->return_type);
181-
return make_uniq<ListBindData>(function.return_type);
180+
function.SetReturnType(LogicalType::LIST(arguments[0]->return_type));
181+
return make_uniq<ListBindData>(function.GetReturnType());
182182
}
183183

184184
} // namespace

0 commit comments

Comments
 (0)