Skip to content

Commit

Permalink
better panic messages
Browse files Browse the repository at this point in the history
  • Loading branch information
connortsui20 committed Jan 28, 2025
1 parent 0fa7b5d commit 54f6f19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion infra/src/types/plan/logical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::sync::Arc;
/// operator).
#[derive(Clone)]
pub struct LogicalPlan {
root: Arc<LogicalOperator<LogicalLink>>,
pub root: Arc<LogicalOperator<LogicalLink>>,
}

/// A link in a [`LogicalPlan`] to a node.
Expand Down
8 changes: 4 additions & 4 deletions infra/src/types/plan/physical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::sync::Arc;
/// TODO Add docs.
#[derive(Clone)]
pub struct PhysicalPlan {
root: Arc<PhysicalOperator<PhysicalLink>>,
pub root: Arc<PhysicalOperator<PhysicalLink>>,
}

/// TODO This is hacky prototype code, DO NOT USE!
Expand Down Expand Up @@ -55,7 +55,7 @@ impl PhysicalOperator<PhysicalLink> {
}
PhysicalOperator::Filter(PhysicalFilterOperator { child, predicate }) => {
let PhysicalLink::PhysicalNode(child_operator) = child else {
panic!();
unimplemented!("encountered a scalar operator");
};

let predicate_expr = Arc::new(NoOp {}); // TODO FIX THIS!
Expand All @@ -70,10 +70,10 @@ impl PhysicalOperator<PhysicalLink> {
condition,
}) => {
let PhysicalLink::PhysicalNode(left_operator) = left else {
panic!();
unimplemented!("encountered a scalar operator");
};
let PhysicalLink::PhysicalNode(right_operator) = right else {
panic!();
unimplemented!("encountered a scalar operator");
};

let left_plan = left_operator.as_datafusion_execution_plan();
Expand Down

0 comments on commit 54f6f19

Please sign in to comment.