MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / unnest_array

Function unnest_array

src/expr/src/relation/func.rs:3147–3152  ·  view source on GitHub ↗
(a: Datum<'a>)

Source from the content-addressed store, hash-verified

3145}
3146
3147fn unnest_array<'a>(a: Datum<'a>) -> impl Iterator<Item = (Row, Diff)> + 'a {
3148 a.unwrap_array()
3149 .elements()
3150 .iter()
3151 .map(move |e| (Row::pack_slice(&[e]), Diff::ONE))
3152}
3153
3154fn unnest_list<'a>(a: Datum<'a>) -> impl Iterator<Item = (Row, Diff)> + 'a {
3155 a.unwrap_list()

Callers 1

evalMethod · 0.85

Calls 4

elementsMethod · 0.80
unwrap_arrayMethod · 0.80
mapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected