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

Function test_run_array_eq_empty

arrow-array/src/array/run_array.rs:1411–1427  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1409
1410 #[test]
1411 fn test_run_array_eq_empty() {
1412 let run_ends = Int32Array::from(vec![2, 5, 10]);
1413 let values = StringArray::from(vec!["a", "b", "c"]);
1414 let array = RunArray::<Int32Type>::try_new(&run_ends, &values).unwrap();
1415
1416 let slice1 = array.slice(0, 0);
1417 let slice2 = array.slice(1, 0);
1418 let slice3 = array.slice(10, 0);
1419
1420 assert_eq!(slice1, slice2);
1421 assert_eq!(slice2, slice3);
1422
1423 let empty_array = new_empty_array(array.data_type());
1424 let empty_array = crate::cast::as_run_array::<Int32Type>(empty_array.as_ref());
1425
1426 assert_eq!(&slice1, empty_array);
1427 }
1428
1429 #[test]
1430 fn test_run_array_eq_diff_physical_same_logical() {

Callers

nothing calls this directly

Calls 5

try_newFunction · 0.85
new_empty_arrayFunction · 0.85
sliceMethod · 0.45
data_typeMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected