andygrove opened a new issue, #5702: URL: https://github.com/apache/datafusion-comet/issues/5702
### Describe the bug The signed-zero fixtures in the array SQL tests carry comments that contradict the tests around them, and would mislead anyone deciding whether to re-enable them. `spark/src/test/resources/sql-tests/expressions/array/array_distinct.sql:139`: ``` -- negative zero (literal). Spark's NormalizeFloatingNumbers rewrites -0.0 to 0.0 at -- analysis time, so both Spark and Comet collapse it and agree here. query ignore(https://issues.apache.org/jira/browse/SPARK-54918) SELECT array_distinct(array(0.0, double('-0.0'), 1.0)) ``` The comment says the two agree, but the query immediately below it is skipped precisely because they do not. `NormalizeFloatingNumbers` only rewrites grouping keys, join keys, window partition specs and `Distinct`; the optimized plan for a plain `SELECT` keeps the `-0.0` literal intact. The same "NormalizeFloatingNumbers only rewrites literals, not parquet columns" framing appears in `array_except.sql:77`, `array_intersect.sql:162` and `array_union.sql:149`. ### Steps to reproduce Read the fixtures, or run `SELECT array_distinct(array(0.0, double('-0.0'), 1.0))` and observe that the literal case diverges too. ### Expected behavior The comments describe what actually happens: the divergence is not limited to column-sourced values, and the literal case is skipped for the same reason. ### Additional context Depends on the behavior decision in the linked signed-zero issue; the comments should be corrected when the skips are resolved. Found while reviewing #5262. -- 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]
