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

Function test_eq

arrow-array/src/array/byte_view_array.rs:1564–1586  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1562
1563 #[test]
1564 fn test_eq() {
1565 let test_data = [
1566 Some("longer than 12 bytes"),
1567 None,
1568 Some("short"),
1569 Some("again, this is longer than 12 bytes"),
1570 ];
1571
1572 let array1 = {
1573 let mut builder = StringViewBuilder::new().with_fixed_block_size(8);
1574 test_data.into_iter().for_each(|v| builder.append_option(v));
1575 builder.finish()
1576 };
1577 let array2 = {
1578 // create a new array with the same data but different layout
1579 let mut builder = StringViewBuilder::new().with_fixed_block_size(100);
1580 test_data.into_iter().for_each(|v| builder.append_option(v));
1581 builder.finish()
1582 };
1583 assert_eq!(array1, array1.clone());
1584 assert_eq!(array2, array2.clone());
1585 assert_eq!(array1, array2);
1586 }
1587
1588 /// Integration tests for `inline_key_fast` covering:
1589 ///

Callers

nothing calls this directly

Calls 4

with_fixed_block_sizeMethod · 0.80
into_iterMethod · 0.45
append_optionMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected