Resolve the SQL name of wrapper-less MEOS functions from a direct sqlfn tag - #80
Merged
estebanzimanyi merged 1 commit intoAug 6, 2026
Conversation
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 surface whose PostgreSQL registration is deferred to a host extension has no PG wrapper to carry the @sqlfn tag — the h3index scalar functions defer to h3-pg (MobilityDB/MobilityDB#1669), so their @csqlfn chain resolves to nothing and the catalog loses their SQL names, which the bindings that generate the surface (Spark, Flink StreamSQL, NebulaStream) require.
parser/sqlfn.py now also reads a DIRECT @sqlfn tag on the MEOS function itself — one hop, mirroring the existing @csqlaggfn model. The map anchors on @sqlfn exactly as the wrapper-side scan does (an @sqlop-only block carries no SQL name and stays out on both sides), skips any block that carries @csqlfn (the two-hop chain keeps priority), and attach_sqlfn_map consults it only for functions the wrapper chain does not resolve — fill-only, never an override.
Against the MobilityDB tree with the companion tag change, the direct map resolves h3index_in/h3index_out/h3index_cmp/h3index_hash plus the three trgeometry nearestApproachInstant functions that carry a direct tag. Companion MobilityDB PR carries the tags. Unit tests cover the anchor rule, the @csqlfn skip, and the fill-only behaviour.