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

Function no_duplicates_distinct

datafusion/functions-aggregate/src/array_agg.rs:1223–1238  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1221
1222 #[test]
1223 fn no_duplicates_distinct() -> Result<()> {
1224 let (mut acc1, mut acc2) = ArrayAggAccumulatorBuilder::string()
1225 .distinct()
1226 .build_two()?;
1227
1228 acc1.update_batch(&[data(["a", "b", "c"])])?;
1229 acc2.update_batch(&[data(["d", "e", "f"])])?;
1230 acc1 = merge(acc1, acc2)?;
1231
1232 let mut result = print_nulls(str_arr(acc1.evaluate()?)?);
1233 result.sort();
1234
1235 assert_eq!(result, vec!["a", "b", "c", "d", "e", "f"]);
1236
1237 Ok(())
1238 }
1239
1240 #[test]
1241 fn duplicates_no_distinct() -> Result<()> {

Callers

nothing calls this directly

Calls 9

print_nullsFunction · 0.85
str_arrFunction · 0.85
dataFunction · 0.70
mergeFunction · 0.70
build_twoMethod · 0.45
distinctMethod · 0.45
update_batchMethod · 0.45
evaluateMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…