Generate the JSON-path query UDFs#33
Merged
estebanzimanyi merged 1 commit intoJul 9, 2026
Merged
Conversation
Add a JsonPath marshalling rule (jsonpath_in / jsonpath_out) to the UDF generator, the sibling of the existing Jsonb rule. It reaches the JSON-path query surface the generator previously excluded for want of a JsonPath argument marshalling: jsonb_path_exists / match / query_array / query_first, their jsonbset_* and tjsonb_* counterparts, and jsonpath_in / out / copy (15 UDFs). Cover the surface with a GeneratedSurfaceTest case that runs jsonb_path_exists through the generated jsonpath_in parse.
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.
Add a
JsonPathmarshalling rule (jsonpath_in/jsonpath_out) to the UDF generator, the sibling of the existingJsonbrule. It reaches the JSON-path query surface — the family of functions whose only unmarshalled argument isJsonPath:jsonb_path_exists/jsonb_path_match/jsonb_path_query_array/jsonb_path_query_firstjsonbset_*(set) andtjsonb_*(temporal) counterpartsjsonpath_in/jsonpath_out/jsonpath_copy15 UDFs in total; the 1:1 generated surface grows by 15 (to 2788). The change is two dictionary entries: every other argument and return type of these functions is already marshalled, so the
JsonPathargument is the only addition.A
GeneratedSurfaceTestcase runsjsonb_path_existsthrough the generatedjsonpath_inparse (a present path returns 1, an absent one 0), covering the new marshalling against libmeos. The JSON family is on in the CI libmeos by default (option(JSON ... ON)), so no build change is required.