Skip to content

feat(bindings): temporal_same — closes the topo-predicate gap#80

Closed
estebanzimanyi wants to merge 1 commit intomainfrom
feat/parity-small-tail-batch
Closed

feat(bindings): temporal_same — closes the topo-predicate gap#80
estebanzimanyi wants to merge 1 commit intomainfrom
feat/parity-small-tail-batch

Conversation

@estebanzimanyi
Copy link
Copy Markdown
Member

Closes the `temporal_same` gap deferred from PR #72. At the time, the underlying `Same_*` handlers were not wired in MobilityDuck. PR #75 added `Same` handlers on the tspatial side; this PR finishes the temporal + tnumber side.

New handlers (7)

Handler MEOS export
`Same_temporal_temporal` `same_temporal_temporal`
`Same_temporal_tstzspan` `same_temporal_tstzspan`
`Same_tstzspan_temporal` `same_tstzspan_temporal`
`Same_tnumber_numspan` `same_tnumber_numspan`
`Same_numspan_tnumber` `same_numspan_tnumber`
`Same_tnumber_tbox` `same_tnumber_tbox`
`Same_tbox_tnumber` `same_tbox_tnumber`

SQL surface

Each handler is registered both as the `~=` operator and the `temporal_same` named alias for 32 type-pair shapes parallel to the existing `Contains` / `Contained` / `Overlaps` / `Adjacent` surface:

  • temporal × temporal (16 pairs from `AllTypes() × AllTypes()`)
  • temporal × tstzspan (4) and tstzspan × temporal (4)
  • tnumber × numspan (2 pairs) and numspan × tnumber (2 pairs)
  • tnumber × tbox (2 pairs) and tbox × tnumber (2 pairs)

A new `REG_TOP5` macro folds the tnumber × {numspan, tbox} block (replacing 32 hand-written lines with 6 macro invocations).

Tests

  • `test/sql/parity/032_temporal_same.test` — 10 assertions covering each direction and the operator-vs-alias equivalence.
  • Full suite: 762 assertions / 14 test cases passing under `TZ=UTC`.

Coverage delta

Per the audit in PR #66:

Test plan

  • `cmake --build . --target shell unittest` clean
  • New parity test passes (10/10)
  • Full suite green (762/14)

Adds 7 new Same handlers:

- Same_temporal_temporal
- Same_temporal_tstzspan / Same_tstzspan_temporal
- Same_tnumber_numspan / Same_numspan_tnumber
- Same_tnumber_tbox / Same_tbox_tnumber

Each routes to the matching MEOS export (same_*_*). Registers `~=`
operator and `temporal_same` named alias for all 32 type-pair shapes
parallel to the existing Contains/Contained/Overlaps/Adjacent surface.

Folds the tnumber × {numspan, tbox} block under a REG_TOP5 macro
that emits all 5 topo-op registrations per (L, R, FN_SUFFIX) triple,
replacing 32 hand-written lines with 6 macro invocations.

Closes the `temporal_same` gap deferred from PR #72: at the time, the
underlying Same_* handlers were not wired in MobilityDuck. PR #75 added
Same handlers on the tspatial side; this PR finishes the temporal +
tnumber side.

Test: test/sql/parity/032_temporal_same.test (10 assertions covering
Same on temporal × temporal, temporal × tstzspan (both directions),
tnumber × numspan (both directions), tnumber × tbox (both directions),
and the operator-vs-alias equivalence).
Full suite: 762 / 14 cases under TZ=UTC.
@estebanzimanyi estebanzimanyi marked this pull request as ready for review May 1, 2026 19:13
@estebanzimanyi
Copy link
Copy Markdown
Member Author

Superseded by the consolidated PR branch consolidate/temporal-ops-parity. All changes from this PR are included in that branch as a single squashed commit. Please review and merge the consolidated branch instead.

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