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

Function scatter_string_view_test

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

Source from the content-addressed store, hash-verified

566
567 #[test]
568 fn scatter_string_view_test() -> Result<()> {
569 let truthy = Arc::new(StringViewArray::from(vec![
570 "short",
571 "a longer string that exceeds inline",
572 ]));
573 let mask = BooleanArray::from(vec![false, true, true, false]);
574
575 let result = scatter(&mask, truthy.as_ref())?;
576 let result = result.as_any().downcast_ref::<StringViewArray>().unwrap();
577
578 assert_eq!(result.len(), 4);
579 assert!(result.is_null(0));
580 assert_eq!(result.value(1), "short");
581 assert_eq!(result.value(2), "a longer string that exceeds inline");
582 assert!(result.is_null(3));
583 Ok(())
584 }
585
586 #[test]
587 fn scatter_dictionary_test() -> Result<()> {

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
scatterFunction · 0.85
as_refMethod · 0.45
as_anyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…