Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(fuzzer): Reduce invalid or unsupported test cases in window fuzzer (
#11902) Summary: WindowFuzzer currently generate many invalid or unsupported test cases. When a test case is invalid, the execution throws in Velox and is not verified against the reference DB. Test cases unsupported by the ReferenceQueryRunner are also not verified against the reference DB. As the result, the test coverage becomes limited. This PR fixes WindowFuzzer to reduce the percentage of invalid and unsupported test cases. Specifically, this PR includes the following fixes and adjustments: 1. When generating partition-by and order-by keys, only use scalar types supported by the ReferenceQueryRunner. 2. Update the type of the row_number column to be INTEGER to match the type of the offset columns of K-Rows frames. 3. Avoid generating NULLs in the offset columns of K-Rows frames. 4. Fail the fuzzer test if less than 50% iterations are verified, either against reference DB or through custom verifiers. Before: ``` I20241217 15:10:26.897787 551721 WindowFuzzer.cpp:535] ==============================> Done with iteration 50 I20241217 15:10:26.942860 551721 AggregationFuzzerBase.cpp:615] Total functions tested: 24 I20241217 15:10:26.942891 551721 AggregationFuzzerBase.cpp:616] Total iterations requiring sorted inputs: 39 (76.47%) I20241217 15:10:26.942906 551721 AggregationFuzzerBase.cpp:618] Total iterations verified against reference DB: 1 (1.96%) I20241217 15:10:26.942916 551721 AggregationFuzzerBase.cpp:620] Total functions not verified (verification skipped / not supported by reference DB / reference DB failed): 22 (43.14%) / 15 (29.41%) / 0 (0.00%) I20241217 15:10:26.942926 551721 AggregationFuzzerBase.cpp:625] Total failed functions: 21 (41.18%) I20241217 15:10:26.942934 551721 WindowFuzzer.cpp:785] Total functions verified in reference DB: 1 ``` After: ``` I20241217 11:47:07.706315 227175 WindowFuzzer.cpp:537] ==============================> Done with iteration 20 I20241217 11:47:07.732537 227175 AggregationFuzzerBase.cpp:616] Total functions tested: 14 I20241217 11:47:07.732566 227175 AggregationFuzzerBase.cpp:617] Total iterations requiring sorted inputs: 16 (76.19%) I20241217 11:47:07.732582 227175 AggregationFuzzerBase.cpp:619] Total iterations verified against reference DB: 9 (42.86%) I20241217 11:47:07.732592 227175 AggregationFuzzerBase.cpp:621] Total functions not verified (verification skipped / not supported by reference DB / reference DB failed): 8 (38.10%) / 0 (0.00%) / 2 (9.52%) I20241217 11:47:07.732602 227175 AggregationFuzzerBase.cpp:626] Total failed functions: 3 (14.29%) I20241217 11:47:07.732610 227175 WindowFuzzer.cpp:788] Total functions verified in reference DB: 6 ``` Reviewed By: Yuhta Differential Revision: D67360981 Pulled By: kagamiori
- Loading branch information