Skip to content

State what a wrapper binds for each number of arguments its tests of PG_NARGS() decide - #188

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/arity-branch-binds
Oct 10, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/arity-branch-binds

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A wrapper can choose what it reads by any test of PG_NARGS(), and by the else of such a test:
Temporal_app_tinst_transfn starts maxdist from -1.0 and maxt from NULL and, under
if (PG_NARGS() > 3), reads maxt from argument 3 under if (PG_NARGS() == 4) and, in its else,
maxdist from argument 3 and maxt from argument 4. _guards of parser/boundargs.py states for each
statement the numbers of arguments it runs for: every conjunct testing PG_NARGS() with ==, !=,
<, <=, > or >= narrows them, the else of a test of PG_NARGS() alone runs for the others, nested
tests intersect, and comments are read as blanks. A local starting from a literal is that
literal for a signature of a number of arguments none of its later assignments runs for
(_guarded_default), and _caller_index reads, for a signature, only the assignments a call of its
number of arguments runs. appendInstantTransition(tbool, tbool, text, interval) therefore binds
maxdist to -1.0, and its argument 3 left to a NULL default passes NULL for maxt, where the
catalog stated no bind and paired argument 3 with maxdist.

The floor of .github/workflows/pytest.yml rises to 536, the suite collecting the two tests of
ArityBranchTests, which read the wrapper of Temporal_app_tinst_transfn.

Witness: over MEOS-API ffa1f6f the seven signatures appendInstantTransition(T, T, text,
interval) state no boundArgs, so a binding pairs their three SQL arguments after the state with
the four parameters interp, maxdist and maxt and finds no overload; tpcpoint's states
nullDefaultBinds {"3": {"maxdist": "-1.0"}} for its interval argument.

Measured over MobilityDB master 3a8e6dba09, run.py on upstream ffa1f6f and on this branch with
the same headers: the two catalogs differ in temporal_app_tinst_transfn alone, the seven
signatures of four arguments binding maxdist to -1.0, tpcpoint's argument 3 passing NULL for
maxt, and the nine of five arguments stating that argument 4 passes NULL for maxt. The suite
collects 536 tests, 451 passing and 85 skipped without a catalog in output/.

Why: a binding calls appendInstantAgg with an interpolation and a gap interval as PostgreSQL
does only when the catalog states the distance the wrapper passes for that call.

…PG_NARGS() decide

A wrapper can choose what it reads by any test of PG_NARGS(), and by the else of such a test:
Temporal_app_tinst_transfn starts maxdist from -1.0 and maxt from NULL and, under
if (PG_NARGS() > 3), reads maxt from argument 3 under if (PG_NARGS() == 4) and, in its else,
maxdist from argument 3 and maxt from argument 4. _guards of parser/boundargs.py states for each
statement the numbers of arguments it runs for: every conjunct testing PG_NARGS() with ==, !=,
<, <=, > or >= narrows them, the else of a test of PG_NARGS() alone runs for the others, nested
tests intersect, and comments are read as blanks. A local starting from a literal is that
literal for a signature of a number of arguments none of its later assignments runs for
(_guarded_default), and _caller_index reads, for a signature, only the assignments a call of its
number of arguments runs. appendInstantTransition(tbool, tbool, text, interval) therefore binds
maxdist to -1.0, and its argument 3 left to a NULL default passes NULL for maxt, where the
catalog stated no bind and paired argument 3 with maxdist.

The floor of .github/workflows/pytest.yml rises to 536, the suite collecting the two tests of
ArityBranchTests, which read the wrapper of Temporal_app_tinst_transfn.

Witness: over MEOS-API ffa1f6f the seven signatures appendInstantTransition(T, T, text,
interval) state no boundArgs, so a binding pairs their three SQL arguments after the state with
the four parameters interp, maxdist and maxt and finds no overload; tpcpoint's states
nullDefaultBinds {"3": {"maxdist": "-1.0"}} for its interval argument.

Measured over MobilityDB master 3a8e6dba09, run.py on upstream ffa1f6f and on this branch with
the same headers: the two catalogs differ in temporal_app_tinst_transfn alone, the seven
signatures of four arguments binding maxdist to -1.0, tpcpoint's argument 3 passing NULL for
maxt, and the nine of five arguments stating that argument 4 passes NULL for maxt. The suite
collects 536 tests, 451 passing and 85 skipped without a catalog in output/.

Why: a binding calls appendInstantAgg with an interpolation and a gap interval as PostgreSQL
does only when the catalog states the distance the wrapper passes for that call.
@estebanzimanyi
estebanzimanyi merged commit 4baf117 into MobilityDB:master Oct 10, 2026
3 checks passed
@estebanzimanyi
estebanzimanyi deleted the catalog/arity-branch-binds branch October 10, 2026 23:47
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