Register the spatial surface over the types the catalog declares - #352
Merged
estebanzimanyi merged 1 commit intoAug 28, 2026
Merged
Conversation
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.
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.
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.