MCPcopy Create free account
hub / github.com/apache/arrow-rs / test_empty_offsets

Function test_empty_offsets

arrow-array/src/array/binary_array.rs:605–621  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

603
604 #[test]
605 fn test_empty_offsets() {
606 let string = BinaryArray::from(
607 ArrayData::builder(DataType::Binary)
608 .buffers(vec![Buffer::from(&[]), Buffer::from(&[])])
609 .build()
610 .unwrap(),
611 );
612 assert_eq!(string.value_offsets(), &[0]);
613 let string = LargeBinaryArray::from(
614 ArrayData::builder(DataType::LargeBinary)
615 .buffers(vec![Buffer::from(&[]), Buffer::from(&[])])
616 .build()
617 .unwrap(),
618 );
619 assert_eq!(string.len(), 0);
620 assert_eq!(string.value_offsets(), &[0]);
621 }
622
623 #[test]
624 fn test_to_from_string() {

Callers

nothing calls this directly

Calls 2

buildMethod · 0.45
buffersMethod · 0.45

Tested by

no test coverage detected