Skip to content

Commit 3f8858b

Browse files
authored
test: Add regression coverage for sort fuzzer failure apache#26990 (apache#27028)
> [!IMPORTANT] > > **Fork CI setup:** For pull requests from a fork to `main`, enable workflows in your fork's **Actions** tab before you push. > See the [fork CI setup guide](https://datafusion.apache.org/contributor-guide/#pull-requests-from-forks). ## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes apache#123` indicates that this PR will close issue apache#123. --> - Closes apache#26990 ## Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. Please explain the problem you are trying to solve in terms of the user-visible behavior, rather than the implementation. For example, "The code in `foo.rs` doesn't handle nulls" is a symptom of the implementation. "COUNT(DISTINCT) returns wrong results when the column contains nulls" is the user-visible problem. --> THe failure in apache#26990 has already fixed by - apache#26983 This PR adds regression test for it ## What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here, but it is sometimes worth providing a summary of the individual changes in this PR. --> The change is trivial, see diff ## What is the testing strategy for this PR? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code Briefly describe how this PR is tested, and point to the specific tests you added. For example: 'This new feature is covered by the `sqllogictest` cases added in `foo.slt`'. If this PR does not add tests, explain why. For example, if the change is already covered by existing tests, please mention it. You should also check the `codecov` bot reply on this PR to confirm the changed code is exercised. --> ## Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. If there are any breaking changes to public APIs, please add the `api change` label. -->
1 parent 39a66b1 commit 3f8858b

1 file changed

Lines changed: 29 additions & 22 deletions

File tree

‎datafusion/core/tests/fuzz_cases/sort_query_fuzz.rs‎

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -630,33 +630,40 @@ mod test {
630630

631631
/// The sort query fuzzer uses the current time as its seed for each run.
632632
/// This test replays seeds from previously failing cases.
633-
///
634-
/// Regressions:
635-
/// https://github.com/apache/datafusion/actions/runs/41196052207/job/124522323666
636633
#[tokio::test(flavor = "multi_thread")]
637634
async fn test_regression_sort_query_fuzz() {
638-
// Regression seeds
639-
let gen_seed = 1_793_445_468;
640-
641-
// Reproducing
642-
let mut test_generator = SortFuzzerTestGenerator::new(
643-
2000,
644-
3,
645-
"sort_fuzz_table".to_string(),
646-
get_supported_types_columns(gen_seed),
647-
false,
648-
gen_seed,
649-
);
650-
651-
test_generator
652-
.fuzzer_run(
635+
let seeds = [
636+
// https://github.com/apache/datafusion/actions/runs/41196052207/job/124522323666
637+
(
638+
1_793_445_468,
653639
17_320_197_313_368_524_478,
654640
16_774_755_103_655_697_964,
655641
1_568_822_825_954_225_201,
656-
true,
657-
)
658-
.await
659-
.unwrap();
642+
),
643+
// https://github.com/apache/datafusion/actions/runs/41115808909/job/124269616294
644+
(
645+
1_793_388_738,
646+
1_004_655_469_210_299_058,
647+
17_630_739_076_404_108_311,
648+
5_497_646_063_426_563_414,
649+
),
650+
];
651+
652+
for (gen_seed, dataset_seed, query_seed, config_seed) in seeds {
653+
let mut test_generator = SortFuzzerTestGenerator::new(
654+
2000,
655+
3,
656+
"sort_fuzz_table".to_string(),
657+
get_supported_types_columns(gen_seed),
658+
false,
659+
gen_seed,
660+
);
661+
662+
test_generator
663+
.fuzzer_run(dataset_seed, query_seed, config_seed, true)
664+
.await
665+
.unwrap();
666+
}
660667
}
661668

662669
/// Given the same seed, the result should be the same

0 commit comments

Comments
 (0)