(
a: Datum<'a>,
temp_storage: &'a RowArena,
)
| 2906 | } |
| 2907 | |
| 2908 | fn jsonb_each_stringify<'a>( |
| 2909 | a: Datum<'a>, |
| 2910 | temp_storage: &'a RowArena, |
| 2911 | ) -> impl Iterator<Item = (Row, Diff)> + 'a { |
| 2912 | // First produce a map, so that a common iterator can be returned. |
| 2913 | let map = match a { |
| 2914 | Datum::Map(dict) => dict, |
| 2915 | _ => mz_repr::DatumMap::empty(), |
| 2916 | }; |
| 2917 | |
| 2918 | map.iter().map(move |(k, mut v)| { |
| 2919 | v = jsonb_stringify(v, temp_storage) |
| 2920 | .map(Datum::String) |
| 2921 | .unwrap_or(Datum::Null); |
| 2922 | (Row::pack_slice(&[Datum::String(k), v]), Diff::ONE) |
| 2923 | }) |
| 2924 | } |
| 2925 | |
| 2926 | fn jsonb_object_keys<'a>(a: Datum<'a>) -> impl Iterator<Item = (Row, Diff)> + 'a { |
| 2927 | let map = match a { |
no test coverage detected