Skip to content

Publish the members of every type category the MEOS catalog states - #219

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/type-predicates
Oct 29, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:catalog/type-predicates

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

typeRelations.predicates maps each membership predicate of meos_catalog.c to the types it admits, in MeosType order: the sets, spans and span sets of numbers and of times (numset_type, numspan_type, timespan_type, numspanset_type, timespanset_type, ...), the spans of a temporal box (tnumber_spantype, span_tbox_type), the alphanumeric, geo, spatial and point cloud sets, the temporal classes (tnumber_type, tspatial_type, tgeo_type, ...) and the base type categories. A predicate is read where its body returns a disjunction of type == T_X tests and of calls to other predicates, whose members it takes; a family guard (#if POINTCLOUD) admits its members, since the catalog describes the build with every family, and the bool result = ...; return result; form reads as the plain one. A body doing anything else, an ensure_* validator or an #else alternative, states no one membership and is left out. The type registry published beside it, typeRelations.byBase, comes from the same file, so a binding reads which types a category holds where MEOS states it rather than keeping a list of its own.

Witness: over MobilityDB master, tnumber_spantype reads floatspan, intspan and bigintspan, tnumber_type tfloat, tint and tbigint, timespan_type datespan and tstzspan, and spatialset_type holds pcpointset and pcpatchset behind their #if POINTCLOUD.

Measured: meos_catalog.c on MobilityDB master declares 68 bool <name>(MeosType type) functions; the 47 membership predicates are published and the 21 left out are exactly the ensure_* validators. tests/test_typerelations.py gains four hermetic cases (a literal list in MeosType order, a predicate calling another, a family guard, the left-out forms) and a live one over MobilityDB's tree, 13 of 13 passing; over MEOS-API master ddcf527 the whole suite reads 604 passed, the three tests failing in a local run (test_family's representative symbols and two of test_struct_layout) failing as well without the change.

Why: which types are numbers, times, the spans of a temporal box or the spatial temporal types is a fact MEOS states in its catalog, and a binding that lists them again drifts from it: MobilityDuck's generator keeps the temporal numbers as tint and tfloat and leaves tbigint out.

`typeRelations.predicates` maps each membership predicate of meos_catalog.c to the types it admits, in MeosType order: the sets, spans and span sets of numbers and of times (`numset_type`, `numspan_type`, `timespan_type`, `numspanset_type`, `timespanset_type`, ...), the spans of a temporal box (`tnumber_spantype`, `span_tbox_type`), the alphanumeric, geo, spatial and point cloud sets, the temporal classes (`tnumber_type`, `tspatial_type`, `tgeo_type`, ...) and the base type categories. A predicate is read where its body returns a disjunction of `type == T_X` tests and of calls to other predicates, whose members it takes; a family guard (`#if POINTCLOUD`) admits its members, since the catalog describes the build with every family, and the `bool result = ...; return result;` form reads as the plain one. A body doing anything else, an `ensure_*` validator or an `#else` alternative, states no one membership and is left out. The type registry published beside it, `typeRelations.byBase`, comes from the same file, so a binding reads which types a category holds where MEOS states it rather than keeping a list of its own.

Witness: over MobilityDB master, `tnumber_spantype` reads floatspan, intspan and bigintspan, `tnumber_type` tfloat, tint and tbigint, `timespan_type` datespan and tstzspan, and `spatialset_type` holds pcpointset and pcpatchset behind their `#if POINTCLOUD`.

Measured: meos_catalog.c on MobilityDB master declares 68 `bool <name>(MeosType type)` functions; the 47 membership predicates are published and the 21 left out are exactly the `ensure_*` validators. tests/test_typerelations.py gains four hermetic cases (a literal list in MeosType order, a predicate calling another, a family guard, the left-out forms) and a live one over MobilityDB's tree, 13 of 13 passing; over MEOS-API master ddcf527 the whole suite reads 604 passed, the three tests failing in a local run (test_family's representative symbols and two of test_struct_layout) failing as well without the change.

Why: which types are numbers, times, the spans of a temporal box or the spatial temporal types is a fact MEOS states in its catalog, and a binding that lists them again drifts from it: MobilityDuck's generator keeps the temporal numbers as tint and tfloat and leaves tbigint out.
@estebanzimanyi
estebanzimanyi merged commit cfb4636 into MobilityDB:master Oct 29, 2026
3 checks passed
@estebanzimanyi
estebanzimanyi deleted the catalog/type-predicates branch October 29, 2026 18: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