Expand description
shared JSONB extraction helpers (used by each/array_elements and list_udfs)
Shared JSONB extraction helpers, used by both the jsonb_each / jsonb_array_elements
UDTFs and the list-returning scalar UDFs (jsonb_entries, jsonb_elements,
jsonb_path_elements).
These functions are pure — no DataFusion array/UDF plumbing — and return Ok(None) for a
“wrong shape” input (e.g. an object passed where an array is expected) rather than an error,
so callers can decide whether that should surface as NULL (the scalar UDFs) or as an error
(the UDTFs, which map Ok(None) back to their existing error text).
Functions§
- array_
elements - Array → elements.
Ok(None)if the input is not an array. - object_
or_ array_ entries - Object →
(field name, value); array →(index as string, value).Ok(None)if the input is a JSON scalar (neither an object nor an array). - path_
select_ all - All matches of a parsed JSONPath, as separate values — not wrapped in one JSONB array (that’s
select_array_by_path, used byjsonb_path_query). An empty result means zero matches, not an error.
Type Aliases§
- Entry
List (key, value)pairs, one per JSONB object field or array element.