findepi commented on PR #16745:
URL: https://github.com/apache/datafusion/pull/16745#issuecomment-3108568911

   The SQL ordering of float values clearly distinguishes between 0 and -0 and 
is a total ordering.
   
   ```
   $ cargo run --bin datafusion-cli
   > SELECT t, t::float AS f from (values ('1'), ('-1'), ('0'), ('-0'), ('0'), 
('-0'), ('Inf'), ('-Inf'), ('nan')) _(t) ORDER BY f;
   +------+------+
   | t    | f    |
   +------+------+
   | -Inf | -inf |
   | -1   | -1.0 |
   | -0   | -0.0 |
   | -0   | -0.0 |
   | 0    | 0.0  |
   | 0    | 0.0  |
   | 1    | 1.0  |
   | Inf  | inf  |
   | nan  | NaN  |
   +------+------+
   ```
   
   The ScalarValue comparison must match that done in SQL.
   The `next_up` and `next_down` should match that as well.
   


-- 
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

Reply via email to