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

Function evaluate_groups

datafusion/functions-aggregate/src/string_agg.rs:797–804  ·  view source on GitHub ↗

Helper: evaluate and downcast to LargeStringArray

(
        acc: &mut StringAggGroupsAccumulator,
        emit_to: EmitTo,
    )

Source from the content-addressed store, hash-verified

795
796 /// Helper: evaluate and downcast to LargeStringArray
797 fn evaluate_groups(
798 acc: &mut StringAggGroupsAccumulator,
799 emit_to: EmitTo,
800 ) -> Vec<Option<String>> {
801 let result = acc.evaluate(emit_to).unwrap();
802 let arr = result.as_any().downcast_ref::<LargeStringArray>().unwrap();
803 arr.iter().map(|v| v.map(|s| s.to_string())).collect()
804 }
805
806 #[test]
807 fn groups_basic() -> Result<()> {

Callers 7

groups_basicFunction · 0.85
groups_with_nullsFunction · 0.85
groups_with_filterFunction · 0.85
groups_emit_firstFunction · 0.85
groups_merge_batchFunction · 0.85
groups_empty_groupsFunction · 0.85
groups_multiple_batchesFunction · 0.85

Calls 6

collectMethod · 0.80
evaluateMethod · 0.45
as_anyMethod · 0.45
mapMethod · 0.45
iterMethod · 0.45
to_stringMethod · 0.45

Tested by 7

groups_basicFunction · 0.68
groups_with_nullsFunction · 0.68
groups_with_filterFunction · 0.68
groups_emit_firstFunction · 0.68
groups_merge_batchFunction · 0.68
groups_empty_groupsFunction · 0.68
groups_multiple_batchesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…