Skip to content

Read the arguments a wrapper gathers into a C array as one operand - #220

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/gathered-array-operand
Oct 29, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/gathered-array-operand

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A C wrapper gathering its trailing arguments into a local array, Pcpoint_make filling the
values of pcpoint_make with PG_GETARG_FLOAT8(i + 1) for i < count and count = PG_NARGS() - 1,
states a composition as a wrapper casting an argument does: attach_wrapper_compositions reads
the array of a signature of n arguments as a gather operand of the arguments 1 to n - 1 and
its count as the value n - 1 (#_gathers). pcpoint(integer, double precision, double
precision) is the composition {"operands": [{"arg": 0, "param": "pcid"}, {"gather": [1, 2],
"param": "values"}, {"value": "2", "param": "count"}], "call": "pcpoint_make"}, and
pcpoint(integer, double precision[]), whose wrapper passes its array as it is, keeps its
signature.

Witness: tests/test_compositions.py GatherCompositionTests, the wrappers and CREATE FUNCTION
statements of pcpoint as MobilityDB states them, fails its 2 tests on master and passes them
here.

Why: J15d of MobilityDB #2861, the coordinates the two pcpoint constructors gather, which the
typed JVM surfaces refuse while the catalog states their C call. JMEOS reads the operand from
JMEOS #206 on; its generator on main raises KeyError: 'arg' on it, so this change merges
after JMEOS #206.

Measured: over the headers MobilityDB master cce310aca2 installs, the catalog holds 361
compositions against 359, the two pcpoint signatures, which leave the sqlSignatures of
pcpoint_make; no other function, composition or section changes. The 594 tests pass, master's
592 and the 2 above.

A C wrapper gathering its trailing arguments into a local array, Pcpoint_make filling the
values of pcpoint_make with PG_GETARG_FLOAT8(i + 1) for i < count and count = PG_NARGS() - 1,
states a composition as a wrapper casting an argument does: attach_wrapper_compositions reads
the array of a signature of n arguments as a gather operand of the arguments 1 to n - 1 and
its count as the value n - 1 (#_gathers). pcpoint(integer, double precision, double
precision) is the composition {"operands": [{"arg": 0, "param": "pcid"}, {"gather": [1, 2],
"param": "values"}, {"value": "2", "param": "count"}], "call": "pcpoint_make"}, and
pcpoint(integer, double precision[]), whose wrapper passes its array as it is, keeps its
signature.

Witness: tests/test_compositions.py GatherCompositionTests, the wrappers and CREATE FUNCTION
statements of pcpoint as MobilityDB states them, fails its 2 tests on master and passes them
here.

Why: J15d of MobilityDB #2861, the coordinates the two pcpoint constructors gather, which the
typed JVM surfaces refuse while the catalog states their C call. JMEOS reads the operand from
JMEOS MobilityDB#206 on; its generator on main raises KeyError: 'arg' on it, so this change merges
after JMEOS MobilityDB#206.

Measured: over the headers MobilityDB master cce310aca2 installs, the catalog holds 361
compositions against 359, the two pcpoint signatures, which leave the sqlSignatures of
pcpoint_make; no other function, composition or section changes. The 594 tests pass, master's
592 and the 2 above.
@estebanzimanyi
estebanzimanyi merged commit 00c96a1 into MobilityDB:master Oct 29, 2026
3 checks passed
@estebanzimanyi
estebanzimanyi deleted the catalog/gathered-array-operand branch October 29, 2026 20:54
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