From d0a70ae7e02bef069a471881382a235636e4f622 Mon Sep 17 00:00:00 2001 From: Esteban Zimanyi Date: Fri, 29 May 2026 21:34:49 +0200 Subject: [PATCH] Wrap bigint_to_set in an int64_t forwarder for SetUnionAgg On macOS LP64 int64 (long) and int64_t (long long) are the same width but distinct types, so clang rejects bigint_to_set as a Set *(*)(int64_t) non-type template argument. A forwarder that casts int64_t to int64 fixes the macOS build; the cast is a no-op on Linux. --- src/temporal/set.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/temporal/set.cpp b/src/temporal/set.cpp index 814489e3..912b7317 100644 --- a/src/temporal/set.cpp +++ b/src/temporal/set.cpp @@ -945,6 +945,13 @@ static inline Set *date_to_set_duckdb(DateADT d) { return date_to_set(ToMeosDate(duckdb::date_t(d))); } +// macOS LP64: int64 (long) and int64_t (long long) are distinct types, so +// clang rejects passing bigint_to_set where a Set *(*)(int64_t) is expected as +// a non-type template arg. The cast is a no-op on Linux. +static inline Set *bigint_to_set_duckdb(int64_t i) { + return bigint_to_set(static_cast(i)); +} + struct SetPtrState { Set *accumulated; }; @@ -1069,7 +1076,7 @@ void SetTypes::RegisterSetUnionAgg(ExtensionLoader &loader) { LogicalType::INTEGER, SetTypes::intset())); set_union_set.AddFunction( AggregateFunction::UnaryAggregateDestructor>( + SetUnionScalarFunction>( LogicalType::BIGINT, SetTypes::bigintset())); set_union_set.AddFunction( AggregateFunction::UnaryAggregateDestructor