feat(bindings): tnumber position predicates (<<, >>, &<, &>)#38
Closed
estebanzimanyi wants to merge 1 commit into
Closed
feat(bindings): tnumber position predicates (<<, >>, &<, &>)#38estebanzimanyi wants to merge 1 commit into
estebanzimanyi wants to merge 1 commit into
Conversation
Adds 40 ScalarFunction registrations for tnumber-vs-{numspan, tbox,
tnumber} value-position predicates, backed by 20 wrapper functions:
4 ops (<<, >>, &<, &>) × 5 type-pair shapes:
tnumber × numspan, numspan × tnumber (intspan↔tint, floatspan↔tfloat)
tnumber × tbox, tbox × tnumber (both base types)
tnumber × tnumber (same base type only)
MEOS bindings (20):
left/right/overleft/overright_tnumber_numspan
left/right/overleft/overright_numspan_tnumber
left/right/overleft/overright_tnumber_tbox
left/right/overleft/overright_tbox_tnumber
left/right/overleft/overright_tnumber_tnumber
Implementation uses the TempBoxBoolPred / BoxTempBoolPred /
TempTempBoolPred helpers from PR #37 plus three new macros
(DEFINE_NUMSPAN_POS, DEFINE_TBOX_POS, DEFINE_TNUM_POS) that
generate the wrappers.
Smoke test:
SELECT tint '[1@01-01, 5@01-05]' << intspan '[10, 20]'; -- true
SELECT intspan '[10, 20]' >> tint '[1@01-01, 5@01-05]'; -- true
SELECT tfloat '[1@01-01, 5@01-05]' &< floatspan '[6, 10]'; -- true
SELECT tint '[1@01-01, 5@01-05]' << tbox 'TBOXINT XT([10,20],...)'; -- true
SELECT tint '[1@01-01, 5@01-05]' << tint '[10@01-01, 20@01-05]'; -- true
Stacked on PR #37 (tnumber × {numspan, tbox} topological).
Full suite passes (747 assertions, 13 test cases).
This was referenced Apr 25, 2026
Member
Author
|
Consolidated into #40 (tnumber × {numspan, tbox} bounding-box predicates — topo + position combined). |
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.
Summary
Adds 40 ScalarFunction registrations for tnumber value-position predicates, backed by 20 wrapper functions:
<<,>>,&<,&>MEOS bindings (20)
left/right/overleft/overright_tnumber_numspan+_numspan_tnumber+_tnumber_tbox+_tbox_tnumber+_tnumber_tnumber— all in MEOS public API.Implementation reuses the
TempBoxBoolPred/BoxTempBoolPred/TempTempBoolPredhelpers from PR #37 plus three new macros (DEFINE_NUMSPAN_POS,DEFINE_TBOX_POS,DEFINE_TNUM_POS) that generate the wrappers.Smoke test
Test plan
make releasethenTZ=UTC ./build/release/test/unittest "<proj>/test/*"— full suite passes.034_temporal_posops.testskip block clears for the value-position subset (the time-position<<#/#>>etc. were closed by PR feat(bindings): temporal time-position predicates (before, after, overbefore, overafter) #33).Dependencies
Stacked on PR #37 (tnumber topological). Merge order: ... #36 → #37 → this.