()
| 1178 | |
| 1179 | #[test] |
| 1180 | fn test_binary_view() { |
| 1181 | let values: Vec<Option<&[u8]>> = vec![ |
| 1182 | Some(b"foo"), |
| 1183 | None, |
| 1184 | Some(b"A longer string that is more than 12 bytes"), |
| 1185 | ]; |
| 1186 | |
| 1187 | let binary_view = |
| 1188 | BinaryViewArray::from_iter(std::iter::repeat(values.iter()).flatten().take(1000)); |
| 1189 | let batch = |
| 1190 | RecordBatch::try_from_iter(vec![("c0", Arc::new(binary_view) as ArrayRef)]).unwrap(); |
| 1191 | |
| 1192 | Test::new("coalesce_binary_view") |
| 1193 | .with_batch(batch.clone()) |
| 1194 | .with_batch(batch.clone()) |
| 1195 | .with_batch_size(512) |
| 1196 | .with_expected_output_sizes(vec![512, 512, 512, 464]) |
| 1197 | .run(); |
| 1198 | } |
| 1199 | |
| 1200 | #[derive(Debug, Clone, PartialEq)] |
| 1201 | struct ExpectedLayout { |
nothing calls this directly
no test coverage detected