Skip to content

Test the nearest approach distance of a number span - #542

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:test/span-nearest-approach-distance
Oct 30, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:test/span-nearest-approach-distance

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

test/sql/parity/036_tnumber_distance_span.test states what an intspan, bigintspan or floatspan answers through |=| and nearestApproachDistance against a tbox and against the temporal number of its base type, in either order, the cases of MobilityDB's 036_tnumber_distance with the answers its harvested output gives; a box without the value dimension raises the error MobilityDB raises, and a span of another number than the box raises the error of nad_floatspan_tbox, the typed MEOS function DuckDB reaches, where MobilityDB refuses it in its PostgreSQL wrapper, as 025_temporal_tile_tiles.test states such a case.

Witness: tbox 'TBOXINT XT([0,6),[2001-01-01,2001-01-03])' |=| intspan '[10,12)' is 5.0, and intspan '[10,12)' |=| tint '[0@2001-01-01, 5@2001-01-03]' and bigintspan '[10,12)' |=| tbigint '[0@2001-01-01, 5@2001-01-03]' are 5.0; intspan '[1,2)' |=| tbox 'TBOX T([2001-01-01,2001-01-02])' raises "The tbox must have X dimension".

Measured: the file holds the 10 cases of MobilityDB master's span distance section, 8 queries and 2 errors, written from its harvested 036_tnumber_distance.test.out; the generated surface at MEOS 7a0117c238 registers the 24 forms MobilityDB declares over a number span, against 18 at 7fb8e5bd65, where the span-first forms against a temporal number are absent and the tbox-first forms read their tbox argument as a span.

Why: no test read a span distance, so the 6 tbox-first forms answer from the wrong operand on main and the 6 span-first forms against a temporal number stay unregistered without one failing.

test/sql/parity/036_tnumber_distance_span.test states what an intspan, bigintspan or floatspan answers through |=| and nearestApproachDistance against a tbox and against the temporal number of its base type, in either order, the cases of MobilityDB's 036_tnumber_distance with the answers its harvested output gives; a box without the value dimension raises the error MobilityDB raises, and a span of another number than the box raises the error of nad_floatspan_tbox, the typed MEOS function DuckDB reaches, where MobilityDB refuses it in its PostgreSQL wrapper, as 025_temporal_tile_tiles.test states such a case.

Witness: tbox 'TBOXINT XT([0,6),[2001-01-01,2001-01-03])' |=| intspan '[10,12)' is 5.0, and intspan '[10,12)' |=| tint '[0@2001-01-01, 5@2001-01-03]' and bigintspan '[10,12)' |=| tbigint '[0@2001-01-01, 5@2001-01-03]' are 5.0; intspan '[1,2)' |=| tbox 'TBOX T([2001-01-01,2001-01-02])' raises "The tbox must have X dimension".

Measured: the file holds the 10 cases of MobilityDB master's span distance section, 8 queries and 2 errors, written from its harvested 036_tnumber_distance.test.out; the generated surface at MEOS 7a0117c238 registers the 24 forms MobilityDB declares over a number span, against 18 at 7fb8e5bd65, where the span-first forms against a temporal number are absent and the tbox-first forms read their tbox argument as a span.

Why: no test read a span distance, so the 6 tbox-first forms answer from the wrong operand on main and the 6 span-first forms against a temporal number stay unregistered without one failing.
@estebanzimanyi
estebanzimanyi merged commit 2464708 into MobilityDB:main Oct 30, 2026
9 checks passed
@estebanzimanyi
estebanzimanyi deleted the test/span-nearest-approach-distance branch October 30, 2026 18:00
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