ozankabak commented on code in PR #7793:
URL: https://github.com/apache/arrow-datafusion/pull/7793#discussion_r1359346687
##########
datafusion/physical-expr/src/intervals/interval_aritmetic.rs:
##########
@@ -1730,20 +1757,23 @@ mod tests {
),
];
for interval in intervals {
- assert_eq!(interval.cardinality()?, distinct_f32);
+ assert_eq!(interval.cardinality()?.unwrap(), distinct_f32);
}
+ // If the floating numbers has showned a homogeneous distribution
pattern, the result would to be
Review Comment:
What @berkaysynnada is trying to say here is that the regular logarithmic
distribution of floating-point numbers is only applicable outside of the
`(-phi, phi)` interval where `phi` denotes the largest positive subnormal
floating point number. In the latter interval, IEEE 754 floats are linearly
distributed. So his quick back-of-the-envelope formula used to expect test
results are not valid in ranges containing zero. Therefore, he manually
supplies the actual expected cardinality.
--
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]