Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,39 @@ include extension-ci-tools/makefiles/duckdb_extension.Makefile
# both MEOS (meos_initialize_timezone) and DuckDB (DBConfig::SetOptionByName
# "TimeZone") to Europe/Brussels. Tests pass on any OS timezone — the
# extension is the single source of truth, no TZ env var needed.
#
# LoadInternal also calls ExtensionHelper::AutoLoadExtension(db, "icu") so
# the timezone option is honoured. Autoload looks for the extension on disk
# at $HOME/.duckdb/extensions/<duckdb_version>/<platform>/icu.duckdb_extension
# and falls back to a hub download. That fails both inside the linux_amd64
# test docker container (empty path, no network egress) and on the macOS
# osx_arm64 test runner (hub icu not reliably resolvable). We copy the
# icu.duckdb_extension that was built locally as part of this extension's
# build (declared in extension_config.cmake) into the expected path,
# matched to the DuckDB platform string, before running the unittester.
DUCKDB_VERSION_TAG := v1.4.4

define stage_icu
@if [ -f ./build/$(1)/extension/icu/icu.duckdb_extension ]; then \
case "$$(uname -s)-$$(uname -m)" in \
Linux-x86_64) platform=linux_amd64 ;; \
Linux-aarch64) platform=linux_arm64 ;; \
Darwin-arm64) platform=osx_arm64 ;; \
Darwin-x86_64) platform=osx_amd64 ;; \
*) platform=$$(uname -m) ;; \
esac; \
target=$$HOME/.duckdb/extensions/$(DUCKDB_VERSION_TAG)/$$platform; \
mkdir -p "$$target" && cp -f ./build/$(1)/extension/icu/icu.duckdb_extension "$$target/" && \
echo "Staged icu.duckdb_extension at $$target/"; \
fi
endef

test_release_internal:
$(call stage_icu,release)
./build/release/$(TEST_PATH) "$(PROJ_DIR)test/*"
test_debug_internal:
$(call stage_icu,debug)
./build/debug/$(TEST_PATH) "$(PROJ_DIR)test/*"
test_reldebug_internal:
./build/reldebug/$(TEST_PATH) "$(PROJ_DIR)test/*"
$(call stage_icu,reldebug)
./build/reldebug/$(TEST_PATH) "$(PROJ_DIR)test/*"
2 changes: 1 addition & 1 deletion src/geo/spatial_aggregates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void SpatialAggregates::AddExtentOverloads(AggregateFunctionSet &extent_set) {
}

void SpatialAggregates::RegisterTcentroid(ExtensionLoader &loader) {
AggregateFunctionSet tcentroid_set("TcentroidAgg");
AggregateFunctionSet tcentroid_set("Tcentroid");
tcentroid_set.AddFunction(MakeTcentroidAggregate(TgeompointType::TGEOMPOINT()));
loader.RegisterFunction(std::move(tcentroid_set));
}
Expand Down
2 changes: 1 addition & 1 deletion src/include/temporal/set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct SetTypes {
static void RegisterCastFunctions(ExtensionLoader &loader);
static void RegisterScalarFunctions(ExtensionLoader &loader);
static void RegisterSetUnnest(ExtensionLoader &loader);
static void RegisterSetUnionAgg(ExtensionLoader &loader);
static void RegisterSetUnion(ExtensionLoader &loader);
};

struct SetTypeMapping {
Expand Down
2 changes: 1 addition & 1 deletion src/include/temporal/span_aggregates.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace duckdb {

struct SpanAggregates {
// Register all span-typed extent() overloads and SpanUnionAgg.
// Register all span-typed extent() overloads and SpanUnion.
static void RegisterAggregateFunctions(ExtensionLoader &loader);
};

Expand Down
26 changes: 21 additions & 5 deletions src/include/tydef.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,27 @@ extern "C" {
#include <meos_internal.h>
}

// Forward-compat alias for the meosType → MeosType rename (MobilityDB
// pr785-sync-script). Vcpkg's MEOS exposes `MeosType`; existing
// MobilityDuck code still uses `meosType`. This alias bridges the two
// without touching every reference site.
using meosType = MeosType;
// MEOS naming history: `meosType` is the **pre-consolidation** spelling
// and `MeosType` is the **post-consolidation** target (the rename is
// part of the upstream consolidation sweep, not yet reached by the
// vcpkg pin). The current pin
// (`vcpkg_ports/meos/portfile.cmake` REF f11b7443ee98…) is still
// pre-consolidation and exposes `meosType` — see
// meos/include/temporal/meos_catalog.h, where line 121 declares
// `} meosType;`. MobilityDuck's source consistently uses
// `meosType` (verified via `grep -rn '\bmeosType\b' src/`), which
// matches the pin, so no alias is needed today.
//
// An earlier version of this file added `using meosType = MeosType;`
// as a forward-looking bridge for the eventual consolidation bump.
// That alias references `MeosType`, which the current pin does NOT
// yet expose, so it broke the build:
// "'MeosType' does not name a type; did you mean 'meosType'?".
//
// When the MEOS pin is bumped past the consolidation point, restore
// a bridge here (`using meosType = MeosType;` becomes valid then) or
// sweep the source `meosType → MeosType` in one PR — whichever the
// project prefers at that time.

namespace duckdb {

Expand Down
22 changes: 11 additions & 11 deletions src/temporal/set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -927,15 +927,15 @@ void SetTypes::RegisterSetUnnest(ExtensionLoader &loader) {
}

// ============================================================================
// SetUnionAgg — aggregate that unions sets or scalar values into a Set.
// SetUnion — aggregate that unions sets or scalar values into a Set.
//
// Overloads:
// SetUnionAgg(int) → intset (via int_to_set + set_union_transfn)
// SetUnionAgg(bigint) → bigintset (via bigint_to_set)
// SetUnionAgg(float) → floatset (via float_to_set)
// SetUnionAgg(date) → dateset (via date_to_set)
// SetUnionAgg(intset) → intset (direct set_union_transfn)
// SetUnionAgg(dateset) → dateset
// SetUnion(int) → intset (via int_to_set + set_union_transfn)
// SetUnion(bigint) → bigintset (via bigint_to_set)
// SetUnion(float) → floatset (via float_to_set)
// SetUnion(date) → dateset (via date_to_set)
// SetUnion(intset) → intset (direct set_union_transfn)
// SetUnion(dateset) → dateset
// ... etc. for all Set types
// ============================================================================

Expand Down Expand Up @@ -981,7 +981,7 @@ static inline void SetUnionFinalize(SetPtrState &state, string_t &target,
free(result);
}

// SetUnionAgg(scalar) — Operation converts scalar to a single-element Set
// SetUnion(scalar) — Operation converts scalar to a single-element Set
// then calls set_union_transfn.
template <typename SCALAR_T, Set *(*TO_SET_FN)(SCALAR_T)>
struct SetUnionScalarFunction {
Expand Down Expand Up @@ -1019,7 +1019,7 @@ struct SetUnionScalarFunction {
}
};

// SetUnionAgg(Set) — Operation copies the blob and calls set_union_transfn.
// SetUnion(Set) — Operation copies the blob and calls set_union_transfn.
struct SetUnionSetFunction {
template <class STATE>
static void Initialize(STATE &state) { state.accumulated = nullptr; }
Expand Down Expand Up @@ -1059,8 +1059,8 @@ struct SetUnionSetFunction {

} // anonymous namespace

void SetTypes::RegisterSetUnionAgg(ExtensionLoader &loader) {
AggregateFunctionSet set_union_set("SetUnionAgg");
void SetTypes::RegisterSetUnion(ExtensionLoader &loader) {
AggregateFunctionSet set_union_set("SetUnion");

// Scalar overloads: convert each value to a single-element Set.
set_union_set.AddFunction(
Expand Down
Loading
Loading