Skip to content

State the element of an array of each SQL scalar: its C type and its text codec - #285

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/sqltypes-scalars
Nov 20, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/sqltypes-scalars

Conversation

@estebanzimanyi

@estebanzimanyi estebanzimanyi commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

sqlTypes states, on each SQL scalar whose array a signature passes or answers, the element of that array: the C type it is laid in, the element the catalog's shape.inputArrays and shape.arrayReturn state opposite the array (integer[] an int array, text[] a text * array, a Datum being no element type), and its text codec, the one typeEncodings states for it (TimestampTz, DateADT), else the one public reader and the one public writer of that C type among the io functions of the core family, their trailing inputs defaulted as _aux_specs defaults those of an in/out helper (float8_out with its maxdd). int is read as int32_t, which it is on every platform MEOS builds on. The fields every other entry states are unchanged.

Why: a binding passing or answering an array of integers, booleans, numbers, dates, timestamps or texts read each element through a reader and a writer it named by hand (JMEOS's SQL_ARRAY_SCALAR), or, in MobilityNebula, which states no MEOS fact by hand, could not read the array at all.

Witness: over the catalog of MobilityDB 8e99a344e6, the elements of integer (int: int32_in, int32_out), bigint (int64_t), boolean (bool), float and double precision (double: float8_in, float8_out with maxdd 15), date (DateADT), timestamptz (TimestampTz: timestamptz_in with typmod -1) and text (text *: text_in, text_out); json_in, also answering a text, is of the JSON family, and geo_typename, also writing an int, of category transformation. tests/test_sqltypes.py: 14 tests; the suite runs 753.

…text codec

sqlTypes states, on each SQL scalar whose array a signature passes or answers, the element of that array: the C type it is laid in, the element the catalog's shape.inputArrays and shape.arrayReturn state opposite the array (integer[] an int array, text[] a text * array, a Datum being no element type), and its text codec, the one typeEncodings states for it (TimestampTz, DateADT), else the one public reader and the one public writer of that C type among the io functions of the core family, their trailing inputs defaulted as _aux_specs defaults those of an in/out helper (float8_out with its maxdd). int is read as int32_t, which it is on every platform MEOS builds on. The fields every other entry states are unchanged.

Why: a binding passing or answering an array of integers, booleans, numbers, dates, timestamps or texts read each element through a reader and a writer it named by hand (JMEOS's SQL_ARRAY_SCALAR), or, in MobilityNebula, which states no MEOS fact by hand, could not read the array at all.

Witness: over the catalog of MobilityDB 8e99a344e6, the elements of integer (int: int32_in, int32_out), bigint (int64_t), boolean (bool), float and double precision (double: float8_in, float8_out with maxdd 15), date (DateADT), timestamptz (TimestampTz: timestamptz_in with typmod -1) and text (text *: text_in, text_out); json_in, also answering a text, is of the JSON family, and geo_typename, also writing an int, of category transformation. tests/test_sqltypes.py: 14 tests; the suite runs 753.
@estebanzimanyi
estebanzimanyi marked this pull request as ready for review November 20, 2026 22:51
@estebanzimanyi
estebanzimanyi merged commit 59f9c30 into MobilityDB:master Nov 20, 2026
3 checks passed
@estebanzimanyi
estebanzimanyi deleted the feat/sqltypes-scalars branch November 20, 2026 22:53
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