Skip to content

Honor wrapper-bound literals in the generated UDF calls#41

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/generator-honors-boundargs
Jul 16, 2026
Merged

Honor wrapper-bound literals in the generated UDF calls#41
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/generator-honors-boundargs

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A SQL-hidden trailing parameter of a MEOS call gets a literal from the generator. The generic type default (false for a bool) diverges from the value the MobilityDB PG wrapper binds: valueAtTimestamp binds strict=true, so a generated UDF built on the default returns the value at an exclusive bound where MobilityDB semantics return NULL.

hidden_arg reads the value the wrapper binds from the catalog (shape.boundArgs, provided by the MEOS-API derivation) and emits THAT for the hidden param, falling back to the generic type default when the catalog records no bound value. _java_bound translates the C literal to its Java form (true/false, L-suffixed longs, (byte) for unsigned char), returning null for forms with no direct Java literal so the fallback applies. Both emission sites — emit_single and emit_dispatch — route their hidden args through it.

Depends on MEOS-API #61 for the per-base-type boundArgs the dispatch siblings read; the change is backward-compatible and keeps the generic default until that lands.

@estebanzimanyi
estebanzimanyi merged commit c81c948 into MobilityDB:main Jul 16, 2026
1 check 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