Skip to content

Commit

Permalink
Improve aggregation fuzz coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Oct 14, 2024
1 parent 5391c98 commit 708bf74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion datafusion/core/tests/fuzz_cases/aggregate_fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ use crate::fuzz_cases::aggregation_fuzzer::{
// TODO: write more test case to cover more `group by`s and `aggregation function`s
// TODO: maybe we can use macro to simply the case creating

// Dimensions to test:
// Aggregation functions:
// Arguments type to aggregation functions
// Group by columns:

/// Fuzz test for `basic prim aggr(sum/sum distinct/max/min/count/avg)` + `no group by`
#[tokio::test(flavor = "multi_thread")]
async fn test_basic_prim_aggr_no_group() {
Expand Down Expand Up @@ -353,7 +358,7 @@ async fn streaming_aggregate_test() {
vec!["d", "c", "a"],
vec!["d", "c", "b", "a"],
];
let n = 300;
let n = 10;
let distincts = vec![10, 20];
for distinct in distincts {
let mut join_set = JoinSet::new();
Expand Down
2 changes: 1 addition & 1 deletion test-utils/src/string_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl StringBatchGenerator {
let mut cases = vec![];
let mut rng = thread_rng();
for null_pct in [0.0, 0.01, 0.1, 0.5] {
for _ in 0..100 {
for _ in 0..10 {
// max length of generated strings
let max_len = rng.gen_range(1..50);
let num_strings = rng.gen_range(1..100);
Expand Down

0 comments on commit 708bf74

Please sign in to comment.