Skip to content

Read the fields of a returned struct a row names, and no other - #195

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/row-reads-named-fields
Oct 15, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/row-reads-named-fields

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A column statement of meta/sql-columns.json may name the field of the returned struct feeding
its column, and a row naming fields reads those only. valueCount and valuePercent, which
MobilityDB declares over raster_value_count, read one ValueCount per row: valueCount its value
and its count, valuePercent its value and its percent. Both state their two fields.

Witness: tests/test_sqlfn_rows.py builds the rows of both functions over a ValueCount; without
the statement the field no column reads stops the catalog, with it each column reads its field,
and a statement naming a field the struct lacks stops the catalog.

Measured: over MobilityDB 25fe9147ab the catalog run fails on master ("SQL rows with a column
MEOS states no source for", the six record forms of the two functions) and completes here, the
six forms reading value and count or value and percent. Over MobilityDB f935759e00 the catalog
is byte-identical to master's. The suite fails three tests it also fails on master at the same
commit (test_representative_symbols_land_in_their_family and two struct layout tests), and no
other.

Why: a ValueCount holds three fields and each row reads two, so the field a row leaves unread
fed no column and stopped every catalog derived from MobilityDB master.

A column statement of meta/sql-columns.json may name the field of the returned struct feeding
its column, and a row naming fields reads those only. valueCount and valuePercent, which
MobilityDB declares over raster_value_count, read one ValueCount per row: valueCount its value
and its count, valuePercent its value and its percent. Both state their two fields.

Witness: tests/test_sqlfn_rows.py builds the rows of both functions over a ValueCount; without
the statement the field no column reads stops the catalog, with it each column reads its field,
and a statement naming a field the struct lacks stops the catalog.

Measured: over MobilityDB 25fe9147ab the catalog run fails on master ("SQL rows with a column
MEOS states no source for", the six record forms of the two functions) and completes here, the
six forms reading value and count or value and percent. Over MobilityDB f935759e00 the catalog
is byte-identical to master's. The suite fails three tests it also fails on master at the same
commit (test_representative_symbols_land_in_their_family and two struct layout tests), and no
other.

Why: a ValueCount holds three fields and each row reads two, so the field a row leaves unread
fed no column and stopped every catalog derived from MobilityDB master.
@estebanzimanyi
estebanzimanyi merged commit 4b82957 into MobilityDB:master Oct 15, 2026
3 checks passed
@estebanzimanyi
estebanzimanyi deleted the catalog/row-reads-named-fields branch October 15, 2026 08:21
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