Stage icu for the macOS osx_arm64 test path too#141
Closed
estebanzimanyi wants to merge 13 commits into
Closed
Conversation
…onalization)
The previous portfile pinned REF f11b7443e (Mar 30) with a SHA512 that
actually corresponded to a different commit (742c1fb5), masked by vcpkg
SHA-cache lottery. Move both REF and SHA512 to MobilityDB master HEAD
dd4ccd3c2 so the pin is internally consistent.
This bump crosses two breaking MEOS API changes that need separate
follow-up commits to compile cleanly:
* meosType -> MeosType (#790, Apr 28): the forward-compat alias in
src/include/tydef.hpp now resolves cleanly.
* Drop restr/atvalue from spatiotemporal relationship functions
(#778, Apr 28): the 4-arg tcontains_geo_tgeo / tdisjoint_* /
tintersects_* / ttouches_* / tdwithin_* / tpoint_minus_geom calls
in src/geo/tgeompoint_functions.cpp must be reworked to the
new 2-arg / 3-arg signatures. Restriction semantics moves to
post-hoc atValues per MEOS PR #778's migration recipe; the DuckDB
public surface drops the (BOOLEAN) overloads to mirror the
orthogonalized MEOS shape.
MEOS PR #1005 renamed temptype_continuous to temptype_supports_linear in meos_catalog.h. Update the five call sites in src/geo/tgeompoint_functions.cpp and src/temporal/temporal_functions.cpp to match the new MEOS API.
Drop trailing underscore on bbox_type and migrate rtree_search to the new MeosArray *result out-parameter signature replacing the int **/int* pair.
MEOS master now exports a global function bool bbox_type(MeosType) in meos_internal.h. Inside TRTreeIndex member functions, unqualified bbox_type resolves to that global function and shadows the class member, producing 'assignment of function' and 'invalid conversion' errors. Rename the member to bbox_meostype throughout the rtree module.
LoadInternal calls ExtensionHelper::AutoLoadExtension(db, "icu") so the Europe/Brussels timezone option is honoured. Inside the linux_amd64 test docker container there is no network egress and the local extension directory is empty, so the autoload fails. Copy the icu.duckdb_extension that was just built locally (declared in extension_config.cmake) into the expected path before running the unittester.
MEOS keeps the session timezone, errno, PROJ context and RNGs in thread-local storage and requires every thread that calls into it to run meos_initialize() before its first call. The extension only did this once on the load thread, so DuckDB TaskScheduler workers ran scalar, cast and aggregate bodies with a NULL session_timezone and segfaulted in pg_next_dst_boundary on the first timestamp parse. A thread-local guard now runs the per-thread init (and re-installs the process-global error handler, which meos_initialize() resets to the exit-on-error default) at the scalar exec wrapper and through a cast registration trampoline covering every cast entry point.
The MEOS uplift adds tfloat_ln_turnpt / tfloat_exp_turnpt, which insert one chord-error-minimising turning point on a linear input segment for the transcendental unary lifts. ln/log10/exp over a two-instant input now return three instants. Update the 026b expectations to the new values; the deltaValue, trend and arithmetic-alias cases are linear and unchanged.
On macOS LP64 int64 (long) and int64_t (long long) are the same width but distinct types, so clang rejects bigint_to_set as the non-type template argument of SetUnionScalarFunction<int64_t, ...>, failing the osx_amd64 and osx_arm64 builds at src/temporal/set.cpp. Add a bigint_to_set_duckdb forwarder that takes int64_t and casts to int64 before calling MEOS, mirroring the existing date_to_set_duckdb idiom. The cast is a no-op on Linux. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The stage_icu helper mapped only the Linux uname values, so on the macOS arm64 test runner uname -m returned "arm64" and the icu extension was copied to .duckdb/extensions/v1.4.4/arm64 instead of .../osx_arm64, where DuckDB's autoload looks. The hub fallback is not reliably resolvable on that runner, so the osx_arm64 Test step failed to load the extension. Map the OS and architecture to the DuckDB platform string (linux_amd64, linux_arm64, osx_amd64, osx_arm64) so the locally built icu is staged at the path autoload expects on every tested platform; the Linux mapping is unchanged. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced May 16, 2026
Member
Author
Reviewer's quickstart — ~2 minutesWhat this PR does: Stage icu for the macOS osx_arm64 test path too. Files to read: `` (plus minimal surrounding context). Risk: narrow scope; the diff is small and self-contained. Stacked on its base PR — once the stack ahead of it lands, this rebases trivially. Cross-link: Linux arm64 CI needs #161 for the |
`meosType` (lower-case) is the **pre-consolidation** MEOS type name; `MeosType` (upper-case) is the **post-consolidation** target that the upstream rename sweep has not yet reached. The current vcpkg pin (`vcpkg_ports/meos/portfile.cmake` REF f11b7443ee98…) is still pre-consolidation: `meos/include/temporal/meos_catalog.h` line 121 declares the typedef as `} meosType;` and every MEOS API uses the lower-case spelling. MobilityDuck's source code consistently uses `meosType` to match — `grep -rn '\bMeosType\b' src/` finds the name only on the alias line and its comment, nowhere else. c8cad6d added `using meosType = MeosType;` as a forward-looking bridge for the eventual consolidation bump. That bridge points at `MeosType`, which the current pin does NOT yet expose, so it breaks every PR's Linux arm64 build with: /duckdb_build_dir/src/include/tydef.hpp:18:18: error: ‘MeosType’ does not name a type; did you mean ‘meosType’? The fix is to drop the premature alias and replace the misleading comment with one that documents the pre/post-consolidation distinction and the resume path for the next pin bump — at that point a reviewer can either restore the bridge (this time it'll be valid because `MeosType` will exist) or sweep the MobilityDuck source from `meosType` to `MeosType` in a single PR. Unblocks every in-flight PR's Linux arm64 build: #126, #130, #149, #158, #159, #160, plus the entire `feat/*_port_core` extended-type stack (#148/#150/#151/#153/#155/#156).
0a68715 to
d0a70ae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The stage_icu helper mapped only the Linux uname values, so on the macOS arm64 test runner uname -m returned arm64 and the locally built icu extension was copied to .duckdb/extensions/v1.4.4/arm64 instead of .../osx_arm64 where DuckDB autoload looks, and the hub fallback is not reliably resolvable there, so the osx_arm64 Test step failed to load the extension. This maps the OS and architecture to the DuckDB platform string so icu is staged where autoload expects on every tested platform, with the Linux mapping unchanged. It is logically an iteration of the #136 icu pre-stage (build/CI wiring); stacked on #140 so the leaf goes fully green, and the committer may prefer to fold it into #136 at merge. Stacked on fix/macos-int64-bigint-to-set-forwarder (#140); its commit shows in this diff until it merges.