Creates an estimate of the number of rows in the output using the given optional value and exactness flag.
(value: Option<usize>, is_exact: bool)
| 980 | /// Creates an estimate of the number of rows in the output using the given |
| 981 | /// optional value and exactness flag. |
| 982 | fn check_num_rows(value: Option<usize>, is_exact: bool) -> Precision<usize> { |
| 983 | if let Some(value) = value { |
| 984 | if is_exact { |
| 985 | Precision::Exact(value) |
| 986 | } else { |
| 987 | // If the input stats are inexact, so are the output stats. |
| 988 | Precision::Inexact(value) |
| 989 | } |
| 990 | } else { |
| 991 | // If the estimate is not available (e.g. due to an overflow), we can |
| 992 | // not produce a reliable estimate. |
| 993 | Precision::Absent |
| 994 | } |
| 995 | } |
| 996 | |
| 997 | impl Display for Statistics { |
| 998 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
no outgoing calls
no test coverage detected
searching dependent graphs…