()
| 215 | |
| 216 | #[test] |
| 217 | fn test_offset_buffer_append() { |
| 218 | let mut buffer = OffsetBuffer::<i64>::with_capacity(0); |
| 219 | buffer.try_push("hello".as_bytes(), true).unwrap(); |
| 220 | buffer.try_push("bar".as_bytes(), true).unwrap(); |
| 221 | buffer |
| 222 | .extend_from_dictionary(&[1, 3, 0, 2], &[0, 2, 4, 5, 6], "abcdef".as_bytes()) |
| 223 | .unwrap(); |
| 224 | |
| 225 | let array = buffer.into_array(None, ArrowType::LargeUtf8); |
| 226 | let strings = array.as_any().downcast_ref::<LargeStringArray>().unwrap(); |
| 227 | assert_eq!( |
| 228 | strings.iter().map(|x| x.unwrap()).collect::<Vec<_>>(), |
| 229 | vec!["hello", "bar", "cd", "f", "ab", "e"] |
| 230 | ) |
| 231 | } |
| 232 | |
| 233 | #[test] |
| 234 | fn test_offset_buffer() { |
nothing calls this directly
no test coverage detected