Skip to content

Commit

Permalink
chore: old op LogicalGet modify to new op name Scan (#15222)
Browse files Browse the repository at this point in the history
  • Loading branch information
TracyZYJ authored Apr 11, 2024
1 parent a2bb0b5 commit bb4464b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl SubqueryRewriter {
if !need_cross_join {
return Ok(plan.clone());
}
// Construct a LogicalGet plan by correlated columns.
// Construct a Scan plan by correlated columns.
// Finally generate a cross join, so we finish flattening the subquery.
let mut metadata = self.metadata.write();
// Currently, we don't support left plan's from clause contains subquery.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl RulePushDownFilterScan {
id: RuleID::PushDownFilterScan,
// Filter
// \
// LogicalGet
// Scan
matchers: vec![Matcher::MatchOp {
op_type: RelOp::Filter,
children: vec![Matcher::MatchOp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ use crate::plans::Scan;

/// Input: Limit
/// \
/// LogicalGet
/// Scan
///
/// Output:
/// Limit
/// \
/// LogicalGet(padding limit)
/// Scan(padding limit)
pub struct RulePushDownLimitScan {
id: RuleID,
matchers: Vec<Matcher>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl RulePushDownPrewhere {
}
}
_ => {
// SubqueryExpr and AggregateFunction will not appear in Filter-LogicalGet
// SubqueryExpr and AggregateFunction will not appear in Filter-Scan
return Err(ErrorCode::Unimplemented(format!(
"Prewhere don't support expr {:?}",
expr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ use crate::plans::Sort;

/// Input: Sort
/// \
/// LogicalGet
/// Scan
///
/// Output:
/// Sort
/// \
/// LogicalGet(padding order_by and limit)
/// Scan(padding order_by and limit)
pub struct RulePushDownSortScan {
id: RuleID,
matchers: Vec<Matcher>,
Expand Down
4 changes: 1 addition & 3 deletions src/query/sql/src/planner/plans/operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,7 @@ impl TryFrom<RelOperator> for Scan {
if let RelOperator::Scan(value) = value {
Ok(value)
} else {
Err(ErrorCode::Internal(
"Cannot downcast RelOperator to LogicalGet",
))
Err(ErrorCode::Internal("Cannot downcast RelOperator to Scan"))
}
}
}
Expand Down

0 comments on commit bb4464b

Please sign in to comment.