Skip to content

Read an integer box operand at the width its registration declares - #365

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/tbox-scalar-signatures
Sep 3, 2026
Merged

Read an integer box operand at the width its registration declares#365
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/tbox-scalar-signatures

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

tbox.test is disabled whole-file, and its own comment names the follow-up that
re-registers the bindings with correct argument types. That follow-up is what
this carries, so the file runs again: the suite goes from 2695 assertions to
2795, and the hundred it gains are the ones nobody was running.

THE WITNESS. Six executors read an INTEGER operand as int64_t. Their branch is
entered only when the vector is INTEGER, and the lambda beneath them applies
Int32GetDatum, so both the registration and their own use say 32 bits; reading
64 takes a second word from a 32-bit vector. DuckDB 1.4 refuses it outright:

SELECT tbox(10, timestamptz '2000-01-01');
INTERNAL Error: Expected vector of type INT64, but found vector of type INT32

Before that release the same read was undefined and silent, which is what let
the whole file be disabled rather than the six sites corrected. The file holds
no BIGINT branch at all — 0 against 8 DOUBLE ones — so every INTEGER branch is
a 32-bit path and all six reads are the same defect.

THE EXPECTED VALUES MOVE IN TWO WAYS, AND ONLY ONE IS A ZONE. The timestamps
gain +01 because MobilityDuck initialises MEOS with Europe/Brussels and states
why: a zone that differs from UTC fails loudly if the override is ever
dropped, where UTC would pass trivially. tools/scripts and the sibling files
already read that way, and SET TimeZone does not reach MEOS text output.
Two adjacency results move from 0 to 1, and those are not a zone: -|- answers
whether closures meet at a boundary, so a shared inclusive endpoint IS
adjacency. Both moved rows are boundary-meets — [2000-01-02, 2000-02-01]
against [2000-01-01, 2000-01-02], and the two spans meeting at 2000-01-02 —
and every other topology file took that flip when the rule landed. This file
was skipped through it and is the last one still asserting the rule it
replaced.

MEASURED. The full suite passes, 2795 assertions across 102 cases, with the
six executors corrected and no other file's expectations touched. Skipped
blocks across the suite go 18 to 15, and tbox.test holds none.

tbox.test is disabled whole-file, and its own comment names the follow-up that
re-registers the bindings with correct argument types. That follow-up is what
this carries, so the file runs again: the suite goes from 2695 assertions to
2795, and the hundred it gains are the ones nobody was running.

THE WITNESS. Six executors read an INTEGER operand as int64_t. Their branch is
entered only when the vector is INTEGER, and the lambda beneath them applies
Int32GetDatum, so both the registration and their own use say 32 bits; reading
64 takes a second word from a 32-bit vector. DuckDB 1.4 refuses it outright:

  SELECT tbox(10, timestamptz '2000-01-01');
  INTERNAL Error: Expected vector of type INT64, but found vector of type INT32

Before that release the same read was undefined and silent, which is what let
the whole file be disabled rather than the six sites corrected. The file holds
no BIGINT branch at all — 0 against 8 DOUBLE ones — so every INTEGER branch is
a 32-bit path and all six reads are the same defect.

THE EXPECTED VALUES MOVE IN TWO WAYS, AND ONLY ONE IS A ZONE. The timestamps
gain +01 because MobilityDuck initialises MEOS with Europe/Brussels and states
why: a zone that differs from UTC fails loudly if the override is ever
dropped, where UTC would pass trivially. tools/scripts and the sibling files
already read that way, and `SET TimeZone` does not reach MEOS text output.
Two adjacency results move from 0 to 1, and those are not a zone: `-|-` answers
whether closures meet at a boundary, so a shared inclusive endpoint IS
adjacency. Both moved rows are boundary-meets — [2000-01-02, 2000-02-01]
against [2000-01-01, 2000-01-02], and the two spans meeting at 2000-01-02 —
and every other topology file took that flip when the rule landed. This file
was skipped through it and is the last one still asserting the rule it
replaced.

MEASURED. The full suite passes, 2795 assertions across 102 cases, with the
six executors corrected and no other file's expectations touched. Skipped
blocks across the suite go 18 to 15, and tbox.test holds none.
@estebanzimanyi
estebanzimanyi merged commit 5e63c1a into MobilityDB:main Sep 3, 2026
10 checks passed
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