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

Function duplicates_distinct

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

Source from the content-addressed store, hash-verified

594
595 #[test]
596 fn duplicates_distinct() -> Result<()> {
597 let (mut acc1, mut acc2) = StringAggAccumulatorBuilder::new(",")
598 .distinct()
599 .build_two()?;
600
601 acc1.update_batch(&[data(["a", "b", "c"]), data([","])])?;
602 acc2.update_batch(&[data(["a", "b", "c"]), data([","])])?;
603 acc1 = merge(acc1, acc2)?;
604
605 let result = some_str_sorted(acc1.evaluate()?, ",");
606
607 assert_eq!(result, "a,b,c");
608
609 Ok(())
610 }
611
612 #[test]
613 fn no_duplicates_distinct_sort_asc() -> Result<()> {

Callers

nothing calls this directly

Calls 8

newFunction · 0.85
some_str_sortedFunction · 0.85
dataFunction · 0.70
mergeFunction · 0.70
build_twoMethod · 0.45
distinctMethod · 0.45
update_batchMethod · 0.45
evaluateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…