Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzl25 committed Nov 24, 2023
1 parent 88b1ff3 commit d2fdd33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/frontend/src/optimizer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ impl PlanRoot {
BatchExchange::new(plan, self.required_order.clone(), Distribution::Single).into();
}

// Both two phase limit and topn could generate limit on top of the scan, so we push limit here.
let plan = plan.optimize_by_rules(&OptimizationStage::new(
"Push Limit To Scan",
vec![BatchPushLimitToScanRule::create()],
Expand Down Expand Up @@ -298,6 +299,7 @@ impl PlanRoot {
ctx.trace(plan.explain_to_string());
}

// Both two phase limit and topn could generate limit on top of the scan, so we push limit here.
let plan = plan.optimize_by_rules(&OptimizationStage::new(
"Push Limit To Scan",
vec![BatchPushLimitToScanRule::create()],
Expand Down

0 comments on commit d2fdd33

Please sign in to comment.