wkalt commented on issue #11108: URL: https://github.com/apache/datafusion/issues/11108#issuecomment-3837521660
Negative zero can result from ordinary multiplication operations, which means it is easy to encounter this bug in the course of common SQL analytics. This can result in incorrect query results, for example: ``` > create table x(a float, b float); 0 row(s) fetched. Elapsed 0.001 seconds. > insert into x values (-1.0, 0.0), (1.0, 1.0); +-------+ | count | +-------+ | 2 | +-------+ 1 row(s) fetched. Elapsed 0.001 seconds. > select * from x; +------+-----+ | a | b | +------+-----+ | -1.0 | 0.0 | | 1.0 | 1.0 | +------+-----+ 2 row(s) fetched. Elapsed 0.000 seconds. > select * from x where a * b >= 0; +-----+-----+ | a | b | +-----+-----+ | 1.0 | 1.0 | +-----+-----+ 1 row(s) fetched. Elapsed 0.001 seconds. ``` for that reason this seems like a severe bug to me. -- 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]
