Skip to content

Commit e5d0464

Browse files
Bump pinned MEOS to 278863520b and adapt to its surface
Pin MEOS to the canonical ecosystem surface and adapt the binding to it: treat a shared span boundary as adjacency (the share-a-boundary span adjacency goldens), and derive the symmetric box/span x temporal topological predicates (overlaps/same/adjacent) from MEOS's single canonical argument direction by commutativity, since the reverse-argument duplicates are deduplicated out of the surface.
1 parent 77f3e86 commit e5d0464

4 files changed

Lines changed: 25 additions & 6 deletions

File tree

src/include/meos_wrapper_simple.hpp

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,26 @@ extern "C" {
1010
#include <meos_internal_geo.h>
1111
}
1212

13+
// The symmetric box/span × temporal topological predicates (overlaps, same,
14+
// adjacent) are canonicalized in MEOS to a single argument direction
15+
// (temporal-first). The reverse-argument overloads the DuckDB surface exposes
16+
// derive from that one kernel by commutativity (swap the operands). The
17+
// non-symmetric predicates (contains/contained/overbefore/overafter) keep both
18+
// MEOS directions and are used directly.
19+
static inline bool overlaps_tstzspan_temporal(const Span *s, const Temporal *t) { return overlaps_temporal_tstzspan(t, s); }
20+
static inline bool same_tstzspan_temporal (const Span *s, const Temporal *t) { return same_temporal_tstzspan(t, s); }
21+
static inline bool adjacent_tstzspan_temporal(const Span *s, const Temporal *t) { return adjacent_temporal_tstzspan(t, s); }
22+
static inline bool overlaps_stbox_tspatial(const STBox *b, const Temporal *t) { return overlaps_tspatial_stbox(t, b); }
23+
static inline bool same_stbox_tspatial (const STBox *b, const Temporal *t) { return same_tspatial_stbox(t, b); }
24+
static inline bool adjacent_stbox_tspatial(const STBox *b, const Temporal *t) { return adjacent_tspatial_stbox(t, b); }
25+
static inline bool overlaps_numspan_tnumber(const Span *s, const Temporal *t) { return overlaps_tnumber_numspan(t, s); }
26+
static inline bool same_numspan_tnumber (const Span *s, const Temporal *t) { return same_tnumber_numspan(t, s); }
27+
static inline bool adjacent_numspan_tnumber(const Span *s, const Temporal *t) { return adjacent_tnumber_numspan(t, s); }
28+
static inline bool overlaps_tbox_tnumber(const TBox *b, const Temporal *t) { return overlaps_tnumber_tbox(t, b); }
29+
static inline bool same_tbox_tnumber (const TBox *b, const Temporal *t) { return same_tnumber_tbox(t, b); }
30+
static inline bool adjacent_tbox_tnumber(const TBox *b, const Temporal *t) { return adjacent_tnumber_tbox(t, b); }
31+
1332
// Create explicit aliases for MEOS types
1433
// Use the original MEOS type names but with explicit qualification
1534
using MeosInterval = ::Interval; // Explicitly use global MEOS Interval
16-
using MeosTimestamp = ::Timestamp; // Explicitly use global MEOS Timestamp
35+
using MeosTimestamp = ::Timestamp; // Explicitly use global MEOS Timestamp

test/sql/parity/005_span_ops.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ true
4949
query I
5050
SELECT 1.0 -|- floatspan '[1, 3]';
5151
----
52-
false
52+
true
5353

5454
query I
5555
SELECT 1.0 -|- floatspan '(1, 3]';
@@ -59,7 +59,7 @@ true
5959
query I
6060
SELECT floatspan '[1, 3]' -|- 1.0;
6161
----
62-
false
62+
true
6363

6464
query I
6565
SELECT floatspan '[1, 3]' -|- floatspan '[1, 3]';

test/sql/parity/032_temporal_topops.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ true
4646
query I
4747
SELECT tint '[1@2000-01-01, 5@2000-01-05]' -|- tstzspan '[2000-01-05, 2000-01-06]';
4848
----
49-
false
49+
true

vcpkg_ports/meos/portfile.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
vcpkg_from_github(
22
OUT_SOURCE_PATH SOURCE_PATH
33
REPO estebanzimanyi/MobilityDB
4-
REF 345710da851b16c5c34647b1c37de1ef6655ba61
5-
SHA512 a42d90bbdd35f59d322014c4ccd6f715cd52772e93c28ee53f973c4c0e72920a596bb8d5a9e74041b58331b3d6ce9e9f223b113877f1c8ce7eda456cba5a7243
4+
REF 278863520b000b735cc361beab88387174909ed7
5+
SHA512 2e617cac4bfed919eee8bd73e35f9b3da8ffd7a51f68104a9497c0d3339dbb1af4a2ec6feab3e8fffb880481badf86c352ad1efb39cab533de19d2c1192a8e5b
66
)
77

88
vcpkg_replace_string(

0 commit comments

Comments
 (0)