-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Project and Coalesce.
- Loading branch information
1 parent
5785434
commit 6754d67
Showing
31 changed files
with
271 additions
and
76 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use std::sync::Arc; | ||
|
||
use crate::LogicalPlan; | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct Coalesce { | ||
// Number of partitions to coalesce to. | ||
pub num_to: usize, | ||
// Upstream node. | ||
pub input: Arc<LogicalPlan>, | ||
} | ||
|
||
impl Coalesce { | ||
pub(crate) fn new(num_to: usize, input: Arc<LogicalPlan>) -> Self { | ||
Self { num_to, input } | ||
} | ||
} |
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,28 @@ | ||
use std::sync::Arc; | ||
|
||
use daft_core::schema::SchemaRef; | ||
use daft_dsl::Expr; | ||
|
||
use crate::LogicalPlan; | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct Project { | ||
pub projection: Vec<Expr>, | ||
pub projected_schema: SchemaRef, | ||
// Upstream node. | ||
pub input: Arc<LogicalPlan>, | ||
} | ||
|
||
impl Project { | ||
pub(crate) fn new( | ||
projection: Vec<Expr>, | ||
projected_schema: SchemaRef, | ||
input: Arc<LogicalPlan>, | ||
) -> Self { | ||
Self { | ||
projection, | ||
projected_schema, | ||
input, | ||
} | ||
} | ||
} |
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,15 @@ | ||
use std::sync::Arc; | ||
|
||
use crate::physical_plan::PhysicalPlan; | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct Flatten { | ||
// Upstream node. | ||
pub input: Arc<PhysicalPlan>, | ||
} | ||
|
||
impl Flatten { | ||
pub(crate) fn new(input: Arc<PhysicalPlan>) -> Self { | ||
Self { input } | ||
} | ||
} |
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,18 @@ | ||
use std::sync::Arc; | ||
|
||
use daft_dsl::Expr; | ||
|
||
use crate::physical_plan::PhysicalPlan; | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct Project { | ||
pub projection: Vec<Expr>, | ||
// Upstream node. | ||
pub input: Arc<PhysicalPlan>, | ||
} | ||
|
||
impl Project { | ||
pub(crate) fn new(projection: Vec<Expr>, input: Arc<PhysicalPlan>) -> Self { | ||
Self { projection, input } | ||
} | ||
} |
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
Oops, something went wrong.