| 643 | // Test use of binary output type |
| 644 | #[test] |
| 645 | fn test_binary_set() { |
| 646 | let v: Vec<Option<&[u8]>> = vec![ |
| 647 | Some(b"a"), |
| 648 | Some(b"CXCCCCCCCCCCCCC"), |
| 649 | None, |
| 650 | Some(b"CXCCCCCCCCCCCCC"), |
| 651 | ]; |
| 652 | let values: ArrayRef = Arc::new(BinaryViewArray::from(v)); |
| 653 | |
| 654 | let expected: Vec<Option<&[u8]>> = |
| 655 | vec![Some(b"a"), Some(b"CXCCCCCCCCCCCCC"), None]; |
| 656 | let expected: ArrayRef = Arc::new(GenericByteViewArray::from(expected)); |
| 657 | |
| 658 | let mut set = ArrowBytesViewSet::new(OutputType::BinaryView); |
| 659 | set.insert(&values); |
| 660 | assert_eq!(&set.into_state(), &expected); |
| 661 | } |
| 662 | |
| 663 | // inserting strings into the set does not increase reported memory |
| 664 | #[test] |