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

Function duplicates_distinct

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

Source from the content-addressed store, hash-verified

1254
1255 #[test]
1256 fn duplicates_distinct() -> Result<()> {
1257 let (mut acc1, mut acc2) = ArrayAggAccumulatorBuilder::string()
1258 .distinct()
1259 .build_two()?;
1260
1261 acc1.update_batch(&[data(["a", "b", "c"])])?;
1262 acc2.update_batch(&[data(["a", "b", "c"])])?;
1263 acc1 = merge(acc1, acc2)?;
1264
1265 let mut result = print_nulls(str_arr(acc1.evaluate()?)?);
1266 result.sort();
1267
1268 assert_eq!(result, vec!["a", "b", "c"]);
1269
1270 Ok(())
1271 }
1272
1273 #[test]
1274 fn duplicates_on_second_batch_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…