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

Function test_cot_scalar_null

datafusion/functions/src/math/cot.rs:289–308  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

287
288 #[test]
289 fn test_cot_scalar_null() {
290 let arg_fields = vec![Field::new("a", DataType::Float64, true).into()];
291 let args = ScalarFunctionArgs {
292 args: vec![ColumnarValue::Scalar(ScalarValue::Float64(None))],
293 arg_fields,
294 number_rows: 1,
295 return_field: Field::new("f", DataType::Float64, true).into(),
296 config_options: Arc::new(ConfigOptions::default()),
297 };
298 let result = CotFunc::new()
299 .invoke_with_args(args)
300 .expect("cot null should succeed");
301
302 match result {
303 ColumnarValue::Scalar(scalar) => {
304 assert!(scalar.is_null());
305 }
306 _ => panic!("Expected scalar result"),
307 }
308 }
309
310 #[test]
311 fn test_cot_scalar_zero() {

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
intoMethod · 0.45
invoke_with_argsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…