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

Function groups_empty_groups

datafusion/functions-aggregate/src/string_agg.rs:912–930  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

910
911 #[test]
912 fn groups_empty_groups() -> Result<()> {
913 let mut acc = make_groups_acc(",");
914
915 // 4 groups total, but only groups 0 and 2 receive values
916 let values: ArrayRef = Arc::new(LargeStringArray::from(vec!["a", "b"]));
917 acc.update_batch(&[values], &[0, 2], None, 4)?;
918
919 let result = evaluate_groups(&mut acc, EmitTo::All);
920 assert_eq!(
921 result,
922 vec![
923 Some("a".to_string()),
924 None, // group 1: never received a value
925 Some("b".to_string()),
926 None, // group 3: never received a value
927 ]
928 );
929 Ok(())
930 }
931
932 #[test]
933 fn groups_multiple_batches() -> Result<()> {

Callers

nothing calls this directly

Calls 4

make_groups_accFunction · 0.85
newFunction · 0.85
evaluate_groupsFunction · 0.85
update_batchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…