mkleen opened a new pull request, #27618: URL: https://github.com/apache/datafusion/pull/27618
## Which issue does this PR close? - Part of #26138. ## Rationale for this change -0.0 and 0.0 are equal, so a query should give the same answer no matter which one is in the data. Today that often isn't the case, see #26138. This PR adds a fuzz test to find the cases we don't know about yet, as proposed in https://github.com/apache/datafusion/issues/26138#issuecomment-6497193637. ## What changes are included in this PR? A new float_zero fuzz suite in datafusion-fuzz. Each query runs on a table with some -0.0 values and on a copy where every -0.0 is replaced by 0.0. The results and column types must be the same, apart from how the zeros are printed. - The tables have a Float64, a Float32 and a Float16 column, plus a list of Float64. Each type has its own code paths, so all three are tested. - 39 queries cover sorting, window functions, aggregates, joins and expressions. Each runs under 16 settings: 1 or 4 partitions, batch size 1 or 8192, hash or sort-merge join, and zeros in the query written as 0.0 or -0.0. - 23 queries hit a known bug today. They are marked with the issue, and the test asks to remove the mark once the bug is fixed. - The fuzzer builds random tables of 8 to 128 rows from a few repeating values (0.0, -0.0, 1, -1, inf, NaN, NULL), runs random queries and settings on both copies, and stops after 10 seconds. A failure prints the seeds to reproduce it. - float_zero_fixed runs every query on the small table from the issue, where all known bugs show up. - float_zero_negative_literal checks that a -0.0 written in a query stays -0.0 in the plan. Only one NaN value is used until #26091 decides whether all NaNs are equal. One open question: a query with a known bug accepts any wrong answer, so a second bug in the same query would go unnoticed. I'd like to hear what reviewers think. ## What is the testing strategy for this PR? This PR only adds tests. They run with the extended_tests feature and take about 10 seconds on my local machine. ## Are there any user-facing changes? No. ## LLM-generated code disclosure This PR includes LLM-generated code and comments. All LLM-generated content has been manually reviewed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
