Skip to content

Commit 817e3c4

Browse files
committed
fix plan types
1 parent ddb0e5b commit 817e3c4

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

optd-types/src/plan/logical_plan.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use std::sync::Arc;
1212
/// The root of the plan DAG _cannot_ be a scalar operator (and thus for now can only be a logical
1313
/// operator).
1414
#[derive(Clone)]
15-
pub enum LogicalPlan {
16-
LogicalRoot(Arc<LogicalOperator<LogicalLink>>),
15+
pub struct LogicalPlan {
16+
root: Arc<LogicalOperator<LogicalLink>>,
1717
}
1818

1919
/// A link in a [`LogicalPlan`] to a node.
@@ -26,9 +26,6 @@ pub enum LogicalPlan {
2626
///
2727
/// - [`super::logical_plan::LogicalLink`] only allows a logical operator to have other logical
2828
/// operators or scalar operators as children since that is all [`LogicalPlan`] needs
29-
/// - [`super::physical_plan::LogicalLink`] allows a logical operator to also have a physical
30-
/// operator as a child (since [`PhysicalPlan`] needs to encode both logical and physical
31-
/// operators).
3229
/// - [`super::partial_logical_plan::LogicalLink`] allows a logical operator to also have a
3330
/// [`GroupId`] as a child (since the [`PartialLogicalPlan`] is a partially materialized query
3431
/// plan).

optd-types/src/plan/physical_plan.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,8 @@ use std::sync::Arc;
33

44
/// TODO Add docs.
55
#[derive(Clone)]
6-
pub enum PhysicalPlan {
7-
LogicalRoot(LogicalLink),
8-
PhysicalRoot(PhysicalLink),
9-
}
10-
11-
/// TODO Add docs.
12-
#[allow(clippy::enum_variant_names)]
13-
#[derive(Clone)]
14-
pub enum LogicalLink {
15-
LogicalNode(Arc<LogicalOperator<LogicalLink>>),
16-
PhysicalNode(Arc<PhysicalOperator<PhysicalLink>>),
17-
ScalarNode(Arc<ScalarOperator<ScalarLink>>),
6+
pub struct PhysicalPlan {
7+
root: Arc<PhysicalOperator<PhysicalLink>>,
188
}
199

2010
/// TODO Add docs.

0 commit comments

Comments
 (0)