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

Function test_run_array_empty

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

Source from the content-addressed store, hash-verified

921
922 #[test]
923 fn test_run_array_empty() {
924 let runs = new_empty_array(&DataType::Int16);
925 let runs = runs.as_primitive::<Int16Type>();
926 let values = new_empty_array(&DataType::Int64);
927 let array = RunArray::try_new(runs, &values).unwrap();
928
929 fn assertions(array: &RunArray<Int16Type>) {
930 assert!(array.is_empty());
931 assert_eq!(array.get_start_physical_index(), 0);
932 assert_eq!(array.get_end_physical_index(), 0);
933 assert!(array.get_physical_indices::<i16>(&[]).unwrap().is_empty());
934 assert!(array.run_ends().is_empty());
935 assert_eq!(array.run_ends().sliced_values().count(), 0);
936 }
937
938 assertions(&array);
939 assertions(&array.slice(0, 0));
940 }
941
942 #[test]
943 fn test_run_array_fmt_debug() {

Callers

nothing calls this directly

Calls 4

new_empty_arrayFunction · 0.85
try_newFunction · 0.85
assertionsFunction · 0.85
sliceMethod · 0.45

Tested by

no test coverage detected