Propagate wrapper-bound literals to per-base-type siblings#61
Merged
estebanzimanyi merged 1 commit intoJul 16, 2026
Merged
Conversation
A per-base-type accessor (tbool/tint/tfloat/ttext_value_at_timestamptz) shares
its PG wrapper (Temporal_value_at_timestamptz) with the generic function but is
never called by name — the wrapper calls the generic, which dispatches
internally. So only the generic received shape.boundArgs, while a binding that
dispatches to the typed sibling for a typed result (every binding does) saw no
bound literal and fell back to a wrong default (strict=false).
Group functions by the wrapper they share and apply the wrapper's bound literals
to every group member by parameter name, so each typed sibling carries
boundArgs={strict:true} too.
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.
Follow-on to #60. The
boundArgspass records a literal that a MobilityDB PG wrapper binds for a SQL-hidden input (e.g.Temporal_value_at_timestamptzbindsstricttotrue). Since #60 keys each function to its own wrapper body, and a base-type-generic wrapper calls only the GENERIC MEOS function by name (temporal_value_at_timestamptz), the per-base-type siblings the catalog collapses onto that same wrapper (tbool_/tint_/tfloat_/ttext_value_at_timestamptz) go unmatched and carry noboundArgs.A binding generator that dispatches to a typed sibling for a typed result then has no bound literal and emits the wrong default — MobilitySpark generates
valueAtTimestampasstrict=false, returning the value at an exclusive bound where MobilityDB semantics return NULL.This groups functions by the wrapper they share (
mdbC), reads the bound literals once from the wrapper body, and propagates them by parameter name to every group member that owns that parameter. Single-wrapper functions stay unchanged. The generic and all its per-type siblings carryboundArgs={strict:true}.tests/test_boundargs.pyadds a per-base-type sibling that shares the wrapper but is never called by name and asserts it inherits{strict:true}.