Skip to content

fix: sync MEOS API drift (meosType→MeosType + spatial-rel arg drop)#118

Closed
estebanzimanyi wants to merge 1 commit intomainfrom
fix/api-drift-sync
Closed

fix: sync MEOS API drift (meosType→MeosType + spatial-rel arg drop)#118
estebanzimanyi wants to merge 1 commit intomainfrom
fix/api-drift-sync

Conversation

@estebanzimanyi
Copy link
Copy Markdown
Member

Summary

Two cherry-picked commits unblocking local compilation against the current vcpkg MEOS:

  • fe4a0da refactor: meosType -> MeosType (sync to upstream MEOS PR #785) — sweeps every reference of the lowercase meosType typedef in MobilityDuck source to the PascalCase MeosType that the current MEOS catalog header exposes.

  • cd1d5d2 fix(geo): adapt 12 t{contains,disjoint,intersects,touches,dwithin}_* call sites to 3-arg MEOS API — the tcontains_geo_tgeo, tdisjoint_*, tintersects_*, ttouches_*, tdwithin_* exports lost their restr / at_value trailing arguments (the result is now always the full tbool — restriction is composed at the call site via tbool_at_value when needed). Updates the 12 call sites in tgeompoint_functions.cpp.

Both commits originate from the parallel perf/duck-stack-attempt2 work (7a8cc22, c37b9e2). Cherry-picked here onto main so they land independently and other in-flight branches stop compiling against a stale API.

Why now

Currently make release on main fails with 'meosType' does not name a type; did you mean 'MeosType'? and too many arguments to function 'Temporal* tcontains_geo_tgeo(...)' (× 13 call sites). Without these, no parity work can build locally, and only branches that already happen to carry this fix get green CI.

Test plan

  • CI green on linux_amd64 and linux_arm64.
  • No behavioural change — the only places restr=true was used are now wrapped in a tbool_at_value(ret, at_value) post-restriction that produces the same result the dropped MEOS args used to compute internally.

Two upstream MEOS changes that the source had not caught up to:

1. MEOS catalog header now exposes the type as MeosType (PascalCase).
   MobilityDuck source historically used meosType (lowercase). Sweep
   rename across temporal/{set,span,spanset}.hpp,
   temporal/temporal_functions.hpp, geo/tgeompoint_functions.cpp,
   index/rtree_module.hpp, etc.

2. The MEOS exports tcontains_geo_tgeo, tdisjoint_{geo_tgeo,tgeo_geo,
   tgeo_tgeo}, tintersects_{geo_tgeo,tgeo_geo,tgeo_tgeo},
   ttouches_{geo_tgeo,tgeo_geo}, tdwithin_{tgeo_tgeo,tgeo_geo,geo_tgeo}
   lost their trailing bool restr, bool at_value parameters. The result
   is now always the full tbool; restriction is composed at the call
   site:

       Temporal *ret = tcontains_geo_tgeo(gs, tgeom);
       if (ret && restr) {
           Temporal *r2 = tbool_at_value(ret, at_value);
           free(ret);
           ret = r2;
       }

   The 3-arg form for tdwithin_* keeps the dist parameter; only
   restr/at_value are dropped.

Currently make release on main fails with 'meosType does not name a
type' and 'too many arguments to function tcontains_geo_tgeo' (× 13
call sites). Without this, no parity work can build locally and only
branches that already happen to carry this fix get green CI.

Cherry-picked from perf/duck-stack-attempt2 (commits 7a8cc22 and
c37b9e2).
@estebanzimanyi
Copy link
Copy Markdown
Member Author

Superseded by #121 main hygiene: revert single-timezone + sync MEOS API drift (consolidates #116 + #118). No content lost; cherry-picks applied cleanly. Close this PR when convenient.

estebanzimanyi added a commit that referenced this pull request May 10, 2026
#116 + #118)

Two cleanups landing together so the rest of the open PR queue can
build and merge.

Part 1 — revert main's single-timezone commits (was #116):
- 39921f1 fix(tz): single-timezone model — drops the AutoLoadExtension(icu)
  + SetOptionByName("TimeZone", ...) block from LoadInternal.
- 08a5598 docs(tz): clarify two-timezone reality in comments.
- 47df9ca fix(tz): set MEOS timezone to Europe/Brussels — drops
  meos_initialize_timezone("Europe/Brussels").
- d3d9810 fix(tz): force MEOS UTC timezone — drops the earlier
  meos_initialize_timezone("UTC") so LoadInternal matches PR #111's
  parent state exactly.
- Shift remaining +01 expectations to +00 in 23 test files (calendar
  dates unchanged; only displayed offset shifts to match TZ=UTC).

Part 2 — sync MEOS API drift (was #118):
- meosType → MeosType sweep (16 files): MEOS catalog header now exposes
  the type as MeosType (PascalCase); MobilityDuck source historically
  used meosType (lowercase).
- t{contains,disjoint,intersects,touches,dwithin}_* arg drop (12 call
  sites): MEOS exports lost their trailing bool restr, bool at_value
  parameters; restriction is now composed at the call site via
  tbool_at_value when needed.

Result: LoadInternal collapses to ConfigureMeosSridCsvOnce() +
meos_initialize() + error handler, exactly matching PR #111's parent
state.  All MobilityDuck source compiles against the current vcpkg MEOS.
PR #111 then replaces the call_once block with
EnsureMeosInitializedOnThread() — clean diff, no policy fight.

The +00 shift is interim shape per the project's timezone-neutral
policy (PR #111 / commit 9dd765a); the longer-term direction is to
rewrite each assertion to value-equality / accessor / asText round-trip
form, caught by scripts/lint-tz-pinned-tests.py (PR #120).

## Closes

- #116 (consolidate: revert main's tz commits and align tests with TZ=UTC)
- #118 (fix: sync MEOS API drift)
@estebanzimanyi
Copy link
Copy Markdown
Member Author

Folded into #121 (same) per the ecosystem PR consolidation policy. The consolidation PR explicitly declares this PR as one of its inputs in the Closes line; verified content equivalence (byte-identical / additive refinements only). Closing as superseded; no work is lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant