-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEAT] Multi-partition aggregate; Coalesce (#1249)
planner.rs now translates LogicalPlan::Aggregation into a two-phase Physical Agg->Coalesce->Agg when there is more than one input partition. As part of this, PhysicalPlan::Coalesce was also implemented. TODO (next PR): handle groupbys. --------- Co-authored-by: Xiayue Charles Lin <[email protected]>
- Loading branch information
1 parent
753aeaf
commit 7d3fdfa
Showing
9 changed files
with
161 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use std::sync::Arc; | ||
|
||
use crate::physical_plan::PhysicalPlan; | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct Coalesce { | ||
// Upstream node. | ||
pub input: Arc<PhysicalPlan>, | ||
|
||
// Number of partitions to coalesce from and to. | ||
pub num_from: usize, | ||
pub num_to: usize, | ||
} | ||
|
||
impl Coalesce { | ||
pub(crate) fn new(input: Arc<PhysicalPlan>, num_from: usize, num_to: usize) -> Self { | ||
Self { | ||
input, | ||
num_from, | ||
num_to, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters