Skip to content

Classify the shared bbox-topological @sqlfn tags as backing-only#34

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/sqlfn-bbox-backing-only
Jul 9, 2026
Merged

Classify the shared bbox-topological @sqlfn tags as backing-only#34
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/sqlfn-bbox-backing-only

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

The five bounding-box topological operators (~= @> <@ -|- &&) are backed by a shared C @sqlfn tag named <op>_bboxsame_bbox, contains_bbox, contained_bbox, overlaps_bbox, adjacent_bbox. That tag is never emitted as a CREATE 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 @sqlfn in the sqlfn field, a binding that registers sqlfn verbatim exposes a same_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 — the sqlfn is 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 _bbox tag, with no per-binding logic.

The classification is grounded in two catalog-native facts, not a heuristic: the _bbox shared-backing convention and the operator to bareName map. It runs after both the @sqlfn map 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 @sqlfn is the deployed name) are untouched.

Tests added in tests/test_portable.py; full suite green (152 passed, 12 skipped).

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.
@estebanzimanyi estebanzimanyi merged commit ab65c9f into MobilityDB:master Jul 9, 2026
2 checks passed
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