asolimando commented on code in PR #21815:
URL: https://github.com/apache/datafusion/pull/21815#discussion_r3291435647
##########
datafusion-examples/examples/relation_planner/table_sample.rs:
##########
@@ -722,8 +722,8 @@ impl ExecutionPlan for SampleExec {
Some(self.metrics.clone_inner())
}
- fn partition_statistics(&self, partition: Option<usize>) ->
Result<Arc<Statistics>> {
- let mut stats =
Arc::unwrap_or_clone(self.input.partition_statistics(partition)?);
+ fn statistics_with_args(&self, args: &StatisticsArgs) ->
Result<Arc<Statistics>> {
+ let mut stats =
Arc::unwrap_or_clone(args.child_stats_of(self.input.as_ref())?);
Review Comment:
Good catch, fixed now. I have also dropped the
`child_stats_of`/`child_stats_for` convenience methods in favor of explicit
`compute_child_statistics(child, partition)` to make the partition choice
visible at each call site and reduce the risk of this kind of mistake.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]