Skip to content

Register the shorter call of a function whose third argument has a default - #419

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/defaulted-overload-of-a-ternary
Sep 28, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/defaulted-overload-of-a-ternary

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A MEOS function taking a temporal and two scalars, whose last argument
MobilityDB declares with a default, is registered one argument shorter too:
emit_defaulted_ternary is the body of emit_body_ternary with the default
substituted, over a BinaryExecutor, as emit_defaulted_unary_temporal is the
shorter call of a binary function. The default reaches the kernel as the
argument it stands for does: a by-value scalar as its literal, a text argument
through the marshalling its column takes, so the 'raise_exception' of the
tjsonb conversions is read by null_handle_type_from_string.

Witness. tint(TJSONB('{"a":1}@2000-01-01'), 'a') and
deleteTime(tint '[1@2001-01-01, 2@2001-01-02, 3@2001-01-03]', timestamptz '2001-01-02') answer what the full calls answer with 'raise_exception' and
true, where no function matched the shorter tjsonb call; tint.test and
027_tjsonb.test gain the queries.

Measured. Regenerated against the catalog at the recorded MEOS commit
9c886635ef, the surface holds the 1870 bodies it held, unchanged, and 11 more:
the shorter afterTimestamp, beforeTimestamp and deleteTime over every temporal
type, douglasPeuckerSimplify, maxDistSimplify and the three tjsonb conversions,
72 registrations in all, none removed. The 107 test files pass, 3053
assertions. Against the catalog of MobilityDB master 1dfb8d63c1 the same change
registers tquadbin(tgeompoint, integer), whose borderInc argument defaults to
true, and raquet.test passes there, the one test the surface refresh fails.

Why. A call MobilityDB accepts is a call the binding accepts, and the refresh
to the current MEOS commit reads tquadbin(tgeompoint, 11) in raquet.test.

…fault

A MEOS function taking a temporal and two scalars, whose last argument
MobilityDB declares with a default, is registered one argument shorter too:
emit_defaulted_ternary is the body of emit_body_ternary with the default
substituted, over a BinaryExecutor, as emit_defaulted_unary_temporal is the
shorter call of a binary function. The default reaches the kernel as the
argument it stands for does: a by-value scalar as its literal, a text argument
through the marshalling its column takes, so the 'raise_exception' of the
tjsonb conversions is read by null_handle_type_from_string.

Witness. `tint(TJSONB('{"a":1}@2000-01-01'), 'a')` and
`deleteTime(tint '[1@2001-01-01, 2@2001-01-02, 3@2001-01-03]', timestamptz
'2001-01-02')` answer what the full calls answer with 'raise_exception' and
true, where no function matched the shorter tjsonb call; tint.test and
027_tjsonb.test gain the queries.

Measured. Regenerated against the catalog at the recorded MEOS commit
9c886635ef, the surface holds the 1870 bodies it held, unchanged, and 11 more:
the shorter afterTimestamp, beforeTimestamp and deleteTime over every temporal
type, douglasPeuckerSimplify, maxDistSimplify and the three tjsonb conversions,
72 registrations in all, none removed. The 107 test files pass, 3053
assertions. Against the catalog of MobilityDB master 1dfb8d63c1 the same change
registers tquadbin(tgeompoint, integer), whose borderInc argument defaults to
true, and raquet.test passes there, the one test the surface refresh fails.

Why. A call MobilityDB accepts is a call the binding accepts, and the refresh
to the current MEOS commit reads tquadbin(tgeompoint, 11) in raquet.test.
@estebanzimanyi
estebanzimanyi merged commit 7a41507 into MobilityDB:main Sep 28, 2026
9 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/defaulted-overload-of-a-ternary branch September 28, 2026 05:19
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