Skip to content

Register the spatial surface over the types the catalog declares - #352

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/tspatial-surface-from-catalog
Aug 28, 2026
Merged

Register the spatial surface over the types the catalog declares#352
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/tspatial-surface-from-catalog

Conversation

@estebanzimanyi

@estebanzimanyi estebanzimanyi commented Aug 28, 2026

Copy link
Copy Markdown
Member

Being a spatial temporal type makes a family eligible for the abstract tspatial_* surface; it does not mean MobilityDB publishes every tspatial_* kernel over it. The scope of that surface comes from each function's own sqlSignatures, falling back to the SPATIAL_ALLTYPES blanket only where the catalog states nothing. The restriction reads the tspatial_ prefix alone: the _tspatial_tspatial suffix names are the positional operators, carried by @sqlop with sparse signatures, and reading those as authoritative drops 132 working operator registrations.

The cell indexes are what a blanket gets wrong. MobilityDB declares asText over a cell temporal through the generic Temporal_as_text, and declares asEWKT, SRID, setSRID and transform over one nowhere; across all fourteen mobilitydb/sql/s2cell slices those four appear zero times. Bound instead to tspatial_as_text, tspatial_as_ewkt and tspatial_transform, whose own signatures list neither ts2cell nor tquadbin nor th3index, three of them answer "Unknown output function in WKT format for type: s2cell" from inside MEOS on a call MobilityDB never makes, while SRID and setSRID answer a value for surface MobilityDB does not publish. All three cell families carry this.

Twenty-nine registrations go and two arrive. The departures are those five kernels over the three cell families, plus asEWKT, setSRID and transform over tnpoint and asText and asEWKT over trgeometry, none of which MobilityDB declares. trgeometry keeps both under its own trgeometry_as_text, the kernel carrying the reference geometry it appends to the varlena, so asText answers POLYGON((1 1,2 2,3 1,1 1));Pose(POINT(1 1),0.5)@2000-01-01 rather than reaching one that drops the polygon. The arrivals are SRID over tpcpoint and tpcpatch, which the catalog declares and the blanket omits.

asText over a cell temporal is absent rather than wrong; reaching PostgreSQL's parity for it needs a public MEOS entry point for the generic temporal text output, which is its own change. test/sql/cell_index_spatial_surface.test covers the cell temporal rendering through its own text form, the five kernels staying absent across the families, trgeometry keeping its reference geometry, and SRID reaching the pointcloud temporals; the suite reports 2676 assertions in 102 test cases.

Being a spatial temporal type makes a family eligible for the abstract
tspatial_* surface; it does not mean MobilityDB publishes every tspatial_*
kernel over it. The generator applied that surface as a blanket over every
member of SPATIAL_ALLTYPES, which overrode the catalog's own word, so the
scope now comes from each function's sqlSignatures and falls back to the
blanket only where the catalog states nothing.

The cell indexes are what the blanket got wrong. MobilityDB declares asText
over a cell temporal through the generic Temporal_as_text and declares
asEWKT, SRID, setSRID and transform over one nowhere: across all fourteen
mobilitydb/sql/s2cell slices those four appear zero times. Bound to
tspatial_as_text, tspatial_as_ewkt and tspatial_transform, whose own
sqlSignatures list neither ts2cell nor tquadbin nor th3index, asText, asEWKT
and transform answered "Unknown output function in WKT format for type:
s2cell" and "Unknown transformation function for type: s2cell" — raised
inside MEOS on a call MobilityDB never makes — while SRID and setSRID
answered a value for surface MobilityDB does not publish. All three families
carry this, so it reaches ts2cell, tquadbin and th3index alike.

Twenty-nine registrations go, two arrive. The departures are those five
kernels over the three cell families, plus asEWKT, setSRID and transform over
tnpoint and asText and asEWKT over trgeometry, none of which MobilityDB
declares. trgeometry keeps both under its own trgeometry_as_text, the kernel
that carries the reference geometry it appends to the varlena, so
asText(trgeometry) answers POLYGON((1 1,2 2,3 1,1 1));Pose(POINT(1 1),0.5)@…
rather than reaching a kernel that would drop the polygon. The arrivals are
SRID over tpcpoint and tpcpatch, which the catalog declares and the blanket
omitted.

The restriction reads the tspatial_ prefix alone. The _tspatial_tspatial
suffix names are the positional operators, carried by @sqlop rather than
@sqlfn with sparse signatures, and reading those as authoritative drops 132
working operator registrations.

test/sql/cell_index_spatial_surface.test covers the cell temporal rendering
through its own text form, the five kernels staying absent across the
families, trgeometry keeping its reference geometry, and SRID reaching the
pointcloud temporals.
@estebanzimanyi
estebanzimanyi merged commit 5987399 into MobilityDB:main Aug 28, 2026
10 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/tspatial-surface-from-catalog branch August 28, 2026 20:51
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