Skip to content

Commit 9809013

Browse files
committed
fix
1 parent ff277de commit 9809013

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/query_stage.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,13 @@ impl QueryStage {
9999
/// Get the input partition count. This is the same as the number of concurrent tasks
100100
/// when we schedule this query stage for execution
101101
pub fn get_input_partition_count(&self) -> usize {
102-
if self.plan.as_any().is::<ShuffleWriterExec>() {
103-
// most query stages represent a shuffle write
102+
if self.plan.children().is_empty() {
103+
// leaf node (file scan)
104+
self.plan.output_partitioning().partition_count()
105+
} else {
104106
self.plan.children()[0]
105107
.output_partitioning()
106108
.partition_count()
107-
} else {
108-
// probably the final query stage
109-
self.plan.output_partitioning().partition_count()
110109
}
111110
}
112111

0 commit comments

Comments
 (0)