MCPcopy Create free account
hub / github.com/apache/datafusion / test_binary_set

Function test_binary_set

datafusion/physical-expr-common/src/binary_view_map.rs:645–661  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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]

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…