Skip to content

State the interpolation a wrapper takes from the temporal type of a signature - #184

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/interp-from-signature-type
Oct 9, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/interp-from-signature-type

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A SQL signature carries in boundArgs the interpolation its wrapper derives from the temporal type
of the call where the call carries none: interp = temptype_supports_linear(temptype) ? LINEAR :
STEP, temptype the type the function returns (Tsequenceset_constructor_gaps) or the type of one
of its arguments (Temporal_append_tinstant), with the wrapper reading argument k instead only
when the call carries it. attach_type_derived_args of parser/boundargs.py reads the choice and
the source of the type in the wrapper, takes k from #_caller_index, and binds LINEAR or STEP on
each signature stating at most k arguments by the linear class the temporal types state, read
from temptype_supports_linear by attach_temporal_types, after which it runs; the wrappers are
traced as #merge_boundargs traces them.

Witness: on MEOS-API master f8f63bd over MobilityDB master a0480a7d38 no signature of
temporal_append_tinstant, trgeometry_append_tinstant, temporal_app_tinst_transfn or
tsequenceset_make_gaps binds interp, so a binding takes it for an argument appendInstant(tfloat,
tfloat) and tintSeqSetGaps(tint[], interval, float) do not carry, and the typed Spark and Flink
surfaces of JMEOS refuse 49 such signatures as arity:sql.

Measured over MobilityDB master a0480a7d38: run.py binds interp on 49 signatures, 17 to LINEAR and
32 to STEP, each the class of its temporal type: 21 of appendInstant, 20 of
appendInstantTransition and the 8 of the SeqSetGaps constructors without an interpolation;
every other key of every function equals that of master's parser. With JMEOS main's generator
both typed surfaces register 1162 SQL functions and 8802 overloads, against 1154 and 8754, the
refusals as arity:sql falling from 121 to 72. The suite passes 523 tests with none skipped, among
them the three of tests/test_boundargs.py TypeDerivedArgTests.

Why: a binding passes the interpolation the PostgreSQL function would, and the class of a
temporal type is the catalog's to state, not each binding's to derive.

…ignature

A SQL signature carries in boundArgs the interpolation its wrapper derives from the temporal type
of the call where the call carries none: interp = temptype_supports_linear(temptype) ? LINEAR :
STEP, temptype the type the function returns (Tsequenceset_constructor_gaps) or the type of one
of its arguments (Temporal_append_tinstant), with the wrapper reading argument k instead only
when the call carries it. attach_type_derived_args of parser/boundargs.py reads the choice and
the source of the type in the wrapper, takes k from #_caller_index, and binds LINEAR or STEP on
each signature stating at most k arguments by the linear class the temporal types state, read
from temptype_supports_linear by attach_temporal_types, after which it runs; the wrappers are
traced as #merge_boundargs traces them.

Witness: on MEOS-API master f8f63bd over MobilityDB master a0480a7d38 no signature of
temporal_append_tinstant, trgeometry_append_tinstant, temporal_app_tinst_transfn or
tsequenceset_make_gaps binds interp, so a binding takes it for an argument appendInstant(tfloat,
tfloat) and tintSeqSetGaps(tint[], interval, float) do not carry, and the typed Spark and Flink
surfaces of JMEOS refuse 49 such signatures as arity:sql.

Measured over MobilityDB master a0480a7d38: run.py binds interp on 49 signatures, 17 to LINEAR and
32 to STEP, each the class of its temporal type: 21 of appendInstant, 20 of
appendInstantTransition and the 8 of the <type>SeqSetGaps constructors without an interpolation;
every other key of every function equals that of master's parser. With JMEOS main's generator
both typed surfaces register 1162 SQL functions and 8802 overloads, against 1154 and 8754, the
refusals as arity:sql falling from 121 to 72. The suite passes 523 tests with none skipped, among
them the three of tests/test_boundargs.py TypeDerivedArgTests.

Why: a binding passes the interpolation the PostgreSQL function would, and the class of a
temporal type is the catalog's to state, not each binding's to derive.
@estebanzimanyi
estebanzimanyi merged commit 8818c00 into MobilityDB:master Oct 9, 2026
3 checks passed
@estebanzimanyi
estebanzimanyi deleted the catalog/interp-from-signature-type branch October 9, 2026 21:35
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