You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/10/20 16:06:27 UTC
Re: [PR] Minor: Fix bug in `AND` interval analysis tests (not code), and add more coverage [arrow-datafusion]
alamb commented on code in PR #7886:
URL: https://github.com/apache/arrow-datafusion/pull/7886#discussion_r1367197479
##########
datafusion/physical-expr/src/intervals/interval_aritmetic.rs:
##########
@@ -1221,21 +1221,29 @@ mod tests {
#[test]
fn and_test() -> Result<()> {
+ // check that (lhs AND rhs) is equal to result
+ // ((lhs_lower, lhs_upper), (rhs_lower, rhs_upper), lower_result, upper_result))
let cases = vec![
- (false, true, false, false, false, false),
- (false, false, false, true, false, false),
- (false, true, false, true, false, true),
- (false, true, true, true, false, true),
- (false, false, false, false, false, false),
- (true, true, true, true, true, true),
+ // Note there are only three valid boolean intervals: [false, false], [false, true] and [true, true],
Review Comment:
I added the three missing cases and reordered the cases so it was easier to see what is covered and what was not.
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org