Commit a3a5ca4
authored
Fix misleading boolean 'null' interval tests (#18620)
## Which issue does this PR close?
- None, simply corrects two unit tests
## Rationale for this change
The `test_and_null_boolean_intervals` and
`test_or_null_boolean_intervals` are a bit misleading. They try to
create a 'null' interval using
`Interval::try_new(ScalarValue::Boolean(None),
ScalarValue::Boolean(None))`. The implementation of `try_new` normalises
this to `Interval::UNCERTAIN`, which is not the same as 'null'.
## What changes are included in this PR?
Adds tests demonstrating:
- `Interval::try_new(ScalarValue::Boolean(None),
ScalarValue::Boolean(None)) == Interval::UNCERTAIN`
- `Interval::UNCERTAIN` contains `ScalarValue::Boolean(Some(true))` and
`ScalarValue::Boolean(Some(false))`
- `Interval::UNCERTAIN` does not contain `ScalarValue::Boolean(None)` or
`ScalarValue::Null`
Renames `test_and_null_boolean_intervals` and
`test_and_null_boolean_intervals`
## Are these changes tested?
Test only changes
## Are there any user-facing changes?
No1 parent 65bd13d commit a3a5ca4
1 file changed
+39
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2533 | 2533 | | |
2534 | 2534 | | |
2535 | 2535 | | |
| 2536 | + | |
| 2537 | + | |
2536 | 2538 | | |
2537 | | - | |
| 2539 | + | |
2538 | 2540 | | |
2539 | | - | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
2540 | 2564 | | |
2541 | | - | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
2542 | 2568 | | |
2543 | 2569 | | |
2544 | | - | |
| 2570 | + | |
2545 | 2571 | | |
2546 | 2572 | | |
2547 | | - | |
| 2573 | + | |
2548 | 2574 | | |
2549 | 2575 | | |
2550 | | - | |
| 2576 | + | |
2551 | 2577 | | |
2552 | 2578 | | |
2553 | | - | |
| 2579 | + | |
2554 | 2580 | | |
2555 | 2581 | | |
2556 | 2582 | | |
2557 | 2583 | | |
2558 | 2584 | | |
2559 | 2585 | | |
2560 | | - | |
2561 | | - | |
2562 | | - | |
2563 | | - | |
2564 | | - | |
| 2586 | + | |
| 2587 | + | |
2565 | 2588 | | |
2566 | 2589 | | |
2567 | | - | |
| 2590 | + | |
2568 | 2591 | | |
2569 | 2592 | | |
2570 | | - | |
| 2593 | + | |
2571 | 2594 | | |
2572 | 2595 | | |
2573 | | - | |
| 2596 | + | |
2574 | 2597 | | |
2575 | 2598 | | |
2576 | | - | |
| 2599 | + | |
2577 | 2600 | | |
2578 | 2601 | | |
2579 | 2602 | | |
| |||
0 commit comments