Repository navigation
State a contiguous array of structs a function reads as an input array - #183
Merged
estebanzimanyi merged 1 commit intoOct 9, 2026
Conversation
shape.inputArrays also names a single-pointer parameter MEOS documents as an array followed by a by-value integer it documents as its number of elements: spanset_make(Span *spans, int count) reads count spans, as npointset_make(const Npoint *values, int count) and cbufferset_make(const Cbuffer *values, int count) read count values, where stbox_round(const STBox *box, int maxdd) reads one box. The C type cannot tell them apart and the @PARAM text can: attach_struct_input_arrays of parser/shapeinfer.py reads it through extract_param_docs of parser/nullable.py, the Doxygen #extract_nullable reads, and records the array with its length and its element as #_input_arrays records an array of pointers. An integer documented otherwise (Index in meos_array_get) is no length. _signature_fits of parser/sqlfn.py passes no SQL argument to the length of an input array, as to a bound parameter, so a SQL array fits the array by its element and attach_claims_fit leaves a signature on the claimant whose array it fits: Set_constructor's set(float[]) stays on floatset_make and leaves cbufferset_make. Witness: on MEOS-API master e84319b over MobilityDB master 2a1d52a7ee the catalog states no inputArrays for spanset_make, spanset_make_exp, spanset_make_free, npointset_make, cbufferset_make, stboxarr_round and geomval_arr_free, so a binding takes the count for an argument of its own and the typed Spark and Flink surfaces of JMEOS refuse spanset(<span>[]), set(npoint[]) and set(cbuffer[]) as arity:sql; and cbufferset_make carries the signature set(float[]) RETURNS floatset. Measured over MobilityDB master 2a1d52a7ee: run.py states inputArrays for those 7 functions, of 143 single-pointer struct parameters followed by an integer, and removes set(float[]) from cbufferset_make; every other key of every function equals that of master's parser. The suite passes 520 tests with none skipped, among them the three of tests/test_shapeinfer.py StructInputArrayTests and tests/test_claims_fit.py test_an_array_length_takes_no_argument, which fails with master's parser/sqlfn.py. Why: the catalog states what a function reads in a form every binding marshals, and the documentation of a parameter is where MEOS states that a pointer is the first of several values.
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.
shape.inputArrays also names a single-pointer parameter MEOS documents as an array followed by a
by-value integer it documents as its number of elements: spanset_make(Span *spans, int count)
reads count spans, as npointset_make(const Npoint *values, int count) and
cbufferset_make(const Cbuffer *values, int count) read count values, where stbox_round(const
STBox *box, int maxdd) reads one box. The C type cannot tell them apart and the @PARAM text can:
attach_struct_input_arrays of parser/shapeinfer.py reads it through extract_param_docs of
parser/nullable.py, the Doxygen #extract_nullable reads, and records the array with its length
and its element as #_input_arrays records an array of pointers. An integer documented otherwise
(Index in meos_array_get) is no length. _signature_fits of parser/sqlfn.py passes no SQL argument
to the length of an input array, as to a bound parameter, so a SQL array fits the array by its
element and attach_claims_fit leaves a signature on the claimant whose array it fits:
Set_constructor's set(float[]) stays on floatset_make and leaves cbufferset_make.
Witness: on MEOS-API master e84319b over MobilityDB master 2a1d52a7ee the catalog states no
inputArrays for spanset_make, spanset_make_exp, spanset_make_free, npointset_make,
cbufferset_make, stboxarr_round and geomval_arr_free, so a binding takes the count for an
argument of its own and the typed Spark and Flink surfaces of JMEOS refuse spanset([]),
set(npoint[]) and set(cbuffer[]) as arity:sql; and cbufferset_make carries the signature
set(float[]) RETURNS floatset.
Measured over MobilityDB master 2a1d52a7ee: run.py states inputArrays for those 7 functions, of
143 single-pointer struct parameters followed by an integer, and removes set(float[]) from
cbufferset_make; every other key of every function equals that of master's parser. The suite
passes 520 tests with none skipped, among them the three of tests/test_shapeinfer.py
StructInputArrayTests and tests/test_claims_fit.py test_an_array_length_takes_no_argument, which
fails with master's parser/sqlfn.py.
Why: the catalog states what a function reads in a form every binding marshals, and the
documentation of a parameter is where MEOS states that a pointer is the first of several values.