xudong963 commented on PR #15503: URL: https://github.com/apache/datafusion/pull/15503#issuecomment-2785749441
> ```rust > fn statistics(&self, partition: Option<usize>) -> Result<Statistics> > ``` Thanks @berkaysynnada ! I'm a little confused about the API, the original `statistics_by_partition ` is to collect all partitions' statistics. IIUC, the new statistics API works like this: ```rust fn statistics(&self, partition: Option<usize>) -> Result<Statistics> { match partition { Some(idx) => { // Validate partition index if idx >= self.properties().partitioning.partition_count() { return exec_err!("Invalid partition index: {}", idx); } // Default implementation: return unknown statistics for the specific partition Ok(Statistics::new_unknown(&self.schema())) } None => { // Return statistics for the entire plan (existing behavior) Ok(Statistics::new_unknown(&self.schema())) } } } ``` How does it return all partitions' statistics? -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org