Return the type the catalog declares, not the operand's own - #350
Merged
estebanzimanyi merged 1 commit intoAug 28, 2026
Merged
Conversation
A Temporal->Temporal function answers the operand's own type only where the family is closed under the operation. MobilityDB declares centroid(tgeometry) as tgeompoint, centroid(tgeography) as tgeogpoint, minDistSimplify over a tgeography as tgeometry and over a tgeogpoint as tgeompoint, tDistance of two tints as tint, and the cell boundary as tgeography for H3 and tgeometry for quadbin, so each registration reads its return from the catalog signature carrying its own operand and arity. A shape the catalog describes with several overloads at that arity keeps the name heuristic. cellToBoundary registers with the rest of the cell-index surface, the return being what held it back. The hand centroid and minDistSimplify registrations over the three geo types state the operand's type as the return and duplicate the generated surface, which covers those types at the declared return.
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.
A Temporal->Temporal function answers the operand's own type only where the family is closed under the operation. MobilityDB declares centroid(tgeometry) as tgeompoint, centroid(tgeography) as tgeogpoint, minDistSimplify over a tgeography as tgeometry and over a tgeogpoint as tgeompoint, tDistance of two tints as tint, and the cell boundary as tgeography for H3 and tgeometry for quadbin, so each registration reads its return from the catalog signature carrying its own operand and arity. A shape the catalog describes with several overloads at that arity keeps the name heuristic. cellToBoundary registers with the rest of the cell-index surface, its return being what holds it back. The hand centroid and minDistSimplify registrations over the three geo types state the operand's type as the return and duplicate the generated surface, which covers those types at the declared return.
The registration set reads 5859 against 5857, six returns corrected and cellToBoundary added for both cell indexes, with nothing dropped. Nine assertions pin each corrected type; the class survives in a surface where no test asserts a return type.