MCPcopy Create free account
hub / github.com/apache/datafusion / check_num_rows

Function check_num_rows

datafusion/common/src/stats.rs:982–995  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

980/// Creates an estimate of the number of rows in the output using the given
981/// optional value and exactness flag.
982fn 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
997impl Display for Statistics {
998 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

Callers 1

with_fetchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…