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

Function test_run_array_roundtrip

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

Source from the content-addressed store, hash-verified

1510
1511 #[test]
1512 fn test_run_array_roundtrip() {
1513 let run = Int32Array::from(vec![3, 6, 9, 12]);
1514 let values = Int32Array::from(vec![Some(0), None, Some(1), None]);
1515 let array = RunArray::try_new(&run, &values).unwrap();
1516
1517 let (dt, buffer, values) = array.clone().into_parts();
1518 let created_from_parts =
1519 unsafe { RunArray::<Int32Type>::new_unchecked(dt, buffer, values) };
1520 assert_eq!(array, created_from_parts);
1521 }
1522}

Callers

nothing calls this directly

Calls 3

try_newFunction · 0.85
into_partsMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected