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

Function scatter_int

datafusion/physical-expr-common/src/utils.rs:438–450  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

436
437 #[test]
438 fn scatter_int() -> Result<()> {
439 let truthy = Arc::new(Int32Array::from(vec![1, 10, 11, 100]));
440 let mask = BooleanArray::from(vec![true, true, false, false, true]);
441
442 // the output array is expected to be the same length as the mask array
443 let expected =
444 Int32Array::from_iter(vec![Some(1), Some(10), None, None, Some(11)]);
445 let result = scatter(&mask, truthy.as_ref())?;
446 let result = as_int32_array(&result)?;
447
448 assert_eq!(&expected, result);
449 Ok(())
450 }
451
452 #[test]
453 fn scatter_int_end_with_false() -> Result<()> {

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
scatterFunction · 0.85
as_int32_arrayFunction · 0.85
as_refMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…