We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff277de commit 9809013Copy full SHA for 9809013
src/query_stage.rs
@@ -99,14 +99,13 @@ impl QueryStage {
99
/// Get the input partition count. This is the same as the number of concurrent tasks
100
/// when we schedule this query stage for execution
101
pub fn get_input_partition_count(&self) -> usize {
102
- if self.plan.as_any().is::<ShuffleWriterExec>() {
103
- // most query stages represent a shuffle write
+ if self.plan.children().is_empty() {
+ // leaf node (file scan)
104
+ self.plan.output_partitioning().partition_count()
105
+ } else {
106
self.plan.children()[0]
107
.output_partitioning()
108
.partition_count()
- } else {
- // probably the final query stage
109
- self.plan.output_partitioning().partition_count()
110
}
111
112
0 commit comments