Compute the logical negation of this (boolean) interval.
(&self)
| 629 | |
| 630 | /// Compute the logical negation of this (boolean) interval. |
| 631 | pub fn not(&self) -> Result<Self> { |
| 632 | assert_eq_or_internal_err!( |
| 633 | self.data_type(), |
| 634 | DataType::Boolean, |
| 635 | "Cannot apply logical negation to a non-boolean interval" |
| 636 | ); |
| 637 | if self == &Self::TRUE { |
| 638 | Ok(Self::FALSE) |
| 639 | } else if self == &Self::FALSE { |
| 640 | Ok(Self::TRUE) |
| 641 | } else { |
| 642 | Ok(Self::TRUE_OR_FALSE) |
| 643 | } |
| 644 | } |
| 645 | |
| 646 | /// Compute the intersection of this interval with the given interval. |
| 647 | /// If the intersection is empty, return `None`. |
no outgoing calls