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

Method has_statistics

datafusion/datasource/src/mod.rs:351–363  ·  view source on GitHub ↗

Check if this file has any statistics. This returns `true` if the file has any Exact or Inexact statistics and `false` if all statistics are `Precision::Absent`.

(&self)

Source from the content-addressed store, hash-verified

349 /// This returns `true` if the file has any Exact or Inexact statistics
350 /// and `false` if all statistics are `Precision::Absent`.
351 pub fn has_statistics(&self) -> bool {
352 if let Some(stats) = &self.statistics {
353 stats.column_statistics.iter().any(|col_stats| {
354 col_stats.null_count != Precision::Absent
355 || col_stats.max_value != Precision::Absent
356 || col_stats.min_value != Precision::Absent
357 || col_stats.sum_value != Precision::Absent
358 || col_stats.distinct_count != Precision::Absent
359 })
360 } else {
361 false
362 }
363 }
364
365 /// Set the known ordering of data in this file.
366 ///

Callers 1

prepare_open_fileMethod · 0.80

Calls 2

anyMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected