ozankabak commented on code in PR #14699:
URL: https://github.com/apache/datafusion/pull/14699#discussion_r1966456466
##########
datafusion/expr-common/src/interval_arithmetic.rs:
##########
@@ -1119,11 +1180,11 @@ fn next_value_helper<const INC: bool>(value:
ScalarValue) -> ScalarValue {
match value {
// f32/f64::NEG_INF/INF and f32/f64::NaN values should not emerge at
this point.
Float32(Some(val)) => {
- assert!(val.is_finite(), "Non-standardized floating point usage");
+ debug_assert!(val.is_finite(), "Non-standardized floating point
usage");
Review Comment:
In general, I don't like to waste compute cycles on such impossibility
assertions in production builds when writing low-level code (like interval
arithmetic), which can run very frequently. On the other hand, in high-level
code that doesn't execute very often, using ordinary assertions is perfectly
fine.
--
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]