Classify the shared bbox-topological @sqlfn tags as backing-only#34
Merged
estebanzimanyi merged 1 commit intoJul 9, 2026
Merged
Conversation
The five bounding-box topological operators (~= @> <@ -|- &&) are backed by a shared C @sqlfn tag named `<op>_bbox` (same_bbox, contains_bbox, contained_bbox, overlaps_bbox, adjacent_bbox). That tag is never deployed as a CREATE FUNCTION — the user-facing SQL name is the operator's bare portable alias (same, contains, contained, overlaps, adjacent). A binding that registers the raw sqlfn therefore exposes a function MobilityDB does not. Flag those records in the catalog with `sqlfnBackingOnly` and record the deployed `publicSqlName` (the bare alias), so every binding uniformly registers the bare name plus the operator and drops the `_bbox` backing tag, without any per-binding name-pattern special case. The classification is grounded in two catalog-native facts — the `_bbox` shared-backing convention and the operator-to-bareName map — and runs after both the @sqlfn map and the portable aliases are attached.
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.
The five bounding-box topological operators (
~=@><@-|-&&) are backed by a shared C@sqlfntag named<op>_bbox—same_bbox,contains_bbox,contained_bbox,overlaps_bbox,adjacent_bbox. That tag is never emitted as aCREATE FUNCTION: the user-facing SQL name MobilityDB deploys is the operator's bare portable alias (same,contains,contained,overlaps,adjacent).Because the catalog carries the raw
@sqlfnin thesqlfnfield, a binding that registerssqlfnverbatim exposes asame_bbox/contains_bbox/… function that MobilityDB does not — a surface divergence. Fixing that per binding would mean a name-pattern special case duplicated across every generator; the classification belongs in the catalog so all bindings inherit it.This attaches two fields to the affected function records:
sqlfnBackingOnly: true— thesqlfnis a backing tag, not a public SQL name.publicSqlName— the deployed bare name (the operator's portable alias).A binding then registers the bare name + operator and drops the
_bboxtag, with no per-binding logic.The classification is grounded in two catalog-native facts, not a heuristic: the
_bboxshared-backing convention and the operator to bareName map. It runs after both the@sqlfnmap and the portable aliases are attached. On the current catalog it flags exactly 55 records — the 5 operators by 11 signatures — each mapped to its bare name; positional/comparison operators (whose@sqlfnis the deployed name) are untouched.Tests added in
tests/test_portable.py; full suite green (152 passed, 12 skipped).