Skip to content

Extract the MEOS-C → MobilityDB-C → SQL name chain from @csqlfn/@sqlfn/@sqlop tags#17

Open
estebanzimanyi wants to merge 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/sql-name-chain
Open

Extract the MEOS-C → MobilityDB-C → SQL name chain from @csqlfn/@sqlfn/@sqlop tags#17
estebanzimanyi wants to merge 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/sql-name-chain

Conversation

@estebanzimanyi
Copy link
Copy Markdown
Member

Summary

Adds parser/sqlnames.py, which derives every function's three names — MEOS-C library (tdistance_tnumber_number) → MobilityDB-C wrapper (Tdistance_tnumber_number) → SQL (tDistance + operator <->) — from the @csqlfn / @sqlfn / @sqlop Doxygen tags, and attaches mobilitydb / sql / sqlop to each IDL function in run.py. Resolves the chain for 1589 functions.

This makes the canonical SQL name of every MEOS function machine-derivable from one source of truth, so bindings translate names from the catalog instead of hand-maintaining per-binding name maps (the ecosystem naming policy).

How it works

  • Block-based pairing: each Doxygen block binds to the function immediately after it (avoids mis-associating a tag with a neighbouring function).
  • The tag sits on the binding-callable functions — the typed datum-hiding wrappers in *_meos.c (tdistance_tint_int, tdistance_tfloat_float, …) — not the core Datum-generic; both typed variants correctly resolve to the same SQL name.
  • setup.py now sparse-checks-out meos/src + mobilitydb/src (where the tags live).

Surfaced irregularity (see HANDOFF_sqlname_chain.md)

The extractor measures one irregularity class: 35 core Datum-generics carry a redundant @csqlfn the *_meos.c wrappers already hold. 31 are safe to de-tag; 4 need a typed wrapper first. The fix lands in MobilityDB source (handed off to that work). Verification gate: the "Datum-param functions carrying a SQL name" count should fall 35 → 4 → 0.

Tests

tests/test_sqlnames.py (3) — typed-wrappers-resolve / Datum-generic-does-not, IDL merge, missing-sources no-op. Full suite green (17).

…worklist

parser/sqlnames.py derives each function's three names from the
@csqlfn / @sqlfn / @sqlop Doxygen tags (MEOS-C library fn -> PG wrapper ->
SQL name + operator), block-paired so the tag binds to the function it
documents. Resolves the chain for 1589 functions.

HANDOFF_sqlname_chain.md reports, for the MobilityDB/MEOS session, the
@csqlfn irregularity it surfaces: 31 core Datum-generic functions carry a
redundant @csqlfn that the binding-callable *_meos.c typed wrappers already
hold (safe to de-tag), plus 4 that need a typed wrapper first. Rule: @csqlfn
belongs only on binding-callable functions, never the core Datum-generic.
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