Repository navigation
Test the operators of a span and a temporal box - #539
Merged
estebanzimanyi merged 1 commit intoOct 30, 2026
Merged
Conversation
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.
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.
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.