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

Method statistics

datafusion/datasource/src/file_scan_config/mod.rs:1107–1113  ·  view source on GitHub ↗

Returns the unprojected table statistics, marking them as inexact if filters are present. When filters are pushed down (including pruning predicates and bloom filters), we can't guarantee the statistics are exact because we don't know how many rows will be filtered out.

(&self)

Source from the content-addressed store, hash-verified

1105 /// we can't guarantee the statistics are exact because we don't know how many
1106 /// rows will be filtered out.
1107 pub fn statistics(&self) -> Statistics {
1108 if self.file_source.filter().is_some() {
1109 self.statistics.clone().to_inexact()
1110 } else {
1111 self.statistics.clone()
1112 }
1113 }
1114
1115 pub fn projected_schema(&self) -> Result<Arc<Schema>> {
1116 let schema = self.file_source.table_schema().table_schema();

Calls 3

to_inexactMethod · 0.80
filterMethod · 0.45
cloneMethod · 0.45

Tested by 1