gruuya commented on code in PR #880: URL: https://github.com/apache/iceberg-rust/pull/880#discussion_r1904197220
########## crates/integrations/datafusion/src/table/mod.rs: ########## @@ -130,10 +131,14 @@ impl TableProvider for IcebergTableProvider { filters: &[Expr], _limit: Option<usize>, ) -> DFResult<Arc<dyn ExecutionPlan>> { + let statistics = compute_statistics(&self.table, self.snapshot_id) + .await + .unwrap_or(Statistics::new_unknown(self.schema.as_ref())); Review Comment: Arguably this should be computed when instantiating the `IcebergTableProvider` (consequently `IcebergTableProvider::new` would become async). That way not only could `TableProvider::statistics` be exposed, we'd save a const perf penalty during planning for reading the manifests. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org