Repository navigation
State what a wrapper binds for each number of arguments its tests of PG_NARGS() decide - #188
Merged
estebanzimanyi merged 1 commit intoOct 10, 2026
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.