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

Function nullif_boolean

datafusion/functions/src/core/nullif.rs:226–240  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

224
225 #[test]
226 fn nullif_boolean() -> Result<()> {
227 let a = BooleanArray::from(vec![Some(true), Some(false), None]);
228 let a = ColumnarValue::Array(Arc::new(a));
229
230 let lit_array = ColumnarValue::Scalar(ScalarValue::Boolean(Some(false)));
231
232 let result = nullif_func(&[a, lit_array])?;
233 let result = result.into_array(0).expect("Failed to convert to array");
234
235 let expected =
236 Arc::new(BooleanArray::from(vec![Some(true), None, None])) as ArrayRef;
237
238 assert_eq!(expected.as_ref(), result.as_ref());
239 Ok(())
240 }
241
242 #[test]
243 fn nullif_string() -> Result<()> {

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
nullif_funcFunction · 0.85
into_arrayMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…