Skip to content

Resolve the SQL name of wrapper-less MEOS functions from a direct sqlfn tag - #80

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/meos-direct-sqlfn
Aug 6, 2026
Merged

Resolve the SQL name of wrapper-less MEOS functions from a direct sqlfn tag#80
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/meos-direct-sqlfn

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

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.

@estebanzimanyi
estebanzimanyi merged commit 82d89a3 into MobilityDB:master Aug 6, 2026
2 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/meos-direct-sqlfn branch August 6, 2026 07:33
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