berkaysynnada commented on PR #16745: URL: https://github.com/apache/datafusion/pull/16745#issuecomment-3108840433
What you give as an example is correct but missing. In SQL "ORDER BY" produces a total order and distinguishes `-0.0` from `+0.0`. However, SQL comparisons follow IEEE 754 ordering semantics, so `-0.0 == 0.0` is `true`, and both `-0.0 < 0.0` and `-0.0 > 0.0` are `false`. So, for `ScalarValue`, `PartialOrd` should align with SQL’s comparison semantics (`-0.0 == 0.0`) and use `partial_cmp`. The total ordering used for "ORDER BY" can still rely on `total_cmp` explicitly, without leaking into `PartialOrd`. (now I see that SQL’s "ORDER BY" breaks ties based on bits) -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org