Skip to content

Test the operators of a span and a temporal box - #539

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:test/span-tbox-operators
Oct 30, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:test/span-tbox-operators

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

test/sql/parity/021_tbox_span_ops.test states what an intspan, bigintspan, floatspan or tstzspan answers against a tbox through the operators the two share, in either order, the cases of MobilityDB's 021_tbox with the answers its harvested output gives: a number span on the value dimension (&&, @>, <@, ~=, -|-, <<, &<, >>, &>), a timestamptz span on the time dimension, whose operators spelled with '#' are reached through their named form (tboxBefore, tboxOverbefore, tboxAfter, tboxOverafter) since the generator registers no operator spelled with '#', which DuckDB's lexer refuses; a span of another number than the box and a box without the span's dimension raise the errors MobilityDB raises.

Witness: intspan '[1,5)' && tbox 'TBOXINT XT([3,8),[2001-01-01,2001-01-02])' is true, intspan '[1,5)' &> tbox ... false and tbox ... &> intspan '[1,5)' true; tboxAfter(tstzspan '[2001-01-05,2001-01-06]', tbox ...) is true; floatspan '[1,5)' && tbox 'TBOXINT ...' raises "Operation on mixed span types".

Measured: the file holds the 29 cases of MobilityDB's span and box section, 25 queries and 4 errors, written from the harvested 021_tbox.test.out of MobilityDB master; the generated surface registers 136 of the 144 forms MobilityDB declares over a span and a box, the 8 left the '#' operators, whose named forms are among the 136.

Why: the generator registers the span and box operators from the catalog at the recorded MEOS commit, and no test read one of them.

test/sql/parity/021_tbox_span_ops.test states what an intspan, bigintspan, floatspan or tstzspan answers against a tbox through the operators the two share, in either order, the cases of MobilityDB's 021_tbox with the answers its harvested output gives: a number span on the value dimension (&&, @>, <@, ~=, -|-, <<, &<, >>, &>), a timestamptz span on the time dimension, whose operators spelled with '#' are reached through their named form (tboxBefore, tboxOverbefore, tboxAfter, tboxOverafter) since the generator registers no operator spelled with '#', which DuckDB's lexer refuses; a span of another number than the box and a box without the span's dimension raise the errors MobilityDB raises.

Witness: intspan '[1,5)' && tbox 'TBOXINT XT([3,8),[2001-01-01,2001-01-02])' is true, intspan '[1,5)' &> tbox ... false and tbox ... &> intspan '[1,5)' true; tboxAfter(tstzspan '[2001-01-05,2001-01-06]', tbox ...) is true; floatspan '[1,5)' && tbox 'TBOXINT ...' raises "Operation on mixed span types".

Measured: the file holds the 29 cases of MobilityDB's span and box section, 25 queries and 4 errors, written from the harvested 021_tbox.test.out of MobilityDB master; the generated surface registers 136 of the 144 forms MobilityDB declares over a span and a box, the 8 left the '#' operators, whose named forms are among the 136.

Why: the generator registers the span and box operators from the catalog at the recorded MEOS commit, and no test read one of them.
@estebanzimanyi
estebanzimanyi merged commit 887ab35 into MobilityDB:main Oct 30, 2026
9 checks passed
@estebanzimanyi
estebanzimanyi deleted the test/span-tbox-operators branch October 30, 2026 09:56
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