Skip to content

Read from the catalog which arguments are arrays - #31

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/array-arguments-from-the-catalog
Sep 3, 2026
Merged

Read from the catalog which arguments are arrays#31
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/array-arguments-from-the-catalog

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

An array argument is one parameter to the caller and two to MEOS, the pointer
and its length, and the layer told them apart by the length's NAME. The surface
spells that length eight ways — count, count1, count2, size, ngeoms,
keys_len, path_len, pixels_size — so the rule reached the two it knew and
left the rest, and it had to exclude the receiver by hand because set_value_n
looks the same as an array beside its length.

shape.inputArrays names each array, the parameter its length comes from and
its element type, so the layer reads it and both problems go: a length is found
whatever it is called, and a receiver is no array because the catalog does not
say it is one. 14 methods more — Jsonb.ExistsArray, Jsonb.DeleteArray,
Geo.ClusterKmeans, Geo.ClusterWithin and their kin, whose lengths are
keys_len and ngeoms — 1246 methods against 1232, 49 deferred against 63.

Two tests take an array each: a geometry set built from an array of geometries,
and a jsonb asked which of an array of keys it holds, whose length MEOS calls
keys_len.

An array argument is one parameter to the caller and two to MEOS, the pointer
and its length, and the layer told them apart by the length's NAME. The surface
spells that length eight ways — `count`, `count1`, `count2`, `size`, `ngeoms`,
`keys_len`, `path_len`, `pixels_size` — so the rule reached the two it knew and
left the rest, and it had to exclude the receiver by hand because `set_value_n`
looks the same as an array beside its length.

`shape.inputArrays` names each array, the parameter its length comes from and
its element type, so the layer reads it and both problems go: a length is found
whatever it is called, and a receiver is no array because the catalog does not
say it is one. 14 methods more — `Jsonb.ExistsArray`, `Jsonb.DeleteArray`,
`Geo.ClusterKmeans`, `Geo.ClusterWithin` and their kin, whose lengths are
`keys_len` and `ngeoms` — 1246 methods against 1232, 49 deferred against 63.

Two tests take an array each: a geometry set built from an array of geometries,
and a jsonb asked which of an array of keys it holds, whose length MEOS calls
`keys_len`.
@estebanzimanyi
estebanzimanyi merged commit 970c35e into MobilityDB:main Sep 3, 2026
1 check passed
@estebanzimanyi
estebanzimanyi deleted the feat/array-arguments-from-the-catalog branch September 3, 2026 07:44
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