-
Notifications
You must be signed in to change notification settings - Fork 2k
Add statistics_by_partition API to ExecutionPlan
#15503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
f75c7dc
2b4a14f
992baaf
5854095
2fdb663
b3d16e6
8a8f350
491046a
9d1beb9
fc73cd1
fd73b97
48eebaa
7c14496
a69b241
7e3d1e6
0cac2df
495d73e
33cf80a
de08c3b
5e40270
5726954
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -343,6 +343,31 @@ impl ExecutionPlan for CrossJoinExec { | |
| )) | ||
| } | ||
|
|
||
| fn statistics_by_partition(&self) -> Result<Vec<Statistics>> { | ||
|
||
| todo!() | ||
| /* | ||
| let left_stats = self.left.statistics_by_partition()?; | ||
| // Summarize the `left_stats` | ||
| let statistics = | ||
| compute_summary_statistics(file_group.iter(), &file_schema, |file| { | ||
| file.statistics.as_ref().map(|stats| stats.as_ref()) | ||
| }); | ||
| let right_stats = self.right.statistics_by_partition()?; | ||
|
|
||
| if left_stats.is_empty() || right_stats.is_empty() { | ||
| return Ok(vec![]); | ||
| } | ||
|
|
||
| let mut stats = Vec::new(); | ||
| for left in left_stats.iter() { | ||
| for right in right_stats.iter() { | ||
| stats.push(stats_cartesian_product(left.clone(), right.clone())); | ||
| } | ||
| } | ||
| Ok(stats) | ||
| */ | ||
| } | ||
|
|
||
| /// Tries to swap the projection with its input [`CrossJoinExec`]. If it can be done, | ||
| /// it returns the new swapped version having the [`CrossJoinExec`] as the top plan. | ||
| /// Otherwise, it returns None. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing as
CoalesceBatchesExecdoesn't change partitioning of its input I think this is the incorrect number of partitions? It should be repeated N times, once for each partition.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find. I was misled by the
coalesce: )