Asserts that the buffer layout of the specified StringViewArray matches the expected layout
(array: &StringViewArray, expected: Vec<ExpectedLayout>)
| 1205 | |
| 1206 | /// Asserts that the buffer layout of the specified StringViewArray matches the expected layout |
| 1207 | fn expect_buffer_layout(array: &StringViewArray, expected: Vec<ExpectedLayout>) { |
| 1208 | let actual = array |
| 1209 | .data_buffers() |
| 1210 | .iter() |
| 1211 | .map(|b| ExpectedLayout { |
| 1212 | len: b.len(), |
| 1213 | capacity: b.capacity(), |
| 1214 | }) |
| 1215 | .collect::<Vec<_>>(); |
| 1216 | |
| 1217 | assert_eq!( |
| 1218 | actual, expected, |
| 1219 | "Expected buffer layout {expected:#?} but got {actual:#?}" |
| 1220 | ); |
| 1221 | } |
| 1222 | |
| 1223 | /// Test for [`BatchCoalescer`] |
| 1224 | /// |