Compare `self` with `other` and return an `Ordering`. This is the same as [`PartialOrd`] except that it returns `Err` if the values cannot be compared, e.g., they have incompatible data types.
(&self, other: &Self)
| 4595 | /// This is the same as [`PartialOrd`] except that it returns |
| 4596 | /// `Err` if the values cannot be compared, e.g., they have incompatible data types. |
| 4597 | pub fn try_cmp(&self, other: &Self) -> Result<Ordering> { |
| 4598 | self.partial_cmp(other).ok_or_else(|| { |
| 4599 | _internal_datafusion_err!("Uncomparable values: {self:?}, {other:?}") |
| 4600 | }) |
| 4601 | } |
| 4602 | |
| 4603 | /// Estimate size if bytes including `Self`. For values with internal containers such as `String` |
| 4604 | /// includes the allocated size (`capacity`) rather than the current length (`len`) |