Skip to content

feat(bindings): temporal position predicates — temporal_* named aliases#74

Closed
estebanzimanyi wants to merge 1 commit intomainfrom
feat/parity-temporal-posops-aliases
Closed

feat(bindings): temporal position predicates — temporal_* named aliases#74
estebanzimanyi wants to merge 1 commit intomainfrom
feat/parity-temporal-posops-aliases

Conversation

@estebanzimanyi
Copy link
Copy Markdown
Member

Closes the user-facing tail of `temporal/034_temporal_posops` (was 0%; this brings the user-visible surface to ~100%).

New SQL surface

Time axis

Aliases for the existing `before` / `after` / `overbefore` / `overafter` named forms (the underlying MobilityDB operator tokens `<<#`, `#>>`, `&<#`, `#&>` are unreachable in DuckDB's parser):

MobilityDuck name Routes to
`temporal_before` `Before_*` (existing)
`temporal_after` `After_*`
`temporal_overbefore` `Overbefore_*`
`temporal_overafter` `Overafter_*`

Coverage:

  • temporal × temporal (every base-type pair)
  • temporal × tstzspan and tstzspan × temporal

Numeric axis

Aliases for the existing `<<` / `>>` / `&<` / `&>` operators on the tnumber surface:

MobilityDuck name Routes to
`temporal_left` `Left_*`
`temporal_right` `Right_*`
`temporal_overleft` `Overleft_*`
`temporal_overright` `Overright_*`

Coverage:

  • tnumber × numspan / numspan × tnumber
  • tnumber × tbox / tbox × tnumber
  • tnumber × tnumber

A small `REG_POS4` macro factors out the 4-name × 4-handler block, mirroring the `REG_TOP4` macro used in PR #72 for boxops.

Tests

  • `test/sql/parity/034_temporal_posops.test` — 10 assertions covering time-axis aliases, numeric-axis aliases on numspan/tbox/tnumber, and operator-vs-named equivalence.
  • Full suite: 762 assertions / 14 test cases passing under `TZ=UTC`.

Coverage delta

Per the audit in PR #66:

  • `temporal/034_temporal_posops`: 0/8 → 8/8 by name (100%).

Test plan

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

Closes the user-facing tail of temporal/034_temporal_posops:

Time axis (named aliases for the existing `before`/`after`/
`overbefore`/`overafter` named forms; the operator tokens `<<#`,
`#>>`, `&<#`, `#&>` are unreachable in DuckDB):
- temporal_before  / temporal_after
- temporal_overbefore / temporal_overafter

Coverage: temporal × temporal (every base-type pair) and
(temporal × tstzspan, tstzspan × temporal).

Numeric axis (named aliases for the existing `<<`/`>>`/`&<`/`&>`
operators on tnumber surface):
- temporal_left  / temporal_right
- temporal_overleft / temporal_overright

Coverage: tnumber × numspan / numspan × tnumber, tnumber × tbox /
tbox × tnumber, tnumber × tnumber. A REG_POS4 macro factors out the
4-name × 4-handler block.

Test: test/sql/parity/034_temporal_posops.test (10 assertions covering
time-axis aliases, numeric-axis aliases on numspan/tbox/tnumber, and
operator-vs-named equivalence).
Full suite: 762 / 14 cases under TZ=UTC.

Files also gain a trailing newline at EOF.
@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