Repository navigation
Publish the members of every type category the MEOS catalog states - #219
Merged
estebanzimanyi merged 1 commit intoOct 29, 2026
Merged
Conversation
`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.
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.
typeRelations.predicatesmaps 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 oftype == T_Xtests 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 thebool result = ...; return result;form reads as the plain one. A body doing anything else, anensure_*validator or an#elsealternative, 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_spantypereads floatspan, intspan and bigintspan,tnumber_typetfloat, tint and tbigint,timespan_typedatespan and tstzspan, andspatialset_typeholds 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 theensure_*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.