After #15432 is merged, we'll have partition-level statistics in DataSource.
To make it be used by query optimization, we should flow the info to other nodes, such as SPM, union, etc, so we can add the statistics_by_partition API to ExecutionPlan to implement the idea.