Skip to content

Lint relative-position name/@sqlfn mismatches#48

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/positional-sqlfn-lint
Jul 11, 2026
Merged

Lint relative-position name/@sqlfn mismatches#48
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/positional-sqlfn-lint

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A 1-D span or set reuses one MobilityDB-C position wrapper for both its value axis (left/right) and its time axis (before/after), and that wrapper carries a single @sqlfn. A time-axis MEOS-C function tagged @csqlfn #Left_span_value() therefore resolves to the value name left, and a binding emits left(tstzspan, ...) instead of before(tstzspan, ...).

lint_ea_sqlfn already catches the ever/always version of this copy-paste class. This adds the positional sibling lint_positional_sqlfn: flag any relative-position function whose name prefix (before_/left_/…) disagrees with its resolved @sqlfn, and report it from run.py alongside the existing guards.

The parser stays faithful — this only surfaces the source mistag so it can be fixed at the tag/wrapper source (see MobilityDB/MobilityDB#1371, which resolves the current 48 occurrences; this guard then keeps the count at 0).

A 1-D span or set reuses one MobilityDB-C position wrapper for both its value
axis (left/right) and its time axis (before/after), and that wrapper carries a
single @sqlfn. A time-axis MEOS-C function tagged @csqlfn #Left_span_value()
therefore resolves to the value name `left`, so a binding emits left(tstzspan,...)
instead of before(tstzspan,...). lint_ea_sqlfn catches the ever/always version of
this copy-paste class; add the positional sibling: flag any relative-position
function whose name prefix (before_/left_/...) disagrees with its resolved @sqlfn,
and report it from run.py alongside the existing guards. The parser stays faithful
— this only surfaces the source mistag.
@estebanzimanyi estebanzimanyi merged commit 37e5d4e into MobilityDB:master Jul 11, 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