Skip to content

Commit

Permalink
fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyFan2002 committed Jul 17, 2023
1 parent b564f78 commit 38b1843
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/query/service/src/schedulers/fragments/plan_fragment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,11 @@ impl PlanFragment {
let mut collect_read_source = |plan: &PhysicalPlan| match plan {
PhysicalPlan::TableScan(scan) => source.push(*scan.source.clone()),
PhysicalPlan::CopyIntoTable(copy) => {
// Safe to unwrap because we have checked the fragment type.
source.push(*copy.source.as_stage().cloned().unwrap())
if let Some(stage) = copy.source.as_stage().cloned() {
source.push(stage);
}
}
_ => unreachable!("possibly you add new source fragment but forget to handle it here"),
_ => {}
};

PhysicalPlan::traverse(
Expand Down

0 comments on commit 38b1843

Please sign in to comment.