MCPcopy Create free account
hub / github.com/apache/datafusion / test_round_f64_one_input

Function test_round_f64_one_input

datafusion/functions/src/math/round.rs:813–826  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

811
812 #[test]
813 fn test_round_f64_one_input() {
814 let args: Vec<ArrayRef> = vec![
815 Arc::new(Float64Array::from(vec![125.2345, 12.345, 1.234, 0.1234])), // input
816 ];
817
818 let result = round_arrays(Arc::clone(&args[0]), None)
819 .expect("failed to initialize function round");
820 let floats =
821 as_float64_array(&result).expect("failed to initialize function round");
822
823 let expected = Float64Array::from(vec![125.0, 12.0, 1.0, 0.0]);
824
825 assert_eq!(floats, &expected);
826 }
827
828 #[test]
829 fn test_round_f32_cast_fail() {

Callers

nothing calls this directly

Calls 2

round_arraysFunction · 0.85
as_float64_arrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…