You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "ding-young (via GitHub)" <gi...@apache.org> on 2025/07/08 10:33:42 UTC
[I] Replace π-related bound constants with `next_up` / `next_down` [datafusion]
ding-young opened a new issue, #16712:
URL: https://github.com/apache/datafusion/issues/16712
### Background
Rust 1.86 stabilized [f64::{next_up, next_down}](https://doc.rust-lang.org/std/primitive.f64.html#method.next_up) and [f32::{next_down, next_up}](https://doc.rust-lang.org/std/primitive.f32.html#method.next_up), so we can now replace several hardcoded floating-point constants using these methods. Replacing manually defined constants with std library can improve clarity and correctness.
See several functions starting from
https://github.com/apache/datafusion/blob/a089eff251f13ac52ba070dbdf67cc20d7851662/datafusion/common/src/scalar/mod.rs#L1191-L1202
and https://github.com/apache/datafusion/blob/main/datafusion/common/src/scalar/consts.rs
### Solution
1. Update related functions in `datafusion/common/src/scalar/mod.rs`
2. Verify that the updated values match the current constants, or document any small differences that arise due to precision changes.
I think this is a good first issue :)
The TODO comment is originally added in https://github.com/apache/datafusion/pull/11584
--
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-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Replace π-related bound constants with `next_up` / `next_down` [datafusion]
Posted by "rthummaluru (via GitHub)" <gi...@apache.org>.
rthummaluru commented on issue #16712:
URL: https://github.com/apache/datafusion/issues/16712#issuecomment-3090726399
Just submitted the PR, please let me know if there's anything that needs to be changed or corrected. Thank you!
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Replace π-related bound constants with `next_up` / `next_down` [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #16712: Replace π-related bound constants with `next_up` / `next_down`
URL: https://github.com/apache/datafusion/issues/16712
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Replace π-related bound constants with `next_up` / `next_down` [datafusion]
Posted by "rthummaluru (via GitHub)" <gi...@apache.org>.
rthummaluru commented on issue #16712:
URL: https://github.com/apache/datafusion/issues/16712#issuecomment-3055059226
Hi everyone! 👋 This will be my first open-source contribution, and I’m super excited to get involved with DataFusion :) I’d like to take on this issue and will start setting up my local environment today. Please let me know if there’s anything specific I should keep in mind as a first-time contributor!
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Replace π-related bound constants with `next_up` / `next_down` [datafusion]
Posted by "rthummaluru (via GitHub)" <gi...@apache.org>.
rthummaluru commented on issue #16712:
URL: https://github.com/apache/datafusion/issues/16712#issuecomment-3055057271
take
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org