Skip to content

State the C parameters a wrapper fills from a two-dimensional array it takes - #221

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/two-dimensional-array-input
Oct 29, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/two-dimensional-array-input

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A SQL signature taking a two-dimensional array whose layout only its wrapper reads states it
as inputShape, as a signature returning one states arrayShape: for the position of each such
argument, the C array of its elements row by row (values), the parameters of its rows and
columns, of its number of elements (count) and of the C array true for its NULL elements
(nulls), or the value a NULL element passes where no such array is (nullElement). The
statements live in the inputs of meta/sql-columns.json beside the arrays, and one naming a
parameter the function lacks, an argument that is no array or a SQL name no signature takes
stops the catalog. setValues(raster, integer, integer, integer, float[], boolean[], boolean)
passes its values as the values, nodata, height, width and count of raster_set_values and its
flags as noset, nosetheight and nosetwidth, a NULL flag false.

Witness: tests/test_sqlfn_rows.py InputShapeTests, the arrays setValues takes and the three
statements that stop the catalog.

Why: J15d of MobilityDB #2861, setValues, which the typed JVM surfaces refuse: the catalog
states no SQL argument for the size of the block, its NULL elements or the flags, which
Raster_set_values reads from the two arrays. Decided by the owner on 2026-10-29, after
MobilityDB #3251 gave raster_set_values the flags as a block of their own.

Measured: over the headers MobilityDB master 96f10bdac8 installs, the catalog changes only in
raster_set_values, whose setValues signature states its inputShape; no other function,
composition or section changes. The 532 tests pass, master's 527 and the 5 above.

…t takes

A SQL signature taking a two-dimensional array whose layout only its wrapper reads states it
as inputShape, as a signature returning one states arrayShape: for the position of each such
argument, the C array of its elements row by row (values), the parameters of its rows and
columns, of its number of elements (count) and of the C array true for its NULL elements
(nulls), or the value a NULL element passes where no such array is (nullElement). The
statements live in the inputs of meta/sql-columns.json beside the arrays, and one naming a
parameter the function lacks, an argument that is no array or a SQL name no signature takes
stops the catalog. setValues(raster, integer, integer, integer, float[], boolean[], boolean)
passes its values as the values, nodata, height, width and count of raster_set_values and its
flags as noset, nosetheight and nosetwidth, a NULL flag false.

Witness: tests/test_sqlfn_rows.py InputShapeTests, the arrays setValues takes and the three
statements that stop the catalog.

Why: J15d of MobilityDB #2861, setValues, which the typed JVM surfaces refuse: the catalog
states no SQL argument for the size of the block, its NULL elements or the flags, which
Raster_set_values reads from the two arrays. Decided by the owner on 2026-10-29, after
MobilityDB #3251 gave raster_set_values the flags as a block of their own.

Measured: over the headers MobilityDB master 96f10bdac8 installs, the catalog changes only in
raster_set_values, whose setValues signature states its inputShape; no other function,
composition or section changes. The 532 tests pass, master's 527 and the 5 above.
@estebanzimanyi
estebanzimanyi merged commit d7ad19e into MobilityDB:master Oct 29, 2026
3 checks passed
@estebanzimanyi
estebanzimanyi deleted the catalog/two-dimensional-array-input branch October 29, 2026 22:59
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