Skip to content

Commit

Permalink
make it private
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Nov 13, 2024
1 parent ed5ea19 commit 3026006
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/frontend/src/optimizer/plan_node/logical_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,7 @@ impl ToBatch for LogicalScan {

if !new.indexes().is_empty() {
let index_selection_rule = IndexSelectionRule::create();
if let ApplyResult::Ok(applied) =
index_selection_rule.apply(new.clone().into())
{
if let ApplyResult::Ok(applied) = index_selection_rule.apply(new.clone().into()) {
if let Some(scan) = applied.as_logical_scan() {
// covering index
return required_order.enforce_if_not_satisfies(scan.to_batch()?);
Expand Down
6 changes: 4 additions & 2 deletions src/frontend/src/optimizer/rule/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ where
}

/// An one-to-one transform for the [`PlanNode`](super::plan_node::PlanNode).
pub trait InfallibleRule: Send + Sync + Description {
///
/// It's a convenient trait to implement [`FallibleRule`], thus made available only within this module.
trait InfallibleRule: Send + Sync + Description {
/// Apply the rule to the plan node.
///
/// - Returns `Some` if the apply is successful.
Expand Down Expand Up @@ -95,7 +97,7 @@ where
T: InfallibleRule,
{
fn apply(&self, plan: PlanRef) -> ApplyResult {
match self.apply(plan) {
match InfallibleRule::apply(self, plan) {
Some(plan) => ApplyResult::Ok(plan),
None => ApplyResult::NotApplicable,
}
Expand Down

0 comments on commit 3026006

Please sign in to comment.